SheafSystem  0.0.0.0
antisymmetric_matrix_3x3.h
1 
2 //
3 // Copyright (c) 2014 Limit Point Systems, Inc.
4 //
5 // Licensed under the Apache License, Version 2.0 (the "License");
6 // you may not use this file except in compliance with the License.
7 // You may obtain a copy of the License at
8 //
9 // http://www.apache.org/licenses/LICENSE-2.0
10 //
11 // Unless required by applicable law or agreed to in writing, software
12 // distributed under the License is distributed on an "AS IS" BASIS,
13 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 // See the License for the specific language governing permissions and
15 // limitations under the License.
16 //
17 
18 // Interface for antisymmetric_matrix_3x3 classes.
19 
20 #ifndef ANTISYMMETRIC_MATRIX_3X3_H
21 #define ANTISYMMETRIC_MATRIX_3X3_H
22 
23 #ifndef SHEAF_DLL_SPEC_H
24 #include "SheafSystem/sheaf_dll_spec.h"
25 #endif
26 
27 #ifndef STD_IOSTREAM_H
28 #include "SheafSystem/std_iostream.h"
29 #endif
30 
31 namespace fiber_bundle
32 {
33 
34 template <typename T> class general_matrix_1x3;
35 template <typename T> class general_matrix_3x1;
36 template <typename T> class general_matrix_3x3;
37 template <typename T> class general_matrix_3x2;
38 
39 template <typename T> class at2_e3_row_dofs_type;
40 
41 //==============================================================================
42 //==============================================================================
43 
54 template <typename T>
56 {
57 public:
58 
62  operator at2_e3_row_dofs_type<T>& () const;
63 
67  static int number_of_rows();
68 
72  static int number_of_columns();
73 
77  static int d();
78 
83  T* operator[](int xrow);
84 
89  const T* operator[](int xrow) const;
90 
95  operator T* ();
96 
101  operator const T* () const;
102 
106  int row_index(int xrow) const;
107 
111  operator general_matrix_3x3<T> () const;
112 
116  general_matrix_1x3<T> row(int xrow) const;
117 
121  general_matrix_3x1<T> column(int xcolumn) const;
122 
127 
128  //============================================================================
129  //============================================================================
130 
134  void adjoint(general_matrix_3x3<T>& xresult) const;
135 
140 
144  void assign(const T& xscalar);
145 
149  void determinant(T& xresult) const;
150 
154  T determinant() const;
155 
159  void inverse(antisymmetric_matrix_3x3<T>& xresult) const;
160 
165 
170  bool is_positive_definite() const;
171 
175  void multiply(const T& xscalar, antisymmetric_matrix_3x3<T>& xresult) const;
176 
180  antisymmetric_matrix_3x3<T> multiply(const T& xscalar) const;
181 
185  void multiply(const general_matrix_3x1<T>& xother,
186  general_matrix_3x1<T>& xresult) const;
187 
192 
196  void multiply(const general_matrix_3x2<T>& xother,
197  general_matrix_3x2<T>& xresult) const;
198 
203 
207  void multiply(const general_matrix_3x3<T>& xother,
208  general_matrix_3x3<T>& xresult) const;
209 
214 
220  void multiply(const antisymmetric_matrix_3x3<T>& xother,
221  general_matrix_3x3<T>& xresult) const;
222 
229 
233  void trace(T& xresult) const;
234 
238  T trace() const;
239 
243  void transpose(antisymmetric_matrix_3x3<T>& xresult) const;
244 
249 
250 
257 
258 
259 protected:
260 private:
261 
262 };
263 
264 // =============================================================================
265 // NON-MEMBER FUNCTIONS
266 // =============================================================================
267 
271 template <typename T>
272 std::ostream& operator<<(std::ostream& xos, const antisymmetric_matrix_3x3<T>& xm);
273 
274 
275 } // namespace fiber_bundle
276 
277 #endif // ifndef ANTISYMMETRIC_MATRIX_3X3_H
general_matrix_1x3< T > row(int xrow) const
A 1x3 matrix containing the elements or row xrow.
antisymmetric_matrix_3x3< T > inverse() const
The inverse of the matrix (auto-allocated).
static int number_of_rows()
The number of rows.
Antisymmetric matrix with 3 rows and 3 columns.
General matrix with 3 rows and 2 columns.
void assign(const T &xscalar)
Assign all elements of this matrix to the value xvalue.
antisymmetric_matrix_3x3< T > transpose() const
The transpose of the matrix (auto-allocated).
int row_index(int xrow) const
Index for row xrow in the linear storage array.
T trace() const
The trace of the matrix (auto-allocated).
void multiply(const T &xscalar, antisymmetric_matrix_3x3< T > &xresult) const
This matrix multiplied by a scalar (pre-allocated).
general_matrix_3x3< T > adjoint() const
The adjoint of the matrix (auto-allocated).
Row dofs type for class at2_e3.
Definition: at2_e3.h:51
General matrix with 3 rows and 1 column.
static int d()
Dimension of the underlying elements.
bool is_positive_definite() const
True if this matrix is positive definite. Always returns false for antisymmetric_matrices.
static int number_of_columns()
The number of columns.
general_matrix_3x1< T > column(int xcolumn) const
A 3x1 matrix containing the elements or column xcolumn.
T determinant() const
The determinant of the matrix (auto-allocated).
General matrix with 3 rows and 3 columns.
General matrix with 1 row and 3 columns.
T * operator[](int xrow)
Pointer to the first element in row xrow of this matrix. Facilitates accessing elements via matrix[i]...
Namespace for the fiber_bundles component of the sheaf system.