Lines Matching full:comps
77 def combineVec(comps):
79 for ndx in range(len(comps[0])):
80 # for x in comps:
82 scalars = reduce(operator.add, [x[ndx].toFloat().getScalars() for x in comps])
87 def combineIVec(comps):
89 for ndx in range(len(comps[0])):
90 res.append(Vec.fromScalarList(reduce(operator.add, [x[ndx].toInt().getScalars() for x in comps])))
93 def combineUVec(comps):
94 return [x.toUint() for x in combineIVec(comps)]
96 def combineBVec(comps):
98 for ndx in range(len(comps[0])):
99 res.append(Vec.fromScalarList(reduce(operator.add, [x[ndx].toBool().getScalars() for x in comps])))
102 def combineMat(numCols, numRows, comps):
104 for ndx in range(len(comps[0])):
105 scalars = reduce(operator.add, [x[ndx].toFloat().getScalars() for x in comps])
109 def combineMat2(comps): return combineMat(2, 2, comps)
110 def combineMat2x3(comps): return combineMat(2, 3, comps)
111 def combineMat2x4(comps): return combineMat(2, 4, comps)
112 def combineMat3x2(comps): return combineMat(3, 2, comps)
113 def combineMat3(comps): return combineMat(3, 3, comps)
114 def combineMat3x4(comps): return combineMat(3, 4, comps)
115 def combineMat4x2(comps): return combineMat(4, 2, comps)
116 def combineMat4x3(comps): return combineMat(4, 3, comps)
117 def combineMat4(comps): return combineMat(4, 4, comps)
310 for comps in inCompLists:
311 maxLen = reduce(max, [len(values) for values in comps])
312 comps = [repeatToLength(values, maxLen) for values in comps]
313 comps = [shuffled(values) for values in comps]
315 res += [CombineCase(comps, combFunc)]