cpe::matrix3 Class Reference

Matrix 3x3. More...

Public Member Functions

 matrix3 ()
 empty constructor (identity) More...
 
 matrix3 (const double &x00, const double &x01, const double &x02, const double &x10, const double &x11, const double &x12, const double &x20, const double &x21, const double &x22)
 direct constructor with every value More...
 
const double & operator() (const size_t &k1, const size_t &k2) const
 Access to the k_th entry (k in [0,2]) More...
 
double & operator() (const size_t &k1, const size_t &k2)
 Access to the k_th entry (k in [0,2]) More...
 
const double * pointer () const
 fast pointer access More...
 
double * pointer_unprotected ()
 fast pointer access More...
 
matrix3 operator+ (const matrix3 &m2) const
 
  • operator
More...
 
matrix3 operator+ (const double &s) const
 
  • operator
More...
 
matrix3 operator- (const matrix3 &m2) const
 
  • operator
More...
 
matrix3 operator- (const double &s) const
 
  • operator
More...
 
matrix3 operator* (const double &s) const
 multiply by a scalar operator More...
 
vec3 operator* (const vec3 &v) const
 multiply matrix with a v3 More...
 
matrix3 operator* (const matrix3 &m2) const
 matrix mulitplication More...
 
matrix3 operator/ (const double &s) const
 divide by a scalar operator More...
 
matrix3operator+= (const matrix3 &m)
 internal + More...
 
matrix3operator+= (const double &s)
 internal + More...
 
matrix3operator-= (const matrix3 &m)
 internal - More...
 
matrix3operator-= (const double &s)
 internal - More...
 
matrix3operator*= (const double &s)
 internal * More...
 
matrix3operator/= (const double &s)
 internal / More...
 
matrix3 operator- () const
 unary negation More...
 
matrix3 product_compontentwise (const matrix3 &m) const
 does componentwise multiplication More...
 
matrix3product_compontentwise_internal (const matrix3 &m)
 does componentwise multiplication More...
 
matrix3 transposed () const
 transpose matrix More...
 
std::vector< double > to_vector () const
 convert 3x3 matrix into a vector of double of size 9 More...
 

Static Public Member Functions

static matrix3 identity ()
 build identity matrix More...
 
static matrix3 zeros ()
 build zero matrix More...
 
static matrix3 rotation (const vec3 &axis, const double &angle)
 build rotation matrix More...
 
static matrix3 scale (const double &s)
 build scaling matrix More...
 
static matrix3 scale (const double &s_x, const double &s_y, const double &s_z)
 build scaling matrix More...
 

Private Member Functions

void assert_size (const size_t &k1, const size_t &k2) const
 assert that a size_t belongs to [[0,2]] More...
 

Private Attributes

double m [9]
 internal storage of the matrix More...
 

Detailed Description

Matrix 3x3.

Constructor & Destructor Documentation

cpe::matrix3::matrix3 ( )

empty constructor (identity)

References m.

Referenced by identity(), operator-(), operator/(), product_compontentwise(), rotation(), scale(), transposed(), and zeros().

cpe::matrix3::matrix3 ( const double &  x00,
const double &  x01,
const double &  x02,
const double &  x10,
const double &  x11,
const double &  x12,
const double &  x20,
const double &  x21,
const double &  x22 
)

direct constructor with every value

References m.

Member Function Documentation

void cpe::matrix3::assert_size ( const size_t &  k1,
const size_t &  k2 
) const
private

assert that a size_t belongs to [[0,2]]

Referenced by operator()().

matrix3 cpe::matrix3::identity ( )
static

build identity matrix

References matrix3().

+ Here is the call graph for this function:

const double & cpe::matrix3::operator() ( const size_t &  k1,
const size_t &  k2 
) const

Access to the k_th entry (k in [0,2])

References assert_size(), and m.

+ Here is the call graph for this function:

double & cpe::matrix3::operator() ( const size_t &  k1,
const size_t &  k2 
)

Access to the k_th entry (k in [0,2])

References assert_size(), and m.

+ Here is the call graph for this function:

matrix3 cpe::matrix3::operator* ( const double &  s) const

multiply by a scalar operator

vec3 cpe::matrix3::operator* ( const vec3 v) const

multiply matrix with a v3

References m, cpe::vec3::x(), cpe::vec3::y(), and cpe::vec3::z().

+ Here is the call graph for this function:

matrix3 cpe::matrix3::operator* ( const matrix3 m2) const

matrix mulitplication

References m, pointer_unprotected(), and zeros().

+ Here is the call graph for this function:

matrix3 & cpe::matrix3::operator*= ( const double &  s)

internal *

References m.

matrix3 cpe::matrix3::operator+ ( const matrix3 m2) const

  • operator

matrix3 cpe::matrix3::operator+ ( const double &  s) const

  • operator

matrix3 & cpe::matrix3::operator+= ( const matrix3 m)

internal +

References m.

matrix3 & cpe::matrix3::operator+= ( const double &  s)

internal +

References m.

matrix3 cpe::matrix3::operator- ( const matrix3 m2) const

  • operator

References m, matrix3(), and pointer().

+ Here is the call graph for this function:

matrix3 cpe::matrix3::operator- ( const double &  s) const

  • operator

References m, and matrix3().

+ Here is the call graph for this function:

matrix3 cpe::matrix3::operator- ( ) const

unary negation

References m, and matrix3().

+ Here is the call graph for this function:

matrix3 & cpe::matrix3::operator-= ( const matrix3 m)

internal -

References m.

matrix3 & cpe::matrix3::operator-= ( const double &  s)

internal -

References m.

matrix3 cpe::matrix3::operator/ ( const double &  s) const

divide by a scalar operator

References m, and matrix3().

+ Here is the call graph for this function:

matrix3 & cpe::matrix3::operator/= ( const double &  s)

internal /

References m.

const double * cpe::matrix3::pointer ( ) const

fast pointer access

Warning
unprotected access

References m.

Referenced by operator-(), cpe::operator-(), and cpe::operator<<().

double * cpe::matrix3::pointer_unprotected ( )

fast pointer access

Warning
unprotected access

References m.

Referenced by operator*().

matrix3 cpe::matrix3::product_compontentwise ( const matrix3 m) const

does componentwise multiplication

References m, and matrix3().

+ Here is the call graph for this function:

matrix3 & cpe::matrix3::product_compontentwise_internal ( const matrix3 m)

does componentwise multiplication

References m.

matrix3 cpe::matrix3::rotation ( const vec3 axis,
const double &  angle 
)
static

build rotation matrix

References matrix3(), and cpe::vec3::normalized().

+ Here is the call graph for this function:

matrix3 cpe::matrix3::scale ( const double &  s)
static

build scaling matrix

References matrix3().

+ Here is the call graph for this function:

matrix3 cpe::matrix3::scale ( const double &  s_x,
const double &  s_y,
const double &  s_z 
)
static

build scaling matrix

References matrix3().

+ Here is the call graph for this function:

std::vector< double > cpe::matrix3::to_vector ( ) const

convert 3x3 matrix into a vector of double of size 9

References m.

matrix3 cpe::matrix3::transposed ( ) const

transpose matrix

References m, and matrix3().

+ Here is the call graph for this function:

matrix3 cpe::matrix3::zeros ( )
static

build zero matrix

References matrix3().

Referenced by operator*().

+ Here is the call graph for this function:

Member Data Documentation


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