Template Class ValueGrid2

Inheritance Relationships

Base Type

Class Documentation

template<typename T>
class ValueGrid2 : public beluga::BaseLinearGrid2<ValueGrid2<T>>

Generic 2D linear value grid.

Template Parameters:

T – Any copyable type.

Public Functions

inline explicit ValueGrid2(std::vector<T> data, std::size_t width, double resolution = 1.)

Constructs the grid.

Parameters:
  • data – Grid data.

  • width – Grid width. Must evenly divide data size.

  • resolution – Grid resolution.

inline std::size_t width() const

Gets grid width.

inline std::size_t height() const

Gets grid height.

inline double resolution() const

Gets grid resolution.

inline std::size_t size() const

Gets grid size (ie. number of grid cells).

inline const std::vector<T> &data() const

Gets grid data.