SheafSystem  0.0.0.0
fiber_bundle::general_matrix_2x2< T > Class Template Reference

General matrix with 2 rows and 2 columns. More...

#include <general_matrix_2x2.h>

Public Member Functions

 operator gl2_row_dofs_type< T > & () const
 Operator to convert current to gl2_row_dofs_type. More...
 
 operator t02_e2_row_dofs_type< T > & () const
 Operator to convert current to t02_e2_row_dofs_type. More...
 
 operator t11_e2_row_dofs_type< T > & () const
 Operator to convert current to t11_e2_row_dofs_type. More...
 
T * operator[] (int xrow)
 Pointer to the first element in row xrow of this matrix. Facilitates accessing elements via matrix[i][j]. More...
 
const T * operator[] (int xrow) const
 Pointer to the first element in row xrow of this matrix. Facilitates accessing elements via matrix[i][j]. More...
 
 operator T* ()
 Conversion (cast) operator to convert to the associated matrix type (non const version). More...
 
 operator const T * () const
 Conversion (cast) operator to convert to the associated matrix type (const version). More...
 
int row_index (int xrow) const
 Index for row xrow in the linear storage array. More...
 
general_matrix_1x2< T > row (int xrow) const
 A 1x2 matrix containing the elements or row xrow. More...
 
general_matrix_2x1< T > column (int xcolumn) const
 A 2x1 matrix containing the elements or column xcolumn. More...
 
void adjoint (general_matrix_2x2< T > &xresult) const
 The adjoint of the matrix (pre-allocated). More...
 
general_matrix_2x2< T > adjoint () const
 The adjoint of the matrix (auto-allocated). More...
 
void assign (const T &xvalue)
 Assign all elements of this matrix to the value xvalue. More...
 
void determinant (T &xresult) const
 The determinant of the matrix (pre-allocated). More...
 
determinant () const
 The determinant of the matrix (auto-allocated). More...
 
void diagonalization (general_matrix_2x2< T > &xresult) const
 The diagonalization of the matrix (pre-allocated). More...
 
general_matrix_2x2< T > diagonalization () const
 The diagonalization of the matrix (auto-allocated). More...
 
void identity (general_matrix_2x2< T > &xresult) const
 The identity matrix (pre-allocated). More...
 
general_matrix_2x2< T > identity () const
 The identity matrix (auto-allocated). More...
 
void inverse (general_matrix_2x2< T > &xresult) const
 The inverse of the matrix (pre-allocated). More...
 
bool is_antisymmetric () const
 True if this matrix is antisymmetric. More...
 
bool is_diagonal () const
 True if this matrix is diagonal. More...
 
bool is_identity () const
 True if this is an identity matrix. More...
 
bool is_positive_definite () const
 True if this matrix is positive definite. More...
 
bool is_symmetric () const
 True if this matrix is symmetric. More...
 
general_matrix_2x2< T > inverse () const
 The inverse of the matrix (auto-allocated). More...
 
void multiply (const T &xscalar, general_matrix_2x2< T > &xresult) const
 This matrix multiplied by a scalar (pre-allocated). More...
 
general_matrix_2x2< T > multiply (const T &xscalar) const
 This matrix multiplied by a scalar (auto-allocated). More...
 
void multiply (const general_matrix_2x1< T > &xother, general_matrix_2x1< T > &xresult) const
 Premultiply matrix xother by this matrix (pre-allocated). More...
 
general_matrix_2x1< T > multiply (const general_matrix_2x1< T > &xother) const
 Premultiply matrix xother by this matrix (auto-allocated). More...
 
void multiply (const general_matrix_2x2< T > &xother, general_matrix_2x2< T > &xresult) const
 Premultiply matrix xother by this matrix (pre-allocated). More...
 
general_matrix_2x2< T > multiply (const general_matrix_2x2< T > &xother) const
 Premultiply matrix xother by this matrix (auto-allocated). More...
 
void multiply (const general_matrix_2x3< T > &xother, general_matrix_2x3< T > &xresult) const
 Premultiply matrix xother by this matrix (pre-allocated). More...
 
general_matrix_2x3< T > multiply (const general_matrix_2x3< T > &xother) const
 Premultiply matrix xother by this matrix (auto-allocated). More...
 
void trace (T &xresult) const
 The trace of the matrix (pre-allocated). More...
 
trace () const
 The trace of the matrix (auto-allocated). More...
 
void transpose (general_matrix_2x2< T > &xresult) const
 The transpose of the matrix (pre-allocated). More...
 
general_matrix_2x2< T > transpose () const
 The transpose of the matrix (auto-allocated). More...
 
void antisymmetric_part (antisymmetric_matrix_2x2< T > &xresult) const
 The antisymmetric part of a this matrix (pre-allocated). More...
 
antisymmetric_matrix_2x2< T > antisymmetric_part () const
 The antisymmetric part of a this matrix (auto-allocated). More...
 
void symmetric_part (symmetric_matrix_2x2< T > &xresult) const
 The symmetric part of a this matrix (pre-allocated). More...
 
symmetric_matrix_2x2< T > symmetric_part () const
 The symmetric part of a this matrix (auto-allocated). More...
 

Static Public Member Functions

static int number_of_rows ()
 The number of rows. More...
 
static int number_of_columns ()
 The number of columns. More...
 
static int d ()
 Dimension of the underlying elements. More...
 

Public Attributes

components [4]
 Linear storage array. More...
 

Detailed Description

template<typename T>
class fiber_bundle::general_matrix_2x2< T >

General matrix with 2 rows and 2 columns.

Class general_matrix_2x2 is a special kind of matrix class intended to be used in conjunction with various row_dofs_type classes (pod types). The pod types will be converted (cast) to appropriate matrix types. So, this class is also required to be a pod type also (ie: really just a struct with no inheritance, no constructors, no virtual functions, etc.).

Definition at line 36 of file antisymmetric_matrix_2x2.h.

Member Function Documentation

◆ adjoint() [1/2]

template<typename T >
void fiber_bundle::general_matrix_2x2< T >::adjoint ( general_matrix_2x2< T > &  xresult) const

The adjoint of the matrix (pre-allocated).

Definition at line 362 of file antisymmetric_matrix_2x2.impl.h.

References fiber_bundle::antisymmetric_matrix_2x2< T >::adjoint().

◆ adjoint() [2/2]

template<typename T >
general_matrix_2x2< T > fiber_bundle::general_matrix_2x2< T >::adjoint ( ) const

◆ antisymmetric_part() [1/2]

template<typename T >
void fiber_bundle::general_matrix_2x2< T >::antisymmetric_part ( antisymmetric_matrix_2x2< T > &  xresult) const

The antisymmetric part of a this matrix (pre-allocated).

Definition at line 1092 of file general_matrix_2x2.impl.h.

References fiber_bundle::general_matrix_2x2< T >::antisymmetric_part().

◆ antisymmetric_part() [2/2]

template<typename T >
antisymmetric_matrix_2x2< T > fiber_bundle::general_matrix_2x2< T >::antisymmetric_part ( ) const

◆ assign()

template<typename T >
void fiber_bundle::general_matrix_2x2< T >::assign ( const T &  xvalue)

Assign all elements of this matrix to the value xvalue.

Postcondition
  • for(int i = ( 0 ); i < ( d() ); ++ i ) components[i] == xvalue

Definition at line 411 of file general_matrix_2x2.impl.h.

References fiber_bundle::general_matrix_2x2< T >::determinant().

Referenced by fiber_bundle::general_matrix_2x2< T >::adjoint().

◆ column()

template<typename T >
general_matrix_2x1< T > fiber_bundle::general_matrix_2x2< T >::column ( int  xcolumn) const

A 2x1 matrix containing the elements or column xcolumn.

Precondition

Definition at line 335 of file general_matrix_2x2.impl.h.

References fiber_bundle::general_matrix_2x2< T >::adjoint(), and fiber_bundle::general_matrix_2x1< T >::components.

Referenced by fiber_bundle::general_matrix_2x2< T >::row().

◆ d()

template<typename T >
int fiber_bundle::general_matrix_2x2< T >::d ( )
static

Dimension of the underlying elements.

Definition at line 179 of file general_matrix_2x2.impl.h.

References fiber_bundle::general_matrix_2x2< T >::operator[]().

Referenced by fiber_bundle::general_matrix_2x2< T >::number_of_columns().

◆ determinant() [1/2]

template<typename T >
void fiber_bundle::general_matrix_2x2< T >::determinant ( T &  xresult) const

The determinant of the matrix (pre-allocated).

Definition at line 434 of file general_matrix_2x2.impl.h.

References fiber_bundle::general_matrix_2x2< T >::determinant().

Referenced by fiber_bundle::gl2_lite::put_matrix(), and fiber_bundle::gl2::put_matrix().

◆ determinant() [2/2]

template<typename T >
T fiber_bundle::general_matrix_2x2< T >::determinant ( ) const

◆ diagonalization() [1/2]

template<typename T >
void fiber_bundle::general_matrix_2x2< T >::diagonalization ( general_matrix_2x2< T > &  xresult) const

The diagonalization of the matrix (pre-allocated).

Postcondition
  • xresult.is_diagonal()
  • -unexecutable( "for_all i, 0, 2, xresult[i][i] == real number" )

Definition at line 480 of file general_matrix_2x2.impl.h.

References fiber_bundle::general_matrix_2x2< T >::diagonalization(), fiber_bundle::general_matrix_2x2< T >::is_diagonal(), and fiber_bundle::sec_at0_algebra::sqrt().

◆ diagonalization() [2/2]

template<typename T >
general_matrix_2x2< T > fiber_bundle::general_matrix_2x2< T >::diagonalization ( ) const

The diagonalization of the matrix (auto-allocated).

Postcondition
  • result.is_diagonal()
  • -unexecutable( "for_all i, 0, 2, result[i][i] == real number" )

Definition at line 542 of file general_matrix_2x2.impl.h.

References fiber_bundle::general_matrix_2x2< T >::identity(), and fiber_bundle::general_matrix_2x2< T >::is_diagonal().

Referenced by fiber_bundle::general_matrix_2x2< T >::determinant(), and fiber_bundle::general_matrix_2x2< T >::diagonalization().

◆ identity() [1/2]

template<typename T >
void fiber_bundle::general_matrix_2x2< T >::identity ( general_matrix_2x2< T > &  xresult) const

The identity matrix (pre-allocated).

Postcondition
  • xresult.is_identity()

Definition at line 565 of file general_matrix_2x2.impl.h.

References fiber_bundle::general_matrix_2x2< T >::identity(), and fiber_bundle::general_matrix_2x2< T >::is_identity().

◆ identity() [2/2]

template<typename T >
general_matrix_2x2< T > fiber_bundle::general_matrix_2x2< T >::identity ( ) const

◆ inverse() [1/2]

template<typename T >
void fiber_bundle::general_matrix_2x2< T >::inverse ( general_matrix_2x2< T > &  xresult) const

The inverse of the matrix (pre-allocated).

Definition at line 613 of file general_matrix_2x2.impl.h.

References fiber_bundle::determinant(), and fiber_bundle::general_matrix_2x2< T >::inverse().

Referenced by fiber_bundle::gl2_lite::put_matrix(), and fiber_bundle::gl2::put_matrix().

◆ inverse() [2/2]

◆ is_antisymmetric()

template<typename T >
bool fiber_bundle::general_matrix_2x2< T >::is_antisymmetric ( ) const

True if this matrix is antisymmetric.

Definition at line 669 of file general_matrix_2x2.impl.h.

References fiber_bundle::general_matrix_2x2< T >::is_diagonal().

Referenced by fiber_bundle::general_matrix_2x2< T >::inverse().

◆ is_diagonal()

template<typename T >
bool fiber_bundle::general_matrix_2x2< T >::is_diagonal ( ) const

◆ is_identity()

template<typename T >
bool fiber_bundle::general_matrix_2x2< T >::is_identity ( ) const

◆ is_positive_definite()

template<typename T >
bool fiber_bundle::general_matrix_2x2< T >::is_positive_definite ( ) const

◆ is_symmetric()

template<typename T >
bool fiber_bundle::general_matrix_2x2< T >::is_symmetric ( ) const

True if this matrix is symmetric.

Definition at line 760 of file general_matrix_2x2.impl.h.

References fiber_bundle::general_matrix_2x2< T >::multiply().

Referenced by fiber_bundle::general_matrix_2x2< T >::is_positive_definite().

◆ multiply() [1/8]

template<typename T >
void fiber_bundle::general_matrix_2x2< T >::multiply ( const T &  xscalar,
general_matrix_2x2< T > &  xresult 
) const

◆ multiply() [2/8]

template<typename T >
general_matrix_2x2< T > fiber_bundle::general_matrix_2x2< T >::multiply ( const T &  xscalar) const

This matrix multiplied by a scalar (auto-allocated).

Definition at line 807 of file general_matrix_2x2.impl.h.

References fiber_bundle::general_matrix_2x2< T >::multiply(), and fiber_bundle::vd_algebra::multiply().

◆ multiply() [3/8]

template<typename T >
void fiber_bundle::general_matrix_2x2< T >::multiply ( const general_matrix_2x1< T > &  xother,
general_matrix_2x1< T > &  xresult 
) const

Premultiply matrix xother by this matrix (pre-allocated).

Definition at line 827 of file general_matrix_2x2.impl.h.

References fiber_bundle::general_matrix_2x2< T >::multiply(), and fiber_bundle::general_matrix_2x1< T >::number_of_columns().

◆ multiply() [4/8]

template<typename T >
general_matrix_2x1< T > fiber_bundle::general_matrix_2x2< T >::multiply ( const general_matrix_2x1< T > &  xother) const

Premultiply matrix xother by this matrix (auto-allocated).

Definition at line 867 of file general_matrix_2x2.impl.h.

References fiber_bundle::general_matrix_2x2< T >::multiply(), and fiber_bundle::vd_algebra::multiply().

◆ multiply() [5/8]

template<typename T >
void fiber_bundle::general_matrix_2x2< T >::multiply ( const general_matrix_2x2< T > &  xother,
general_matrix_2x2< T > &  xresult 
) const

Premultiply matrix xother by this matrix (pre-allocated).

Definition at line 887 of file general_matrix_2x2.impl.h.

References fiber_bundle::general_matrix_2x2< T >::multiply(), and fiber_bundle::general_matrix_2x2< T >::number_of_columns().

◆ multiply() [6/8]

template<typename T >
general_matrix_2x2< T > fiber_bundle::general_matrix_2x2< T >::multiply ( const general_matrix_2x2< T > &  xother) const

Premultiply matrix xother by this matrix (auto-allocated).

Definition at line 927 of file general_matrix_2x2.impl.h.

References fiber_bundle::general_matrix_2x2< T >::multiply(), and fiber_bundle::vd_algebra::multiply().

◆ multiply() [7/8]

template<typename T >
void fiber_bundle::general_matrix_2x2< T >::multiply ( const general_matrix_2x3< T > &  xother,
general_matrix_2x3< T > &  xresult 
) const

Premultiply matrix xother by this matrix (pre-allocated).

Definition at line 947 of file general_matrix_2x2.impl.h.

References fiber_bundle::general_matrix_2x2< T >::multiply(), and fiber_bundle::general_matrix_2x3< T >::number_of_columns().

◆ multiply() [8/8]

template<typename T >
general_matrix_2x3< T > fiber_bundle::general_matrix_2x2< T >::multiply ( const general_matrix_2x3< T > &  xother) const

Premultiply matrix xother by this matrix (auto-allocated).

Definition at line 987 of file general_matrix_2x2.impl.h.

References fiber_bundle::vd_algebra::multiply(), and fiber_bundle::general_matrix_2x2< T >::trace().

◆ number_of_columns()

◆ number_of_rows()

template<typename T >
int fiber_bundle::general_matrix_2x2< T >::number_of_rows ( )
static

◆ operator const T *()

template<typename T >
fiber_bundle::general_matrix_2x2< T >::operator const T * ( ) const

Conversion (cast) operator to convert to the associated matrix type (const version).

Postcondition
  • result != 0

Definition at line 262 of file general_matrix_2x2.impl.h.

References fiber_bundle::general_matrix_2x2< T >::row_index().

◆ operator gl2_row_dofs_type< T > &()

template<typename T >
fiber_bundle::general_matrix_2x2< T >::operator gl2_row_dofs_type< T > & ( ) const

Operator to convert current to gl2_row_dofs_type.

Definition at line 80 of file general_matrix_2x2.impl.h.

◆ operator T*()

template<typename T >
fiber_bundle::general_matrix_2x2< T >::operator T* ( )

Conversion (cast) operator to convert to the associated matrix type (non const version).

Postcondition
  • result != 0

Definition at line 240 of file general_matrix_2x2.impl.h.

◆ operator t02_e2_row_dofs_type< T > &()

template<typename T >
fiber_bundle::general_matrix_2x2< T >::operator t02_e2_row_dofs_type< T > & ( ) const

Operator to convert current to t02_e2_row_dofs_type.

Definition at line 101 of file general_matrix_2x2.impl.h.

◆ operator t11_e2_row_dofs_type< T > &()

template<typename T >
fiber_bundle::general_matrix_2x2< T >::operator t11_e2_row_dofs_type< T > & ( ) const

Operator to convert current to t11_e2_row_dofs_type.

Definition at line 122 of file general_matrix_2x2.impl.h.

References fiber_bundle::general_matrix_2x2< T >::number_of_rows().

◆ operator[]() [1/2]

template<typename T >
T * fiber_bundle::general_matrix_2x2< T >::operator[] ( int  xrow)

Pointer to the first element in row xrow of this matrix. Facilitates accessing elements via matrix[i][j].

Precondition
Postcondition
  • result != 0

Definition at line 196 of file general_matrix_2x2.impl.h.

Referenced by fiber_bundle::general_matrix_2x2< T >::d().

◆ operator[]() [2/2]

template<typename T >
const T * fiber_bundle::general_matrix_2x2< T >::operator[] ( int  xrow) const

Pointer to the first element in row xrow of this matrix. Facilitates accessing elements via matrix[i][j].

Precondition
Postcondition
  • result != 0

Definition at line 218 of file general_matrix_2x2.impl.h.

◆ row()

template<typename T >
general_matrix_1x2< T > fiber_bundle::general_matrix_2x2< T >::row ( int  xrow) const

A 1x2 matrix containing the elements or row xrow.

Precondition

Definition at line 309 of file general_matrix_2x2.impl.h.

References fiber_bundle::general_matrix_2x2< T >::column(), and fiber_bundle::general_matrix_1x2< T >::components.

Referenced by fiber_bundle::general_matrix_2x2< T >::row_index().

◆ row_index()

template<typename T >
int fiber_bundle::general_matrix_2x2< T >::row_index ( int  xrow) const

Index for row xrow in the linear storage array.

Precondition
Postcondition

Definition at line 285 of file general_matrix_2x2.impl.h.

References fiber_bundle::general_matrix_2x2< T >::row().

Referenced by fiber_bundle::general_matrix_2x2< T >::operator const T *().

◆ symmetric_part() [1/2]

template<typename T >
void fiber_bundle::general_matrix_2x2< T >::symmetric_part ( symmetric_matrix_2x2< T > &  xresult) const

The symmetric part of a this matrix (pre-allocated).

Definition at line 1134 of file general_matrix_2x2.impl.h.

References fiber_bundle::general_matrix_2x2< T >::symmetric_part().

◆ symmetric_part() [2/2]

template<typename T >
symmetric_matrix_2x2< T > fiber_bundle::general_matrix_2x2< T >::symmetric_part ( ) const

The symmetric part of a this matrix (auto-allocated).

Definition at line 1157 of file general_matrix_2x2.impl.h.

Referenced by fiber_bundle::general_matrix_2x2< T >::antisymmetric_part(), and fiber_bundle::general_matrix_2x2< T >::symmetric_part().

◆ trace() [1/2]

template<typename T >
void fiber_bundle::general_matrix_2x2< T >::trace ( T &  xresult) const

The trace of the matrix (pre-allocated).

Definition at line 1007 of file general_matrix_2x2.impl.h.

References fiber_bundle::general_matrix_2x2< T >::trace().

◆ trace() [2/2]

template<typename T >
T fiber_bundle::general_matrix_2x2< T >::trace ( ) const

◆ transpose() [1/2]

template<typename T >
void fiber_bundle::general_matrix_2x2< T >::transpose ( general_matrix_2x2< T > &  xresult) const

The transpose of the matrix (pre-allocated).

Definition at line 1049 of file general_matrix_2x2.impl.h.

References fiber_bundle::general_matrix_2x2< T >::transpose().

◆ transpose() [2/2]

template<typename T >
general_matrix_2x2< T > fiber_bundle::general_matrix_2x2< T >::transpose ( ) const

Member Data Documentation

◆ components

template<typename T>
T fiber_bundle::general_matrix_2x2< T >::components[4]

Linear storage array.

Definition at line 134 of file general_matrix_2x2.h.

Referenced by fiber_bundle::general_matrix_2x2< T >::multiply().


The documentation for this class was generated from the following files: