Chemical Data Processing Library C++ API - Version 1.1.1
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
CDPL::Grid::RegularGrid::CoordinatesType
SpatialGrid< T, CVT >::CoordinatesType CoordinatesType
Definition: RegularGrid.hpp:54
CDPL::Math::RegularSpatialGrid::getSize
SizeType getSize() const
Definition: RegularSpatialGrid.hpp:184
CDPL::Grid::RegularGrid::operator()
const ValueType & operator()(std::size_t i) const
Definition: RegularGrid.hpp:78
CDPL::Math::GridExpression< RegularSpatialGrid< T, typename TypeTraits< T >::RealType, Grid< T >, CMatrix< typename TypeTraits< T >::RealType, 4, 4 > > >::operator()
const ExpressionType & operator()() const
Definition: Expression.hpp:125
CDPL::Grid::RegularGrid::getNumElements
std::size_t getNumElements() const
Definition: RegularGrid.hpp:83
CDPL::Grid::RegularGrid::GridDataType
Math::RegularSpatialGrid< T, CVT >::GridDataType GridDataType
Definition: RegularGrid.hpp:55
CDPL::Grid::RegularGrid::operator()
ValueType & operator()(std::size_t i)
Definition: RegularGrid.hpp:73
CDPL::Grid::RegularGrid::RegularGrid
RegularGrid(const CoordinatesValueType &s)
Definition: RegularGrid.hpp:63
RegularSpatialGrid.hpp
Definition of a regular spatial grid data type.
SpatialGrid.hpp
Definition of a spatial grid data type.
CDPL::Grid::RegularGrid::ValueType
SpatialGrid< T, CVT >::ValueType ValueType
Definition: RegularGrid.hpp:52
CDPL::Math::RegularSpatialGrid::getCoordinates
void getCoordinates(SizeType i, V &coords) const
Definition: RegularSpatialGrid.hpp:279
CDPL::Math::RegularSpatialGrid
Definition: RegularSpatialGrid.hpp:84
CDPL::Grid::SpatialGrid::ValueType
T ValueType
Definition: SpatialGrid.hpp:51
CDPL::Math::CVector
Definition: Vector.hpp:1053
CDPL::Grid::SpatialGrid
SpatialGrid.
Definition: SpatialGrid.hpp:47
CDPL::Grid::RegularGrid::getCoordinates
void getCoordinates(std::size_t i, CoordinatesType &coords) const
Definition: RegularGrid.hpp:88
CDPL::Grid::RegularGrid::RegularGrid
RegularGrid(const GridDataType &data, const CoordinatesValueType &xs, const CoordinatesValueType &ys, const CoordinatesValueType &zs)
Definition: RegularGrid.hpp:60
CDPL::Chem::AtomType::T
const unsigned int T
Specifies Hydrogen (Tritium).
Definition: AtomType.hpp:67
CDPL::Chem::CIPDescriptor::s
const unsigned int s
Specifies that the stereocenter has s configuration.
Definition: CIPDescriptor.hpp:81
CDPL::Grid::DRegularGrid
RegularGrid< double > DRegularGrid
Definition: DRegularGridReader.hpp:42
CDPL::Grid::FRegularGrid
RegularGrid< float > FRegularGrid
Definition: RegularGrid.hpp:99
CDPL
The namespace of the Chemical Data Processing Library.
CDPL::Grid::RegularGrid
RegularGrid.
Definition: RegularGrid.hpp:48
CDPL::Grid::RegularGrid::SharedPointer
std::shared_ptr< RegularGrid > SharedPointer
Definition: RegularGrid.hpp:51
CDPL::Grid::RegularGrid::RegularGrid
RegularGrid(const CoordinatesValueType &xs, const CoordinatesValueType &ys, const CoordinatesValueType &zs)
Definition: RegularGrid.hpp:57
CDPL::Math::Grid< T >
CDPL::Grid::SpatialGrid::CoordinatesValueType
CVT CoordinatesValueType
Definition: SpatialGrid.hpp:52
CDPL::Grid::RegularGrid::RegularGrid
RegularGrid(const GridDataType &data, const CoordinatesValueType &s)
Definition: RegularGrid.hpp:66
CDPL::Math::RegularSpatialGrid::isEmpty
bool isEmpty() const
Definition: RegularSpatialGrid.hpp:388
CDPL::Grid::RegularGrid::isEmpty
bool isEmpty() const
Definition: RegularGrid.hpp:93
CDPL::Grid::RegularGrid::CoordinatesValueType
SpatialGrid< T, CVT >::CoordinatesValueType CoordinatesValueType
Definition: RegularGrid.hpp:53