Mass++ Common Libraries v2.7.5
 All Classes Namespaces Files Functions Variables Enumerations Macros
Vector.h
Go to the documentation of this file.
1 
11 #ifndef __KOME_CORE_VECTOR_H__
12 #define __KOME_CORE_VECTOR_H__
13 
14 
15 namespace kome {
16  namespace core {
17 
22  class CORE_TOOLKITS_CLASS Vector {
23  public:
29  Vector( const unsigned int dim );
30 
36  Vector( const Vector& v );
37 
42  virtual ~Vector();
43 
44  protected:
46  const unsigned int m_dim;
48  double* const m_array;
49 
50  public:
56  unsigned int getDimention();
57 
58  public:
64  double norm();
65 
72  double dot( const Vector& v );
73 
80  Vector cross( const Vector& v );
81 
82  public:
89  Vector operator=( const Vector& v );
90 
97  double& operator()( const unsigned int index );
98 
105  Vector& operator+=( const Vector& v );
106 
113  Vector& operator-=( const Vector& v );
114 
121  Vector& operator*=( const double k );
122 
129  Vector& operator/=( const double k );
130 
137  Vector operator+( const Vector& v );
138 
145  Vector operator-( const Vector& v );
146 
153  Vector operator*( const double k );
154 
161  Vector operator/( const double k );
162 
163 
164  };
165  }
166 }
167 
168 
169 #endif // __KOME_CORE_VECTOR_H__
vector class
Definition: Vector.h:22
const unsigned int m_dim
Definition: Vector.h:46
double *const m_array
Definition: Vector.h:48