HyperspaceExplorer 0.7.1
|
Values of a ParametricFunction stored on a grid representation of its parameter space. More...
#include <FunctionValueGrid.h>
Public Types | |
typedef VertexGrid< N, P, NUM > ::grid_size_type | grid_size_type |
Type for storing the size of the grid in all required dimensions. | |
typedef VertexGrid< N, P, NUM > ::value_storage_type | value_storage_type |
Type for the storage of the function values on all grid points. | |
typedef ParametricFunction< N, P, NUM > | function_type |
The type of the function whose values are stored in this class. | |
typedef std::shared_ptr < function_type > | function_ptr_type |
The type of pointers to function_type, used for late binding. | |
typedef VecMath::Vector< P, NUM > | boundary_type |
The type of the lower and upper bounds of the definition space. | |
Public Member Functions | |
FunctionValueGrid () | |
Create an empty grid. | |
FunctionValueGrid (const function_ptr_type &f) | |
Prepare a grid with a defined ParametricFunction. | |
FunctionValueGrid (const function_ptr_type &f, const grid_size_type &grid_size) | |
Fill a grid with a defined grid size. The supplied ParametricFunction knows its definition space. | |
FunctionValueGrid (const function_ptr_type &f, const grid_size_type &grid_size, const boundary_type &x_min, const boundary_type &x_max) | |
Fill a grid with a defined grid size and boundaries. | |
void | setGridSize (const grid_size_type &grid_size) |
Change the size of the grid. If possible, function values are recalculated. | |
void | setBoundaries (const boundary_type &x_min, const boundary_type &x_max) |
Change the size of the definition space. If possible, function values are recalculated. | |
Private Member Functions | |
void | recalculate_grid () |
Loop over the entire definition space and fill the grid with the function values at those points. | |
Private Attributes | |
function_ptr_type | _f |
The ParametricFunction that evaluates the points on the grid. | |
boundary_type | _x_min |
Lower boundary of the grid in all dimensions. | |
boundary_type | _x_max |
Upper boundary of the grid in all dimensions. | |
Static Private Attributes | |
static constexpr double | EPSILON = 1e-8 |
Values of a ParametricFunction stored on a grid representation of its parameter space.
This class evaluates the parametric equation represented by a ParametricFunction on points throughout its definition space and stores the values of the function at those points in a P
dimensional grid.
N | The dimension of the definition vector space. |
P | The dimension of the parameter vector space. |
NUM | The numeric type managed by the grid. |
FunctionValueGrid< N, P, NUM >::FunctionValueGrid | ( | const function_ptr_type & | f | ) |
Prepare a grid with a defined ParametricFunction.
f | The function whose values are stored on its definition space. |
References FunctionValueGrid< N, P, NUM >::setBoundaries().
FunctionValueGrid< N, P, NUM >::FunctionValueGrid | ( | const function_ptr_type & | f, |
const grid_size_type & | grid_size | ||
) |
Fill a grid with a defined grid size. The supplied ParametricFunction knows its definition space.
f | The function whose values are stored on its definition space. |
grid_size | The size of the grid in each of its dimensions. |
References FunctionValueGrid< N, P, NUM >::setBoundaries(), and FunctionValueGrid< N, P, NUM >::setGridSize().
FunctionValueGrid< N, P, NUM >::FunctionValueGrid | ( | const function_ptr_type & | f, |
const grid_size_type & | grid_size, | ||
const boundary_type & | x_min, | ||
const boundary_type & | x_max | ||
) |
Fill a grid with a defined grid size and boundaries.
f | The function whose values are stored on its definition space. |
grid_size | The size of the grid in each of its dimensions. |
x_min | Lower boundary of the definition space. |
x_max | Upper boundary of the definition space. |
References FunctionValueGrid< N, P, NUM >::setBoundaries(), and FunctionValueGrid< N, P, NUM >::setGridSize().
void FunctionValueGrid< N, P, NUM >::recalculate_grid | ( | ) | [private] |
Loop over the entire definition space and fill the grid with the function values at those points.
Initialize a LoopHelper and set it off.
References LoopHelper< N, P, dimension, NUM >::recalculateOneDimensionOfGrid().
void FunctionValueGrid< N, P, NUM >::setBoundaries | ( | const boundary_type & | x_min, |
const boundary_type & | x_max | ||
) |
Change the size of the definition space. If possible, function values are recalculated.
x_min | Lower boundary of the definition space. |
x_max | Upper boundary of the definition space. |
References abs(), and VecMath::sqnorm().
Referenced by FunctionValueGrid< N, P, NUM >::FunctionValueGrid().
void FunctionValueGrid< N, P, NUM >::setGridSize | ( | const grid_size_type & | grid_size | ) |
Change the size of the grid. If possible, function values are recalculated.
grid_size | The new grid size. |
Reimplemented from VertexGrid< N, P, NUM >.
References abs(), and VecMath::sqnorm().
Referenced by FunctionValueGrid< N, P, NUM >::FunctionValueGrid().
constexpr double FunctionValueGrid< N, P, NUM >::EPSILON = 1e-8 [static, private] |