Chemical Data Processing Library C++ API - Version 1.4.0
VectorArray.hpp
Go to the documentation of this file.
1 /*
2  * VectorArray.hpp
3  *
4  * This file is part of the Chemical Data Processing Toolkit
5  *
6  * Copyright (C) 2003 Thomas Seidel <thomas.seidel@univie.ac.at>
7  *
8  * This library is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU Lesser General Public
10  * License as published by the Free Software Foundation; either
11  * version 2 of the License, or (at your option) any later version.
12  *
13  * This library is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16  * Lesser General Public License for more details.
17  *
18  * You should have received a copy of the GNU Lesser General Public License
19  * along with this library; see the file COPYING. If not, write to
20  * the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
21  * Boston, MA 02111-1307, USA.
22  */
23 
29 #ifndef CDPL_MATH_VECTORARRAY_HPP
30 #define CDPL_MATH_VECTORARRAY_HPP
31 
32 #include <memory>
33 
34 #include "CDPL/Math/Vector.hpp"
35 #include "CDPL/Util/Array.hpp"
36 
37 
38 namespace CDPL
39 {
40 
41  namespace Math
42  {
43 
47  template <typename V>
48  class VectorArray : public Util::Array<V>
49  {
50 
51  public:
53  typedef V ValueType;
54 
58  typedef std::shared_ptr<VectorArray> SharedPointer;
59 
60  private:
61  const char* getClassName() const
62  {
63  return "VectorArray";
64  }
65  };
66 
71 
76 
81 
86 
91 
96 
101 
106  } // namespace Math
107 } // namespace CDPL
108 
109 #endif // CDPL_MATH_VECTORARRAY_HPP
Definition of class CDPL::Util::Array.
Definition of vector data types.
Array data type for the ordered storage of vector objects.
Definition: VectorArray.hpp:49
V ValueType
The vector element value type stored in the array.
Definition: VectorArray.hpp:53
std::shared_ptr< VectorArray > SharedPointer
A reference-counted smart pointer [SHPTR] for dynamically allocated VectorArray instances.
Definition: VectorArray.hpp:58
Dynamic array class providing amortized constant time access to arbitrary elements.
Definition: Array.hpp:92
constexpr unsigned int V
Specifies Vanadium.
Definition: AtomType.hpp:177
VectorArray< Vector2F > Vector2FArray
Array storing vectors of type Math::Vector2F.
Definition: VectorArray.hpp:70
VectorArray< Vector3D > Vector3DArray
Array storing vectors of type Math::Vector3D.
Definition: VectorArray.hpp:85
VectorArray< Vector2L > Vector2LArray
Array storing vectors of type Math::Vector2L.
Definition: VectorArray.hpp:90
VectorArray< Vector2UL > Vector2ULArray
Array storing vectors of type Math::Vector2UL.
Definition: VectorArray.hpp:100
VectorArray< Vector3F > Vector3FArray
Array storing vectors of type Math::Vector3F.
Definition: VectorArray.hpp:75
VectorArray< Vector2D > Vector2DArray
Array storing vectors of type Math::Vector2D.
Definition: VectorArray.hpp:80
VectorArray< Vector3L > Vector3LArray
Array storing vectors of type Math::Vector3L.
Definition: VectorArray.hpp:95
VectorArray< Vector3UL > Vector3ULArray
Array storing vectors of type Math::Vector3UL.
Definition: VectorArray.hpp:105
The namespace of the Chemical Data Processing Library.