26 [[nodiscard]]
const GridType&
grid()
const {
31 [[nodiscard]]
const std::vector<ValueType>&
values()
const {
46 return static_cast<int>(
values_.size());
Mixin for functions defined on a discrete grid of points.
const GridType & grid() const
Access the grid this function is defined on.
const ValueType & value_at_index(int index) const
Access a single value by grid point index.
int number_of_grid_points() const
Number of grid points.
std::vector< ValueType > values_
ValueType & value_at_index(int index)
const std::vector< ValueType > & values() const
Access all values on the grid.