TMB Documentation
v1.9.11
|
Utilility class for sequential_reduction
.
More...
#include <graph_transform.hpp>
Public Member Functions | |
size_t | count () |
Number of elements indexed by this multivariate_index More... | |
void | flip () |
Flip the mask of active dimensions. | |
size_t | index (size_t i) |
Get given component of this multivariate_index | |
std::vector< size_t > | index () |
Get multivariate_index as a vector. | |
std::vector< bool >::reference | mask (size_t i) |
Get / set active dimensions of this multivariate_index | |
multivariate_index (size_t bound_, size_t dim, bool flag=true) | |
CTOR of multivariate_index representing {0,..,B-1}^D More... | |
multivariate_index (std::vector< size_t > bound, bool flag=true) | |
CTOR of multivariate_index representing the product set Prod_i {0,..,B[i]-1} More... | |
operator size_t () | |
Get univariate pointer. | |
multivariate_index & | operator++ () |
Advance to next element of this sub slice. | |
void | set_mask (const std::vector< bool > &mask) |
Set all active dimensions of this multivariate_index | |
Utilility class for sequential_reduction
.
Helps looping through a multivariate index along any possible sub slice.
Example: Loop through {0,1}^5
with middle index (2) slowest running and remaining indices (0,1,3,4) fastest running.
Definition at line 435 of file graph_transform.hpp.
TMBad::multivariate_index::multivariate_index | ( | size_t | bound_, |
size_t | dim, | ||
bool | flag = true |
||
) |
CTOR of multivariate_index
representing {0,..,B-1}^D
bound | B |
dim | D |
flag | Fill mask of active dimensions with this value |
TMBad::multivariate_index::multivariate_index | ( | std::vector< size_t > | bound, |
bool | flag = true |
||
) |
CTOR of multivariate_index
representing the product set Prod_i {0,..,B[i]-1}
Bound | vector B containing the number of indices for each dimension |
flag | Fill mask of active dimensions with this value |
size_t TMBad::multivariate_index::count | ( | ) |
Number of elements indexed by this multivariate_index
count
inside a loop such as for(i=0; i<x.count(); i++, ++x)
. Definition at line 3702 of file TMBad.cpp.
Referenced by TMBad::clique::get_stride(), and TMBad::sequential_reduction::tabulate().