fmatvec 0.0.0

fmatvec.h
1 /* Copyright (C) 2003-2005 Martin Förg
2
3 * This library is free software; you can redistribute it and/or
4 * modify it under the terms of the GNU Lesser General Public
5 * License as published by the Free Software Foundation; either
6 * version 2.1 of the License, or (at your option) any later version.
7 *
8 * This library is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 * Lesser General Public License for more details.
12 *
13 * You should have received a copy of the GNU Lesser General Public
14 * License along with this library; if not, write to the Free Software
15 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
16 *
17 * Contact:
18 * martin.o.foerg@googlemail.com
19 *
20 */
21
22 #ifndef fmatrixvector_h
23 #define fmatrixvector_h
24
25 #include "linear_algebra.h"
26 #include "linear_algebra_double.h"
27
28 namespace fmatvec {
29
30 class General;
31 class Ref;
32 class Diagonal;
33 class Symmetric;
34 class GeneralBand;
35 class Sparse;
36 class SymmetricSparse;
37 class Rotation;
38 class Var;
39 template<int N> class Fixed;
40
41 template<class Type, class Row, class Col, class AT>
42 class Matrix;
43
44 template<class Type, class AT>
45 class SquareMatrix;
46
47 template<class Row, class AT>
48 class Vector;
49
50 template<class Col, class AT>
51 class RowVector;
52
58 using Mat = Matrix<General, Ref, Ref, double>;
59
65 using Vec = Vector<Ref, double>;
66
72 using RowVec = RowVector<Ref, double>;
73
79 using SqrMat = SquareMatrix<Ref, double>;
80
86 using DiagMat = Matrix<Diagonal, Ref, Ref, double>;
87
93 using SymMat = Matrix<Symmetric, Ref, Ref, double>;
94
100 using BandMat = Matrix<GeneralBand, Ref, Ref, double>;
101
102 using SparseMat = Matrix<Sparse, Ref, Ref, double>;
103
104 using SymSparseMat = Matrix<SymmetricSparse, Ref, Ref, double>;
105
106 using VecInt = Vector<Ref, int>;
107 using VecVI = Vector<Var, int>;
108
109 /* Typedefs for Fixed types */
110
111 //Column Vectors
112 using Vec1 = Vector<Fixed<1>, double>;
113 using Vec2 = Vector<Fixed<2>, double>;
114 using Vec2I = Vector<Fixed<2>, int>;
115 using Vec3 = Vector<Fixed<3>, double>;
116 using Vec4 = Vector<Fixed<4>, double>;
117
118 using Vec11 = Vector<Fixed<11>, double>;
119 using Vec16 = Vector<Fixed<16>, double>;
120
121 //Row Vectors
122 using RowVec1 = RowVector<Fixed<1>, double>;
123 using RowVec2 = RowVector<Fixed<2>, double>;
124 using RowVec3 = RowVector<Fixed<3>, double>;
125 using RowVec4 = RowVector<Fixed<4>, double>;
126
127 using RowVec11 = RowVector<Fixed<11>, double>;
128 using RowVec16 = RowVector<Fixed<16>, double>;
129
130 //General Matrices
131 using Mat3x3 = Matrix<General, Fixed<3>, Fixed<3>, double>;
132 using Mat3x2 = Matrix<General, Fixed<3>, Fixed<2>, double>;
133 using Mat3x11 = Matrix<General, Fixed<3>, Fixed<11>, double>;
134 using Mat3x16 = Matrix<General, Fixed<3>, Fixed<16>, double>;
135
136 using Mat4x16 = Matrix<General, Fixed<4>, Fixed<16>, double>;
137
138 using Mat16x3 = Matrix<General, Fixed<16>, Fixed<3>, double>;
139 using Mat16x4 = Matrix<General, Fixed<16>, Fixed<4>, double>;
140
141 //Square Matrices
142 using SqrMat1 = SquareMatrix<Fixed<1>, double>;
143 using SqrMat2 = SquareMatrix<Fixed<2>, double>;
144 using SqrMat3 = SquareMatrix<Fixed<3>, double>;
145 using SqrMat11 = SquareMatrix<Fixed<11>, double>;
146 using SqrMat16 = SquareMatrix<Fixed<16>, double>;
147
148 //Symmetric Matrices
149 using SymMat3 = Matrix<Symmetric, Fixed<3>, Fixed<3>, double>;
150 using SymMat4 = Matrix<Symmetric, Fixed<4>, Fixed<4>, double>;
151
152 using SymMatV = Matrix<Symmetric, Var, Var, double>;
153
154 using MatV = Matrix<General, Var, Var, double>;
155
156 using MatVI = Matrix<General, Var, Var, int>;
157
158 using SqrMatV = SquareMatrix<Var, double>;
159
160 using VecV = Vector<Var, double>;
161
162 using RowVecV = RowVector<Var, double>;
163 using RowVecVI = RowVector<Var, int>;
164
165 //Rotation Matrices
166 using RotMat3 = Matrix<Rotation, Fixed<3>, Fixed<3>, double>;
167
168 /*Typedefs for mixed size */
169
170 using Mat2xV = Matrix<General, Fixed<2>, Var, double>;
171 using MatVx2I = Matrix<General, Var, Fixed<2>, int>;
172 using Mat3xV = Matrix<General, Fixed<3>, Var, double>;
173 using Mat3xVI = Matrix<General, Fixed<3>, Var, int>;
174
175 using MatVx2 = Matrix<General, Var, Fixed<2>, double>;
176 using MatVx3 = Matrix<General, Var, Fixed<3>, double>;
177 using MatVx3I = Matrix<General, Var, Fixed<3>, int>;
178
179 using RangeV = Range<Var, Var>;
180
181 }
182
183 #endif
fmatvec::Fixed
Definition: fmatvec.h:39
fmatvec::Matrix
This is the basic matrix class for arbitrary matrices.
Definition: fmatvec.h:42
fmatvec::Var
Definition: types.h:101
fmatvec::RowVector
Definition: fmatvec.h:51
fmatvec::SquareMatrix
Definition: fmatvec.h:45
fmatvec::Vector
Definition: fmatvec.h:48
fmatvec
Namespace fmatvec.
Definition: _memory.cc:28
fmatvec::Range< Var, Var >
This is an index class for creating submatrices.
Definition: range.h:44