Class MHO_UniformGridPointsCalculator.
More...
#include <MHO_UniformGridPointsCalculator.hh>
|
| void | Calculate_v1 (int max_pts=8192) |
| | Calculates uniform grid points for frequency data up to a maximum number of points. based on original implementation (freq_spacing.c), default max number of points is 8192. More...
|
| |
| void | Calculate_v2 () |
| | Calculates uniform grid points without enforcing power-of-2 size - untested, not used. More...
|
| |
| void | FindStartAndMinMaxSpacing () |
| | Finds start point and minimum/maximum spacing between points in a list. More...
|
| |
◆ MHO_UniformGridPointsCalculator()
| hops::MHO_UniformGridPointsCalculator::MHO_UniformGridPointsCalculator |
( |
| ) |
|
◆ ~MHO_UniformGridPointsCalculator()
| hops::MHO_UniformGridPointsCalculator::~MHO_UniformGridPointsCalculator |
( |
| ) |
|
◆ Calculate()
| void hops::MHO_UniformGridPointsCalculator::Calculate |
( |
| ) |
|
Calculates uniform grid points and adjusts point count until spacing error is resolved.
◆ Calculate_v1()
| void hops::MHO_UniformGridPointsCalculator::Calculate_v1 |
( |
int |
max_pts = 8192 | ) |
|
|
protected |
Calculates uniform grid points for frequency data up to a maximum number of points. based on original implementation (freq_spacing.c), default max number of points is 8192.
- Parameters
-
| max_pts | Maximum number of frequency points to consider. |
◆ Calculate_v2()
| void hops::MHO_UniformGridPointsCalculator::Calculate_v2 |
( |
| ) |
|
|
protected |
Calculates uniform grid points without enforcing power-of-2 size - untested, not used.
◆ FindStartAndMinMaxSpacing()
| void hops::MHO_UniformGridPointsCalculator::FindStartAndMinMaxSpacing |
( |
| ) |
|
|
protected |
Finds start point and minimum/maximum spacing between points in a list.
◆ GetGridAverage()
| double hops::MHO_UniformGridPointsCalculator::GetGridAverage |
( |
| ) |
const |
|
inline |
Getter for grid average.
- Returns
- The average point location as a double.
◆ GetGridIndexMap()
| std::map< std::size_t, std::size_t > hops::MHO_UniformGridPointsCalculator::GetGridIndexMap |
( |
| ) |
|
|
inline |
Getter for grid index map maps the indexes of the original points to their new locations in the uniform grid array.
- Returns
- std::pair<std::size_t, std::size_t representing the index mapping.
◆ GetGridPoints()
| void hops::MHO_UniformGridPointsCalculator::GetGridPoints |
( |
std::vector< double > * |
grid_pts | ) |
|
Getter for grid points.
- Parameters
-
| grid_pts | (std::vector< double >*) |
◆ GetGridSpacing()
| double hops::MHO_UniformGridPointsCalculator::GetGridSpacing |
( |
| ) |
const |
|
inline |
Getter for grid spacing - the distance between points on the uniform grid.
- Returns
- Current grid spacing as a double.
◆ GetGridStart()
| double hops::MHO_UniformGridPointsCalculator::GetGridStart |
( |
| ) |
const |
|
inline |
Getter for grid start.
- Returns
- The starting point of the grid as a double.
◆ GetNGridPoints()
| std::size_t hops::MHO_UniformGridPointsCalculator::GetNGridPoints |
( |
| ) |
const |
|
inline |
Getter for the number of points in the uniform grid.
- Returns
- Number of grid points as std::size_t.
◆ GetSpacingErrorStatus()
| bool hops::MHO_UniformGridPointsCalculator::GetSpacingErrorStatus |
( |
| ) |
const |
|
inline |
Getter for spacing error status.
- Returns
- Boolean indicating whether there is a spacing error.
◆ GetSpread()
| double hops::MHO_UniformGridPointsCalculator::GetSpread |
( |
| ) |
const |
|
inline |
Getter for spread - the grid spread about the average.
- Returns
- Current spread value as a double
◆ GetUniquePoints()
| void hops::MHO_UniformGridPointsCalculator::GetUniquePoints |
( |
const std::vector< double > & |
in_pts, |
|
|
double |
eps, |
|
|
std::vector< double > & |
out_pts, |
|
|
std::map< std::size_t, std::size_t > & |
index_map |
|
) |
| const |
pre-processing step – makes sure the points are unique given some epsilon and if not, then provides a std::map<int, int> to map the input vector indices to the output vector
- Parameters
-
| in_pts | Input vector of double precision points |
| eps | Epsilon value for uniqueness check |
| out_pts | Output vector of unique points |
| index_map | Map from input index to output index |
◆ SetDefaultGridPoints()
| void hops::MHO_UniformGridPointsCalculator::SetDefaultGridPoints |
( |
std::size_t |
n | ) |
|
|
inline |
Setter for default grid points.
- Parameters
-
| n | Input number of grid points |
◆ SetEpsilon()
| void hops::MHO_UniformGridPointsCalculator::SetEpsilon |
( |
double |
eps | ) |
|
|
inline |
Setter for epsilon.
- Parameters
-
| eps | Input epsilon value of type double |
◆ SetPoints() [1/2]
| void hops::MHO_UniformGridPointsCalculator::SetPoints |
( |
const double * |
pts, |
|
|
std::size_t |
npts |
|
) |
| |
Setter for points - expects points to be given in increasing order.
- Parameters
-
| pts | Input vector of double values representing grid points |
◆ SetPoints() [2/2]
| void hops::MHO_UniformGridPointsCalculator::SetPoints |
( |
const std::vector< double > & |
pts | ) |
|
Setter for points - expects points to be given in increasing order.
- Parameters
-
◆ fAbsEps
| double hops::MHO_UniformGridPointsCalculator::fAbsEps |
|
protected |
◆ fAverageLocation
| double hops::MHO_UniformGridPointsCalculator::fAverageLocation |
|
protected |
◆ fDefaultGridPoints
| int hops::MHO_UniformGridPointsCalculator::fDefaultGridPoints |
|
protected |
◆ fEpsilon
| double hops::MHO_UniformGridPointsCalculator::fEpsilon |
|
protected |
◆ fIndexMap
| std::map< std::size_t, std::size_t > hops::MHO_UniformGridPointsCalculator::fIndexMap |
|
protected |
◆ fMaxSpacing
| double hops::MHO_UniformGridPointsCalculator::fMaxSpacing |
|
protected |
◆ fMinSpacing
| double hops::MHO_UniformGridPointsCalculator::fMinSpacing |
|
protected |
◆ fNGridPoints
| double hops::MHO_UniformGridPointsCalculator::fNGridPoints |
|
protected |
◆ fPoints
| std::vector< double > hops::MHO_UniformGridPointsCalculator::fPoints |
|
protected |
◆ fSpacing
| double hops::MHO_UniformGridPointsCalculator::fSpacing |
|
protected |
◆ fSpacingError
| bool hops::MHO_UniformGridPointsCalculator::fSpacingError |
|
protected |
◆ fSpread
| double hops::MHO_UniformGridPointsCalculator::fSpread |
|
protected |
◆ fStart
| double hops::MHO_UniformGridPointsCalculator::fStart |
|
protected |
The documentation for this class was generated from the following files: