More natural sorting of MatType constants in performance reports.
This commit is contained in:
@@ -2,8 +2,13 @@ import testlog_parser, sys, os, xml, glob, re
|
||||
from table_formatter import *
|
||||
from optparse import OptionParser
|
||||
|
||||
convert = lambda text: int(text) if text.isdigit() else text
|
||||
alphanum_keyselector = lambda key: [ convert(c) for c in re.split('([0-9]+)', key) ]
|
||||
numeric_re = re.compile("(\d+)")
|
||||
cvtype_re = re.compile("(8U|8S|16U|16S|32S|32F|64F)C(\d{1,3})")
|
||||
cvtypes = { '8U': 0, '8S': 1, '16U': 2, '16S': 3, '32S': 4, '32F': 5, '64F': 6 }
|
||||
|
||||
convert = lambda text: int(text) if text.isdigit() else text
|
||||
keyselector = lambda a: cvtype_re.sub(lambda match: " " + str(cvtypes.get(match.group(1), 7) + (int(match.group(2))-1) * 8) + " ", a)
|
||||
alphanum_keyselector = lambda key: [ convert(c) for c in numeric_re.split(keyselector(key)) ]
|
||||
|
||||
def getSetName(tset, idx, columns, short = True):
|
||||
if columns and len(columns) > idx:
|
||||
|
Reference in New Issue
Block a user