| 123 | |
| 124 | |
| 125 | AnyType |
| 126 | matrix_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 | |
| 142 | AnyType |
| 143 | matrix_agg_final::run(AnyType& args) { |
nothing calls this directly
no test coverage detected