#include <CartesianProduct.h>
Public Member Functions | |
CartesianProduct (const std::vector< std::vector< T >> &items) | |
std::vector< std::vector< T > > | computeMatrix () const |
Compute the complete Cartesian product matrix. More... | |
std::vector< T > | computeRow (std::size_t row) const |
Compute specified row of Cartesian product matrix. More... | |
T | computeValue (std::size_t row, std::size_t col) const |
Compute specific value, given row and column, of the Cartesian product matrix. More... | |
std::size_t | numRows () const |
Total number of rows in the complete matrix. More... | |
std::size_t | numCols () const |
Total number of columns in the complete matrix. More... | |
Protected Attributes | |
const std::size_t | _n_rows |
Number of rows/columns. More... | |
const std::size_t | _n_cols |
Static Private Member Functions | |
static std::size_t | computeRowCount (const std::vector< std::vector< T >> &items) |
Helper to compute the rows in initialization list to allow _n_rows to be const. More... | |
Private Attributes | |
const std::vector< std::vector< T > > | _items |
Data used to create Cartesian product use a copy because a temporary can be supplied, as is the case in the CartesianProductSampler. More... | |
std::deque< unsigned int > | _denomenators |
Containers for lazy Cartesian product calculation. More... | |
std::deque< unsigned int > | _moduli |
Definition at line 25 of file CartesianProduct.h.
StochasticTools::CartesianProduct< T >::CartesianProduct | ( | const std::vector< std::vector< T >> & | items | ) |
Definition at line 64 of file CartesianProduct.h.
std::vector< std::vector< T > > StochasticTools::CartesianProduct< T >::computeMatrix | ( | ) | const |
Compute the complete Cartesian product matrix.
Definition at line 81 of file CartesianProduct.h.
std::vector< T > StochasticTools::CartesianProduct< T >::computeRow | ( | std::size_t | row | ) | const |
Compute specified row of Cartesian product matrix.
Definition at line 92 of file CartesianProduct.h.
Referenced by PolynomialQuadrature::ClenshawCurtisGrid::ClenshawCurtisGrid(), StochasticTools::MultiDimPolynomialGenerator::generateTuple(), and PolynomialQuadrature::SmolyakGrid::SmolyakGrid().
|
staticprivate |
Helper to compute the rows in initialization list to allow _n_rows to be const.
Definition at line 111 of file CartesianProduct.h.
T StochasticTools::CartesianProduct< T >::computeValue | ( | std::size_t | row, |
std::size_t | col | ||
) | const |
Compute specific value, given row and column, of the Cartesian product matrix.
Definition at line 102 of file CartesianProduct.h.
|
inline |
Total number of columns in the complete matrix.
Definition at line 43 of file CartesianProduct.h.
Referenced by TEST().
|
inline |
Total number of rows in the complete matrix.
Definition at line 40 of file CartesianProduct.h.
Referenced by PolynomialQuadrature::ClenshawCurtisGrid::ClenshawCurtisGrid(), StochasticTools::MultiDimPolynomialGenerator::generateTuple(), PolynomialQuadrature::SmolyakGrid::SmolyakGrid(), and TEST().
|
private |
Containers for lazy Cartesian product calculation.
Definition at line 56 of file CartesianProduct.h.
|
private |
Data used to create Cartesian product use a copy because a temporary can be supplied, as is the case in the CartesianProductSampler.
Definition at line 53 of file CartesianProduct.h.
|
private |
Definition at line 57 of file CartesianProduct.h.
|
protected |
Definition at line 48 of file CartesianProduct.h.
|
protected |
Number of rows/columns.
Definition at line 47 of file CartesianProduct.h.