std::vector< Index > syten::loadOrder | ( | std::string | ordering, |
Index | size = 0 |
||
) |
Reads a file given by ordering
as a DenseTensor with reordered position v[i] as entry i.
Returns the inverted vector. If ordering
is the empty string, returns a vector of size size
filled with sequentially increasing numbers.
If specified and non-zero, checks if vector is of length size
.
References std::vector< T >::begin(), std::vector< T >::empty(), std::vector< T >::end(), std::ifstream::good(), std::iota(), syten::k_to_y::ordering(), syten::DenseTensor< rank, Scalar >::size(), and std::to_string().