MCPcopy Create free account
hub / github.com/apache/madlib / run

Method run

src/modules/linalg/matrix_agg.cpp:125–140  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

123
124
125AnyType
126matrix_agg_transition::run(AnyType& args) {
127 MatrixAggState<MutableArrayHandle<double> > state = args[0];
128 MappedColumnVector x = args[1].getAs<MappedColumnVector>();
129
130 if (state.numCols == 0)
131 state.initialize(*this, x.size());
132 else if (x.size() != state.matrix.rows()
133 || state.numRows != static_cast<uint64_t>(state.matrix.rows())
134 || state.numCols != static_cast<uint64_t>(state.matrix.cols()))
135 throw std::invalid_argument("Invalid arguments: Dimensions of vectors "
136 "not consistent.");
137
138 state.newColumn(*this) = x;
139 return state;
140}
141
142AnyType
143matrix_agg_final::run(AnyType& args) {

Callers

nothing calls this directly

Calls 3

newColumnMethod · 0.80
initializeMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected