LifeV
|
class VectorSmall This class implements a simple vector More...
#include <VectorSmall.hpp>
Private Types | |
typedef Real &(MatrixSmall::* | DereferenceMethod) (UInt const &i) |
typedef const Real &(MatrixSmall::* | ConstDereferenceMethod) (UInt const &i) const |
typedef Real * | OpIndexReturnType |
typedef Real const * | OpIndexReturnConstType |
Private Member Functions | |
void | copyFrom (MatrixSmall< Dim1, Dim2 > const &matrix) |
bool | realEquality (const Real &r1, const Real &r2) const |
Constructors and destructors | |
MatrixSmall () | |
Empty constructor (all components are set to zero) More... | |
MatrixSmall (MatrixSmall< Dim1, Dim2 > const &matrix) | |
Copy constructor. More... | |
MatrixSmall (const std::vector< std::vector< Real > > &matrix) | |
Import from a vector. More... | |
Overloaded operators | |
bool | operator== (MatrixSmall< Dim1, Dim2 > const &matrix) const |
Operator ==. More... | |
bool | operator!= (MatrixSmall< Dim1, Dim2 > const &matrix) const |
Operator !=. More... | |
MatrixSmall< Dim1, Dim2 > & | operator= (MatrixSmall< Dim1, Dim2 > const &matrix) |
Assignment operator. More... | |
MatrixSmall< Dim1, Dim2 > & | operator+= (MatrixSmall< Dim1, Dim2 > const &matrix) |
Operator +=. More... | |
MatrixSmall< Dim1, Dim2 > | operator+ (MatrixSmall< Dim1, Dim2 > const &matrix) const |
Operator +. More... | |
MatrixSmall< Dim1, Dim2 > & | operator-= (MatrixSmall< Dim1, Dim2 > const &matrix) |
Operator -=. More... | |
MatrixSmall< Dim1, Dim2 > | operator- (MatrixSmall< Dim1, Dim2 > const &matrix) const |
Operator -. More... | |
MatrixSmall< Dim1, Dim2 > & | operator*= (Real const &factor) |
Operator *= (multiplication by scalar) More... | |
MatrixSmall< Dim1, Dim2 > & | operator/= (Real const &factor) |
Operator /= (division by scalar) More... | |
MatrixSmall< Dim1, Dim2 > | operator/ (Real const &factor) const |
Operator / (division by scalar) More... | |
MatrixSmall< Dim1, Dim2 > | operator* (Real const &factor) const |
Operator * (division by scalar) More... | |
VectorSmall< Dim1 > | operator* (VectorSmall< Dim2 > const &vector) const |
Operator * (multiplication by a vector) More... | |
MatrixSmall< Dim1, Dim2 > | operator* (MatrixSmall< Dim2, Dim1 > const &matrix) const |
Operator * between two squared matrices (multiplication by a matrix) More... | |
OpIndexReturnConstType const | operator[] (UInt const &i) const |
Operator []. More... | |
OpIndexReturnType | operator[] (UInt const &i) |
Operator []. More... | |
Real const & | operator() (UInt const &i, UInt const &j) const |
Operator () More... | |
Real & | operator() (UInt const &i, UInt const &j) |
Operator () More... | |
Geometric Methods | |
Real | dot (MatrixSmall< Dim1, Dim2 > const &matrix) const |
Scalar product. More... | |
MatrixSmall< Dim1, Dim2 > | emult (MatrixSmall< Dim1, Dim2 > const &matrix) const |
Element-wise multiplication between matrices. More... | |
MatrixSmall< Dim1, Dim2 > | emult (VectorSmall< Dim1 > const &vector) const |
Element-wise multiplication between a matrix and a vector. More... | |
VectorSmall< Dim2 > | extractRow (UInt const &i) const |
Extraction of a row. More... | |
VectorSmall< Dim1 > | extractColumn (UInt const &j) const |
Extraction of a column. More... | |
Real | extract (UInt const &i, UInt const &j) const |
Extraction of a component. More... | |
MatrixSmall< Dim2, Dim1 > | transpose () const |
Transpose of a matrix. More... | |
Real | determinant () const |
Determinant of a matrix In this class the determinant is computed explicitly for matrices of dimensions 1 2 3. More... | |
MatrixSmall< Dim1, Dim2 > | cofactor () const |
Cofactor of a matrix In this class the cofactor is computed explicitly for matrices of dimensions 1 2 3. More... | |
void | showMe () const |
Plot the Matrix. More... | |
MatrixSmall< Dim1, Dim2 > | minusTransposed () const |
This method In this method, which is based on cofactor and determinant, given a matrix, its inverse transposed is computed explicitly for matrices of dimensions 1 2 3 This method is mainly used for structural problems. More... | |
MatrixSmall< Dim1, Dim2 > | inverse () const |
This method In this method, which is based on cofactor and determinant, given a matrix, its inverse is computed explicitly for matrices of dimensions 1 2 3 This method is mainly used for structural problems. More... | |
Real | trace () const |
Real | norm () const |
Norm value. More... | |
void | normalize () |
Normalize matrix. More... | |
MatrixSmall< Dim1, Dim2 > | normalized () |
Create the versor associated to this MatrixSmall. More... | |
Output stream operator overload | |
function to get the size of the MatrixSmall ( for compatibility with Eigen)
| |
std::ostream & | operator<< (std::ostream &out, MatrixSmall< Dim1, Dim2 > const &matrix) |
Conversion free-functions | |
template<typename Matrix > | |
MatrixSmall< Dim1, Dim2 > | castToMatrixSmall (Matrix const &coords) |
Conversion of an array (std::vector, KN, etc. if applicable) to a MatrixSmall. More... | |
Data | |
Real | M_coords [Dim1][Dim2] |
Data storage. More... | |
class VectorSmall This class implements a simple vector
class MtrixSmall This class implements a simple matrix
This class implements a simple vector.
It allows all kind of geometric operations on the node, such as summation, multiplication by scalar, scalar product, cross product, norm, etc.
The implementation is oriented to best perform with small (less than 30) values of .
The interface of the class is designed to stay compatible with the Eigen library Matrix class.
This class implements a simple matrix.
It allows all kind of geometric operations on the node, such as summation, multiplication by scalar, scalar product, cross product, etc. The implementation is oriented to best perform with small (less than 30) n
Definition at line 68 of file VectorSmall.hpp.
Definition at line 77 of file MatrixSmall.hpp.
Definition at line 78 of file MatrixSmall.hpp.
|
private |
Definition at line 80 of file MatrixSmall.hpp.
|
private |
Definition at line 81 of file MatrixSmall.hpp.
|
inline |
Empty constructor (all components are set to zero)
Definition at line 107 of file MatrixSmall.hpp.
|
inline |
Copy constructor.
Definition at line 116 of file MatrixSmall.hpp.
|
inline |
Import from a vector.
Definition at line 122 of file MatrixSmall.hpp.
|
inlineprivate |
|
inline |
Operator ==.
Definition at line 150 of file MatrixSmall.hpp.
|
inline |
Operator !=.
Definition at line 162 of file MatrixSmall.hpp.
|
inline |
Assignment operator.
Definition at line 168 of file MatrixSmall.hpp.
|
inline |
Operator +=.
Definition at line 177 of file MatrixSmall.hpp.
|
inline |
Operator +.
Definition at line 188 of file MatrixSmall.hpp.
|
inline |
Operator -=.
Definition at line 195 of file MatrixSmall.hpp.
|
inline |
Operator -.
Definition at line 206 of file MatrixSmall.hpp.
|
inline |
Operator *= (multiplication by scalar)
Definition at line 213 of file MatrixSmall.hpp.
|
inline |
Operator /= (division by scalar)
Definition at line 224 of file MatrixSmall.hpp.
|
inline |
Operator / (division by scalar)
Definition at line 232 of file MatrixSmall.hpp.
|
inline |
Operator * (division by scalar)
Definition at line 239 of file MatrixSmall.hpp.
|
inline |
Operator * (multiplication by a vector)
Definition at line 246 of file MatrixSmall.hpp.
|
inline |
Operator * between two squared matrices (multiplication by a matrix)
Definition at line 261 of file MatrixSmall.hpp.
|
inline |
Operator [].
Definition at line 281 of file MatrixSmall.hpp.
|
inline |
Operator [].
Definition at line 288 of file MatrixSmall.hpp.
Operator ()
Definition at line 295 of file MatrixSmall.hpp.
Operator ()
Definition at line 302 of file MatrixSmall.hpp.
|
inline |
Scalar product.
matrix | second operand |
Definition at line 317 of file MatrixSmall.hpp.
|
inline |
Element-wise multiplication between matrices.
matrix | second operand |
Definition at line 334 of file MatrixSmall.hpp.
|
inline |
Element-wise multiplication between a matrix and a vector.
Line[i] of the matrix is multipled by the scalar vector[i]
vector |
Definition at line 351 of file MatrixSmall.hpp.
|
inline |
Extraction of a row.
index | of the row to be extracted |
Definition at line 368 of file MatrixSmall.hpp.
|
inline |
Extraction of a column.
index | of the column to be extracted |
Definition at line 383 of file MatrixSmall.hpp.
Extraction of a component.
index | of the component to be extracted |
Definition at line 398 of file MatrixSmall.hpp.
|
inline |
|
inline |
Determinant of a matrix In this class the determinant is computed explicitly for matrices of dimensions 1 2 3.
Definition at line 425 of file MatrixSmall.hpp.
|
inline |
Cofactor of a matrix In this class the cofactor is computed explicitly for matrices of dimensions 1 2 3.
Definition at line 459 of file MatrixSmall.hpp.
|
inline |
|
inline |
This method In this method, which is based on cofactor and determinant, given a matrix, its inverse transposed is computed explicitly for matrices of dimensions 1 2 3 This method is mainly used for structural problems.
Definition at line 521 of file MatrixSmall.hpp.
|
inline |
This method In this method, which is based on cofactor and determinant, given a matrix, its inverse is computed explicitly for matrices of dimensions 1 2 3 This method is mainly used for structural problems.
Definition at line 548 of file MatrixSmall.hpp.
|
inline |
Definition at line 562 of file MatrixSmall.hpp.
|
inline |
Norm value.
Definition at line 580 of file MatrixSmall.hpp.
|
inline |
Normalize matrix.
Definition at line 586 of file MatrixSmall.hpp.
|
inline |
Create the versor associated to this MatrixSmall.
Definition at line 595 of file MatrixSmall.hpp.
|
friend |
Definition at line 616 of file MatrixSmall.hpp.
|
friend |
Conversion of an array (std::vector, KN, etc. if applicable) to a MatrixSmall.
coords | matrix of point coordinates with operator[][] available |
Definition at line 641 of file MatrixSmall.hpp.
|
private |
Data storage.
Definition at line 659 of file MatrixSmall.hpp.