private static void addMSStrokeToDTF(ref DTF dtf, ref double[] ret, int idx) { dtf.AddObservationToStroke(idx, "numTouching", ret[0]); dtf.AddObservationToStroke(idx, "numMinDistSmall", ret[1]); dtf.AddObservationToStroke(idx, "numMinDistLarge", ret[2]); dtf.AddObservationToStroke(idx, "numMaxDistSmall", ret[3]); dtf.AddObservationToStroke(idx, "numMaxDistLarge", ret[4]); dtf.AddObservationToStroke(idx, "numCorners", ret[5]); dtf.AddObservationToStroke(idx, "numMinDistEndsLarge", ret[6]); dtf.AddObservationToStroke(idx, "numDistAvgPtsSmall", ret[7]); dtf.AddObservationToStroke(idx, "numDistAvgPtsLarge", ret[8]); dtf.AddObservationToStroke(idx, "numArePerpendicular", ret[9]); dtf.AddObservationToStroke(idx, "numAreParallel", ret[10]); dtf.AddObservationToStroke(idx, "MSbiasFunction", ret[11]); dtf.AddObservationToStroke(idx, "numEndsClose", ret[12]); dtf.AddObservationToStroke(idx, "numPenLifted", ret[13]); dtf.AddObservationToStroke(idx, "numStraightCurved", ret[14]); dtf.AddObservationToStroke(idx, "numStraightStraight", ret[15]); dtf.AddObservationToStroke(idx, "numCurvedStraight", ret[16]); dtf.AddObservationToStroke(idx, "numCurvedCurved", ret[17]); dtf.AddObservationToStroke(idx, "numSimilarlyBounded", ret[18]); dtf.AddObservationToStroke(idx, "numAngleSmall", ret[19]); dtf.AddObservationToStroke(idx, "numAngleLarge", ret[20]); }
private static int addSSStrokeToDTF(ref DTF dtf, ref double[] ret, ref Substroke ss, ref LabelMapper.LabelMapper lm) { int idx = dtf.AddStroke(lm.labelMap[ss.FirstLabel], ss.Id); dtf.AddObservationToStroke(idx, "biasFunction", ret[0]); dtf.AddObservationToStroke(idx, "distBetweenEndsLarge", ret[1]); dtf.AddObservationToStroke(idx, "distBetweenEndsSmall", ret[2]); dtf.AddObservationToStroke(idx, "arcLengthShort", ret[3]); dtf.AddObservationToStroke(idx, "arcLengthLong", ret[4]); dtf.AddObservationToStroke(idx, "turningZero", ret[5]); dtf.AddObservationToStroke(idx, "turningSmall", ret[6]); dtf.AddObservationToStroke(idx, "turning360", ret[7]); dtf.AddObservationToStroke(idx, "turningLarge", ret[8]); dtf.AddObservationToStroke(idx, "distFromLR", ret[9]); dtf.AddObservationToStroke(idx, "distFromTB", ret[10]); dtf.AddObservationToStroke(idx, "twoCorners", ret[11]); return(idx); }