27 #ifndef CDPL_GRID_REGULARGRID_HPP
28 #define CDPL_GRID_REGULARGRID_HPP
52 template <
typename T,
typename CVT = T>
Definition of a regular spatial grid data type.
Definition of a spatial grid data type.
Implementation of the Grid::SpatialGrid interface for regular spatial grids.
Definition: RegularGrid.hpp:55
Math::RegularSpatialGrid< T, CVT >::GridDataType GridDataType
Definition: RegularGrid.hpp:65
RegularGrid(const GridDataType &data, const CoordinatesValueType &xs, const CoordinatesValueType &ys, const CoordinatesValueType &zs)
Constructs a RegularGrid initialized from data, with the given grid spacing in x, y and z direction.
Definition: RegularGrid.hpp:83
ValueType & operator()(std::size_t i)
Returns a reference to the grid element at linear index i.
Definition: RegularGrid.hpp:110
SpatialGrid< T, CVT >::CoordinatesType CoordinatesType
Definition: RegularGrid.hpp:64
bool isEmpty() const
Tells whether the grid is empty.
Definition: RegularGrid.hpp:148
std::shared_ptr< RegularGrid > SharedPointer
A reference-counted smart pointer [SHPTR] for dynamically allocated RegularGrid instances.
Definition: RegularGrid.hpp:61
RegularGrid(const GridDataType &data, const CoordinatesValueType &s)
Constructs a RegularGrid initialized from data with isotropic grid spacing.
Definition: RegularGrid.hpp:98
void getCoordinates(std::size_t i, CoordinatesType &coords) const
Returns the 3D coordinates of the grid element at linear index i.
Definition: RegularGrid.hpp:139
RegularGrid(const CoordinatesValueType &xs, const CoordinatesValueType &ys, const CoordinatesValueType &zs)
Constructs an empty RegularGrid with the given grid spacing in x, y and z direction.
Definition: RegularGrid.hpp:73
SpatialGrid< T, CVT >::ValueType ValueType
Definition: RegularGrid.hpp:62
std::size_t getNumElements() const
Returns the total number of grid elements.
Definition: RegularGrid.hpp:129
const ValueType & operator()(std::size_t i) const
Returns a const reference to the grid element at linear index i.
Definition: RegularGrid.hpp:120
RegularGrid(const CoordinatesValueType &s)
Constructs an empty RegularGrid with isotropic grid spacing.
Definition: RegularGrid.hpp:90
SpatialGrid< T, CVT >::CoordinatesValueType CoordinatesValueType
Definition: RegularGrid.hpp:63
Abstract base class for attributed grids whose elements have a defined 3D position in space.
Definition: SpatialGrid.hpp:53
T ValueType
The grid element value type.
Definition: SpatialGrid.hpp:59
CVT CoordinatesValueType
The coordinate value type.
Definition: SpatialGrid.hpp:61
Fixed-size vector of dimension N backed by a C-array (no dynamic allocation).
Definition: Vector.hpp:1876
const ExpressionType & operator()() const
Returns a const reference to the derived grid expression.
Definition: Expression.hpp:190
3D grid data structure combining a Math::Grid data store with a coordinate-system transformation that...
Definition: RegularSpatialGrid.hpp:127
bool isEmpty() const
Tells whether the grid is empty (zero cells along any dimension).
Definition: RegularSpatialGrid.hpp:599
RegularSpatialGrid(const CoordinatesValueType &xs, const CoordinatesValueType &ys, const CoordinatesValueType &zs)
Constructs an empty grid with anisotropic per-axis step sizes.
Definition: RegularSpatialGrid.hpp:167
SizeType getSize() const
Returns the total number of cells of the grid.
Definition: RegularSpatialGrid.hpp:284
GD GridDataType
The underlying grid data container type.
Definition: RegularSpatialGrid.hpp:137
void getCoordinates(SizeType i, V &coords) const
Writes the world-space 3D position of the cell with linear index i into coords.
Definition: RegularSpatialGrid.hpp:440
constexpr unsigned int T
Specifies Hydrogen (Tritium).
Definition: AtomType.hpp:67
constexpr unsigned int s
Specifies that the stereocenter has s configuration.
Definition: CIPDescriptor.hpp:81
RegularGrid< double > DRegularGrid
A regular spatial grid storing double-precision floating-point values.
Definition: DRegularGridReader.hpp:42
RegularGrid< float > FRegularGrid
A regular spatial grid storing single-precision floating-point values.
Definition: RegularGrid.hpp:157
The namespace of the Chemical Data Processing Library.