OpenStructure
Public Member Functions | Static Public Member Functions
Mat2 Class Reference

#include <mat2.hh>

Inherits equality_comparable< Mat2 >, additive< Mat2 >, and multiplicative2< Mat2, Real >.

Public Member Functions

 Mat2 ()
 
 Mat2 (Real i00, Real i01, Real i10, Real i11)
 
 Mat2 (const Mat2 &m)
 
 Mat2 (const Real[4])
 
Mat2operator= (const Mat2 &m)
 
bool operator== (const Mat2 &rhs) const
 
const RealAt (std::size_t r, std::size_t c) const
 
RealAt (std::size_t r, std::size_t c)
 
Realoperator() (std::size_t r, std::size_t c)
 
const Realoperator() (std::size_t r, std::size_t c) const
 
Mat2operator+= (const Mat2 &rhs)
 
Mat2operator-= (const Mat2 &rhs)
 
Mat2operator*= (const Real d)
 
Mat2operator/= (const Real d)
 
Mat2operator*= (const Mat2 &m)
 
RealData ()
 
const RealData () const
 

Static Public Member Functions

static Mat2 Identity ()
 

Detailed Description

Definition at line 33 of file mat2.hh.

Constructor & Destructor Documentation

◆ Mat2() [1/4]

Mat2 ( )

Default initialization, identity matrix.

◆ Mat2() [2/4]

Mat2 ( Real  i00,
Real  i01,
Real  i10,
Real  i11 
)

In with 4 values in row-major order.

row-major order means that the matrix

| a b | | c d |

is initialized with (a,b, c,d)

◆ Mat2() [3/4]

Mat2 ( const Mat2 m)

Copy ctor.

◆ Mat2() [4/4]

Mat2 ( const  Real[4])
explicit

initialization from array

Member Function Documentation

◆ At() [1/2]

Real& At ( std::size_t  r,
std::size_t  c 
)
inline

element access

Definition at line 78 of file mat2.hh.

◆ At() [2/2]

const Real& At ( std::size_t  r,
std::size_t  c 
) const
inline

const element access

Definition at line 69 of file mat2.hh.

◆ Data() [1/2]

Real* Data ( )
inline

Definition at line 109 of file mat2.hh.

◆ Data() [2/2]

const Real* Data ( ) const
inline

Definition at line 110 of file mat2.hh.

◆ Identity()

static Mat2 Identity ( )
static

◆ operator()() [1/2]

Real& operator() ( std::size_t  r,
std::size_t  c 
)
inline

element access

Definition at line 87 of file mat2.hh.

◆ operator()() [2/2]

const Real& operator() ( std::size_t  r,
std::size_t  c 
) const
inline

const element access

Definition at line 93 of file mat2.hh.

◆ operator*=() [1/2]

Mat2& operator*= ( const Mat2 m)

◆ operator*=() [2/2]

Mat2& operator*= ( const Real  d)

◆ operator+=()

Mat2& operator+= ( const Mat2 rhs)

addable op

◆ operator-=()

Mat2& operator-= ( const Mat2 rhs)

subtractable op

◆ operator/=()

Mat2& operator/= ( const Real  d)

◆ operator=()

Mat2& operator= ( const Mat2 m)

assignement op

◆ operator==()

bool operator== ( const Mat2 rhs) const

comparable


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