Function libwalrus::lin_to_multi¶
Defined in File repeated_hafnian.hpp
Function Documentation¶
-
std::vector<int>
libwalrus
::
lin_to_multi
(unsigned long long int linear_index, const std::vector<int> &maxes)¶ Converts a linear index to a multi index e.g. if we wanted the multi-index (i,j) of an element in a 2x2 matrix given a linear index of 3 in the array storing the matrix, the maxes vector would be {1,1} and this function would return (1,0)
- Return
multi-index corresponding to the linear index
- Parameters
linear_index
: the “flattened” indexmaxes
: a vector of integers, representing the max index value of each indice in the multi-index object.
libwalrus_cpp_api/function_namespacelibwalrus_1a0738b87dc516fa1d041fc57e730c4d8f
Download Python script
Download Notebook
View on GitHub
Contents
Downloads