Celeritas  0.5.0-56+6b053cd
Public Types | Public Member Functions | Static Public Member Functions | List of all members
celeritas::GenericCalculator Class Reference

Find and interpolate real numbers on a nonuniform grid. More...

#include <GenericCalculator.hh>

Public Types

using Reals = Collection< real_type, Ownership::const_reference, MemSpace::native >
 Type aliases.
 
using Grid = NonuniformGrid< real_type >
 

Public Member Functions

CELER_FUNCTION GenericCalculator (GenericGridRecord const &grid, Reals const &storage)
 Construct from grid data and backend storage.
 
CELER_FUNCTION real_type operator() (real_type x) const
 Calculate the y value at the given x value.
 
CELER_FUNCTION real_type operator[] (size_type index) const
 Get the tabulated y value at a particular index.
 
CELER_FUNCTION Grid const & grid () const
 Get the tabulated x values.
 
CELER_FUNCTION GenericCalculator make_inverse () const
 Make a calculator with x and y flipped. More...
 

Static Public Member Functions

static CELER_FUNCTION GenericCalculator from_inverse (GenericGridRecord const &grid, Reals const &storage)
 Construct by inverting a monotonicially increasing generic grid.
 

Detailed Description

Find and interpolate real numbers on a nonuniform grid.

The end points of the grid are extrapolated outward as constant values.

Member Function Documentation

◆ make_inverse()

CELER_FUNCTION GenericCalculator celeritas::GenericCalculator::make_inverse ( ) const
inline

Make a calculator with x and y flipped.

Precondition
The y values must be monotonic increasing.

The documentation for this class was generated from the following file: