Function grid_rearrange_and_copy (o2scl)

O2scl : Function List

template<class tensor_t, class data_t>
tensor_t o2scl::grid_rearrange_and_copy(const tensor_t &t, std::vector<index_spec> spec, int verbose = 0, bool err_on_fail = true)

Rearrange, sum and copy current tensor to a new tensor.

Idea for Future:

Some code duplication between this function and the one in the tensor class.

Note

Experimental

template<class tensor_t, class data_t>
tensor_t o2scl::grid_rearrange_and_copy(const tensor_t &t, std::string spec, int verbose = 0, bool err_on_fail = true)

Rearrange, sum and copy current tensor to a new tensor (string input version)