Specialized version of TimeVaryingVolumetricGridLookupField
for in-memory lookup. It loads the whole dataset into memory.
More...
#include <TimeVaryingVolumetricGridLookupField.hh>
Public Member Functions | |
TimeVaryingVolumetricGridLookupField () | |
Default constructor. More... | |
void | AddVolumetricGridField (const T &_time, const VolumetricGridLookupField< V > &_field) |
Documentation inherited. More... | |
std::pair< Vector3< V >, Vector3< V > > | Bounds (const InMemorySession< T, V > &_session) const |
Get the bounds of this grid field. More... | |
InMemorySession< T, V > | CreateSession () const |
Documentation inherited. More... | |
InMemorySession< T, V > | CreateSession (const T &_time) const |
Documentation inherited. More... | |
template<typename X > | |
std::optional< X > | EstimateQuadrilinear (const InMemorySession< T, V > &_session, const std::vector< InterpolationPoint4D< T, V >> &_interpolators, const std::vector< X > &_values1, const std::vector< X > &_values2, const Vector3< X > &_position, const X _default=X(0)) const |
Uses quadrilinear interpolation to estimate value of current point. Returns nullopt if query is out of range. More... | |
bool | IsValid (const InMemorySession< T, V > &_session) const |
In memory session. More... | |
std::vector< InterpolationPoint4D< T, V > > | LookUp (const InMemorySession< T, V > &_session, const Vector3< V > &_point, const Vector3< V > &_tol=Vector3< V >{1e-6, 1e-6, 1e-6}) const |
Documentation inherited. More... | |
std::optional< InMemorySession< T, V > > | StepTo (const InMemorySession< T, V > &_session, const T &_time) const |
Documentation inherited. More... | |
Detailed Description
template<typename T, typename V>
class gz::math::TimeVaryingVolumetricGridLookupField< T, V, InMemorySession< T, V > >
Specialized version of TimeVaryingVolumetricGridLookupField
for in-memory lookup. It loads the whole dataset into memory.
Constructor & Destructor Documentation
◆ TimeVaryingVolumetricGridLookupField()
|
inline |
Default constructor.
Member Function Documentation
◆ AddVolumetricGridField()
|
inline |
Documentation inherited.
◆ Bounds()
|
inline |
Get the bounds of this grid field.
- Returns
- A pair of vectors. All zeros if session is invalid.
◆ CreateSession() [1/2]
|
inline |
Documentation inherited.
References InMemorySession< T, V >::time.
◆ CreateSession() [2/2]
|
inline |
Documentation inherited.
References InMemorySession< T, V >::time.
◆ EstimateQuadrilinear()
|
inline |
Uses quadrilinear interpolation to estimate value of current point. Returns nullopt if query is out of range.
- Parameters
-
[in] _session - The session [in] _interpolators - The interpolation points retrieved from LookUp()
[in] _values1 - Value array at timestep 1. [in] _values2 - Value array at timestep 2. [in] _position - The position to be queried. [in] _default - Value used if there is a hole in the data.
- Returns
- The estimated value for the point. Nullopt if we are outside the field. Default value if in the field but no value is in the index.
Got nothing to interpolate. Out of bounds.
Only one of the two time-slices has data. Use that slice to guess.
Default case where both time-slices has interpolation
References std::next(), and InMemorySession< T, V >::time.
◆ IsValid()
|
inline |
In memory session.
◆ LookUp()
|
inline |
Documentation inherited.
◆ StepTo()
|
inline |
Documentation inherited.
References std::next(), and InMemorySession< T, V >::time.
The documentation for this class was generated from the following file: