MeVisLab Toolbox Reference
mlVector9.h
Go to the documentation of this file.
1 /*************************************************************************************
2 **
3 ** Copyright 2007, MeVis Medical Solutions AG
4 **
5 ** The user may use this file in accordance with the license agreement provided with
6 ** the Software or, alternatively, in accordance with the terms contained in a
7 ** written agreement between the user and MeVis Medical Solutions AG.
8 **
9 ** For further information use the contact form at https://www.mevislab.de/contact
10 **
11 **************************************************************************************/
12 
13 #ifndef ML_VECTOR9_H
14 #define ML_VECTOR9_H
15 
17 
18 // Include system independent file and project settings.
19 #include "mlLinearAlgebraSystem.h"
20 #include "mlLinearAlgebraDefs.h"
21 #include "mlFloatingPointVector.h"
22 
23 // All declarations of this header will be in the ML_LA_NAMESPACE namespace.
24 ML_LA_START_NAMESPACE
25 
26 //--------------------------------------------------------------------
28 //--------------------------------------------------------------------
30 template <class DT>
31 class Tvec9 : public FloatingPointVector<DT,9>
32 {
33 public:
34 
37 
39  typedef DT ComponentType;
40 
41  //--------------------------------------------------------------------
44  //--------------------------------------------------------------------
47  inline explicit Tvec9(const DT value=0) : Superclass(value)
48  {
49  }
50 
54  inline Tvec9(const Superclass &v) : Superclass(v)
55  {
56  }
57 
60  inline Tvec9(const DT x, const DT y, const DT z, const DT c,
61  const DT t, const DT u, const DT v, const DT w,
62  const DT a)
63  {
64  assign(x,y,z,c,t,u,v,w,a);
65  }
67 
68  //--------------------------------------------------------------------
71  //--------------------------------------------------------------------
73  inline void assign(const DT x, const DT y, const DT z, const DT c,
74  const DT t, const DT u, const DT v, const DT w,
75  const DT a)
76  {
77  Superclass::_buffer[0] = x;
78  Superclass::_buffer[1] = y;
79  Superclass::_buffer[2] = z;
80  Superclass::_buffer[3] = c;
81  Superclass::_buffer[4] = t;
82  Superclass::_buffer[5] = u;
83  Superclass::_buffer[6] = v;
84  Superclass::_buffer[7] = w;
85  Superclass::_buffer[8] = a;
86  }
88 };
89 
90 
91 //-----------------------------------------------------------------------------------
94 //-----------------------------------------------------------------------------------
104 
105 
106 #if ML_DEPRECATED_SINCE(3,5,0)
111 ML_DEPRECATED typedef Tvec9<MLfloat> vecf9;
114 ML_DEPRECATED typedef Tvec9<MLdouble> vecd9;
117 ML_DEPRECATED typedef Tvec9<MLldouble> vecld9;
120 ML_DEPRECATED typedef Tvec9<MLdouble> vec9;
122 
123 #endif
124 
125 
126 ML_LA_END_NAMESPACE
127 
128 #endif //of __mlVector9_H
129 
130 
131 
#define ML_DEPRECATED
Definition: CSOGroup.h:371
Template class for vector arithmetic with floating point data types.
An nine dimensional vector class for floating point types.
Definition: mlVector9.h:32
FloatingPointVector< DT, 9 > Superclass
A typedef as a shorthand for the base class.
Definition: mlVector9.h:36
DT ComponentType
A typedef to "export" the type of components.
Definition: mlVector9.h:39
Tvec9(const DT value=0)
Default and value constructor.
Definition: mlVector9.h:47
Tvec9(const DT x, const DT y, const DT z, const DT c, const DT t, const DT u, const DT v, const DT w, const DT a)
Builds the vector from the scalars x, y, z, c, t, u, v and w to the components 0 to 8,...
Definition: mlVector9.h:60
Tvec9(const Superclass &v)
Copy constructor from FloatingPointVector.
Definition: mlVector9.h:54
void assign(const DT x, const DT y, const DT z, const DT c, const DT t, const DT u, const DT v, const DT w, const DT a)
Sets all components to the passed values.
Definition: mlVector9.h:73
Tvec9< MLfloat > Vector9f
A vector with 9 components of type float.
Definition: mlVector9.h:96
Tvec9< MLdouble > Vector9
A vector with 9 components of type double.
Definition: mlVector9.h:102
Tvec9< MLldouble > Vector9ld
A vector with 9 components of type long double.
Definition: mlVector9.h:100
Tvec9< MLdouble > Vector9d
A vector with 9 components of type double.
Definition: mlVector9.h:98