Loading...
Searching...
No Matches
q3::OnGridFunctionMixin< GridType, ValueType > Class Template Reference

Mixin for functions defined on a discrete grid of points. More...

#include <on_grid_function_mixin.hpp>

Public Member Functions

const GridType & grid () const
 Access the grid this function is defined on.
 
int number_of_grid_points () const
 Number of grid points.
 
ValueType & value_at_index (int index)
 
const ValueType & value_at_index (int index) const
 Access a single value by grid point index.
 
const std::vector< ValueType > & values () const
 Access all values on the grid.
 

Protected Attributes

GridType grid_
 
std::vector< ValueType > values_
 

Detailed Description

template<typename GridType, typename ValueType>
class q3::OnGridFunctionMixin< GridType, ValueType >

Mixin for functions defined on a discrete grid of points.

Definition at line 23 of file on_grid_function_mixin.hpp.

Member Function Documentation

◆ grid()

template<typename GridType , typename ValueType >
const GridType & q3::OnGridFunctionMixin< GridType, ValueType >::grid ( ) const
inline

Access the grid this function is defined on.

Definition at line 26 of file on_grid_function_mixin.hpp.

References q3::OnGridFunctionMixin< GridType, ValueType >::grid_.

◆ number_of_grid_points()

template<typename GridType , typename ValueType >
int q3::OnGridFunctionMixin< GridType, ValueType >::number_of_grid_points ( ) const
inline

Number of grid points.

Definition at line 45 of file on_grid_function_mixin.hpp.

References q3::OnGridFunctionMixin< GridType, ValueType >::values_.

◆ value_at_index() [1/2]

template<typename GridType , typename ValueType >
ValueType & q3::OnGridFunctionMixin< GridType, ValueType >::value_at_index ( int  index)
inline

◆ value_at_index() [2/2]

template<typename GridType , typename ValueType >
const ValueType & q3::OnGridFunctionMixin< GridType, ValueType >::value_at_index ( int  index) const
inline

Access a single value by grid point index.

Definition at line 36 of file on_grid_function_mixin.hpp.

References q3::OnGridFunctionMixin< GridType, ValueType >::values_.

◆ values()

template<typename GridType , typename ValueType >
const std::vector< ValueType > & q3::OnGridFunctionMixin< GridType, ValueType >::values ( ) const
inline

Access all values on the grid.

Definition at line 31 of file on_grid_function_mixin.hpp.

References q3::OnGridFunctionMixin< GridType, ValueType >::values_.

Member Data Documentation

◆ grid_

template<typename GridType , typename ValueType >
GridType q3::OnGridFunctionMixin< GridType, ValueType >::grid_
protected

◆ values_


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