Chemical Data Processing Library C++ API - Version 1.2.0
RegularGrid.hpp
Go to the documentation of this file.
1 /*
2  * RegularGrid.hpp
3  *
4  * Copyright (C) 2003 Thomas Seidel <thomas.seidel@univie.ac.at>
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Lesser General Public
8  * License as published by the Free Software Foundation; either
9  * version 2 of the License, or (at your option) any later version.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  * Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public License
17  * along with this library; see the file COPYING. If not, write to
18  * the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
19  * Boston, MA 02111-1307, USA.
20  */
21 
27 #ifndef CDPL_GRID_REGULARGRID_HPP
28 #define CDPL_GRID_REGULARGRID_HPP
29 
30 #include <memory>
31 
34 
35 
36 namespace CDPL
37 {
38 
39  namespace Grid
40  {
41 
45  template <typename T, typename CVT = T>
46  class RegularGrid : public SpatialGrid<T, CVT>,
47  public Math::RegularSpatialGrid<T, CVT>
48  {
49 
50  public:
51  typedef std::shared_ptr<RegularGrid> SharedPointer;
56 
58  Math::RegularSpatialGrid<T, CVT>(xs, ys, zs) {}
59 
61  Math::RegularSpatialGrid<T, CVT>(data, xs, ys, zs) {}
62 
64  Math::RegularSpatialGrid<T, CVT>(s) {}
65 
67  Math::RegularSpatialGrid<T, CVT>(data, s) {}
68 
70 
72 
73  ValueType& operator()(std::size_t i)
74  {
76  }
77 
78  const ValueType& operator()(std::size_t i) const
79  {
81  }
82 
83  std::size_t getNumElements() const
84  {
86  }
87 
88  void getCoordinates(std::size_t i, CoordinatesType& coords) const
89  {
91  }
92 
93  bool isEmpty() const
94  {
96  }
97  };
98 
101  } // namespace Grid
102 } // namespace CDPL
103 
104 #endif // CDPL_GRID_REGULARGRID_HPP
Definition of a regular spatial grid data type.
Definition of a spatial grid data type.
RegularGrid.
Definition: RegularGrid.hpp:48
Math::RegularSpatialGrid< T, CVT >::GridDataType GridDataType
Definition: RegularGrid.hpp:55
RegularGrid(const GridDataType &data, const CoordinatesValueType &xs, const CoordinatesValueType &ys, const CoordinatesValueType &zs)
Definition: RegularGrid.hpp:60
ValueType & operator()(std::size_t i)
Definition: RegularGrid.hpp:73
SpatialGrid< T, CVT >::CoordinatesType CoordinatesType
Definition: RegularGrid.hpp:54
bool isEmpty() const
Definition: RegularGrid.hpp:93
std::shared_ptr< RegularGrid > SharedPointer
Definition: RegularGrid.hpp:51
RegularGrid(const GridDataType &data, const CoordinatesValueType &s)
Definition: RegularGrid.hpp:66
void getCoordinates(std::size_t i, CoordinatesType &coords) const
Definition: RegularGrid.hpp:88
RegularGrid(const CoordinatesValueType &xs, const CoordinatesValueType &ys, const CoordinatesValueType &zs)
Definition: RegularGrid.hpp:57
SpatialGrid< T, CVT >::ValueType ValueType
Definition: RegularGrid.hpp:52
std::size_t getNumElements() const
Definition: RegularGrid.hpp:83
const ValueType & operator()(std::size_t i) const
Definition: RegularGrid.hpp:78
RegularGrid(const CoordinatesValueType &s)
Definition: RegularGrid.hpp:63
SpatialGrid< T, CVT >::CoordinatesValueType CoordinatesValueType
Definition: RegularGrid.hpp:53
SpatialGrid.
Definition: SpatialGrid.hpp:47
T ValueType
Definition: SpatialGrid.hpp:51
CVT CoordinatesValueType
Definition: SpatialGrid.hpp:52
Definition: Vector.hpp:1053
Definition: RegularSpatialGrid.hpp:83
bool isEmpty() const
Definition: RegularSpatialGrid.hpp:387
RegularSpatialGrid(const CoordinatesValueType &xs, const CoordinatesValueType &ys, const CoordinatesValueType &zs)
Definition: RegularSpatialGrid.hpp:111
SizeType getSize() const
Definition: RegularSpatialGrid.hpp:183
GD GridDataType
Definition: RegularSpatialGrid.hpp:97
void getCoordinates(SizeType i, V &coords) const
Definition: RegularSpatialGrid.hpp:278
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
Definition: DRegularGridReader.hpp:42
RegularGrid< float > FRegularGrid
Definition: RegularGrid.hpp:99
The namespace of the Chemical Data Processing Library.