| 232 | return Expression(x.pg, x.pg->add_function<MomentDimension>({x.i}, dims, 1, false)); |
| 233 | } |
| 234 | Expression std_elems(const Expression& x) { |
| 235 | vector<unsigned> dims(x.dim().nd); |
| 236 | for(size_t i = 0; i < dims.size(); ++i) dims[i] = i; |
| 237 | return Expression(x.pg, x.pg->add_function<StdDimension>({x.i}, dims, false)); |
| 238 | } |
| 239 | Expression mean_batches(const Expression& x) { return Expression(x.pg, x.pg->add_function<MomentDimension>({x.i}, vector<unsigned>(), 1, true)); } |
| 240 | Expression moment_batches(const Expression& x, unsigned r) { return Expression(x.pg, x.pg->add_function<MomentDimension>({x.i}, vector<unsigned>(), r, true)); } |
| 241 | Expression std_batches(const Expression& x) { return Expression(x.pg, x.pg->add_function<StdDimension>({x.i}, vector<unsigned>(), true)); } |