|
CMP++: Uncertainty Quantification & Bayesian Calibration
|
Linearly spaced Cartesian tensor product grid generator. More...
#include <grid.h>


Public Member Functions | |
| LinspacedGrid (const Eigen::Ref< const Eigen::VectorXd > &lowerBound, const Eigen::Ref< const Eigen::VectorXd > &upperBound) | |
| Constructs a LinspacedGrid. | |
| Eigen::MatrixXd | construct (const size_t &nPoints) override |
| Constructs the linearly spaced grid matrix. | |
| size_t | dim () const override |
| Returns the dimension of the domain. | |
Public Member Functions inherited from cmp::grid::Grid | |
| virtual | ~Grid ()=default |
Private Member Functions | |
| Eigen::VectorXs | gridElement (const size_t &index, const size_t &n_pts, const size_t &dim) |
| Helper to retrieve the multi-dimensional grid index matching a flat index. | |
Private Attributes | |
| size_t | dimension_ |
| Number of dimensions. | |
| Eigen::VectorXd | lowerBound_ |
| Lower bounds vector. | |
| Eigen::VectorXd | upperBound_ |
| Upper bounds vector. | |
Linearly spaced Cartesian tensor product grid generator.
Mathematical Formulation Given a total number of target points \(N\), computes the number of points per dimension:
\[ N_d = \lceil N^{1/D} \rceil \]
Constructs a uniform Cartesian grid of size \(N_d^D\).
|
inline |
Constructs a LinspacedGrid.
| lowerBound | The lower bounds of the hyperrectangle. |
| upperBound | The upper bounds of the hyperrectangle. |
|
inlineoverridevirtual |
Constructs the linearly spaced grid matrix.
| nPoints | Target number of points (actual size will be rounded up to the nearest perfect power). |
Implements cmp::grid::Grid.
|
inlineoverridevirtual |
Returns the dimension of the domain.
Implements cmp::grid::Grid.
|
private |
Helper to retrieve the multi-dimensional grid index matching a flat index.
|
private |
Number of dimensions.
|
private |
Lower bounds vector.
|
private |
Upper bounds vector.