T2DMatrix< T > Struct Template Reference

A simple 2x2 matrix. More...

#include <mia/2d/matrix.hh>

Inheritance diagram for T2DMatrix< T >:
[legend]
Collaboration diagram for T2DMatrix< T >:
[legend]

Public Member Functions

T2DMatrixoperator-= (const T2DMatrix< T > &o)
 element wise subtract operator More...
 
T2DMatrixoperator= (const T2DMatrix< T > &o)
 assignment operator More...
 
 T2DMatrix ()
 
 T2DMatrix (const T2DMatrix< T > &o)
 copy constructor More...
 
 T2DMatrix (const T2DVector< T2DVector< T > > &o)
 construct the matrix from a 2D vector of 2D vectors More...
 
 T2DMatrix (const T2DVector< T > &x, const T2DVector< T > &y)
 
T2DMatrix< T > transposed () const
 
- Public Member Functions inherited from T2DVector< T2DVector< T > >
void fill (T2DVector< T > v)
 fill all the elements with the given value More...
 
T2DVector< T > norm () const
 
T2DVector< T > norm2 () const
 
bool operator!= (const T2DVector &a) const
 not equal operator More...
 
T2DVectoroperator*= (double a)
 in place multiplication with a scalar More...
 
T2DVectoroperator*= (const T2DVector &a)
 in place element wise multiplication of two 2D vectors More...
 
T2DVectoroperator+= (const T2DVector &a)
 in place addition More...
 
T2DVector operator- () const
 
T2DVectoroperator-= (const T2DVector &a)
 in place subtraction More...
 
T2DVectoroperator/= (const T2DVector &a)
 in place element wise division of two 2D vectors More...
 
T2DVectoroperator/= (double a)
 in place division by a scalar More...
 
bool operator== (const T2DVector &a) const
 Equal operator. More...
 
T2DVector< T > & operator[] (int i)
 
const T2DVector< T > & operator[] (int i) const
 
void print (std::ostream &os) const
 print the vector to a stream with special formatting More...
 
double product () const
 
void read (std::istream &is)
 read the properly formatted 2D vector from a stream More...
 
size_t size () const
 returns the size of this vector, always 2 More...
 
 T2DVector ()
 
 T2DVector (int dim)
 
 T2DVector (T2DVector< T > _x, T2DVector< T > _y)
 
 T2DVector (const T2DVector< In > &in)
 

Static Public Attributes

static const T2DMatrix _0
 
static const T2DMatrix _1
 
- Static Public Attributes inherited from T2DVector< T2DVector< T > >
static const T2DVector< T2DVector< T > > _0
 a static for the value <0,0>. More...
 
static const T2DVector< T2DVector< T > > _1
 a static for the value <1,1>. More...
 

Additional Inherited Members

- Public Types inherited from T2DVector< T2DVector< T > >
typedef T2DVector< T > value_type
 typedef for generic access to the element type More...
 
- Data Fields inherited from T2DVector< T2DVector< T > >
T2DVector< T > x
 first element More...
 
T2DVector< T > y
 second element More...
 

Detailed Description

template<typename T>
struct T2DMatrix< T >

A simple 2x2 matrix.

Simple implementation of a 2D Matrix to store 2nd order derivatives.

Definition at line 36 of file 2d/matrix.hh.

Constructor & Destructor Documentation

◆ T2DMatrix() [1/4]

template<typename T >
T2DMatrix< T >::T2DMatrix ( )

Definition at line 78 of file 2d/matrix.hh.

◆ T2DMatrix() [2/4]

template<typename T >
T2DMatrix< T >::T2DMatrix ( const T2DMatrix< T > &  o)

copy constructor

Definition at line 84 of file 2d/matrix.hh.

◆ T2DMatrix() [3/4]

template<typename T >
T2DMatrix< T >::T2DMatrix ( const T2DVector< T2DVector< T > > &  o)

construct the matrix from a 2D vector of 2D vectors

Definition at line 90 of file 2d/matrix.hh.

◆ T2DMatrix() [4/4]

template<typename T >
T2DMatrix< T >::T2DMatrix ( const T2DVector< T > &  x,
const T2DVector< T > &  y 
)

construct the matrix from two 2D vectors

Parameters
x1st row
y2nd row

Definition at line 96 of file 2d/matrix.hh.

Member Function Documentation

◆ operator-=()

template<typename T >
T2DMatrix< T > & T2DMatrix< T >::operator-= ( const T2DMatrix< T > &  o)

element wise subtract operator

Definition at line 111 of file 2d/matrix.hh.

References T2DVector< T2DVector< T > >::x, and T2DVector< T2DVector< T > >::y.

◆ operator=()

template<typename T >
T2DMatrix< T > & T2DMatrix< T >::operator= ( const T2DMatrix< T > &  o)

assignment operator

Definition at line 103 of file 2d/matrix.hh.

References T2DVector< T2DVector< T > >::x, and T2DVector< T2DVector< T > >::y.

◆ transposed()

template<typename T >
T2DMatrix< T > T2DMatrix< T >::transposed ( ) const
Returns
the transposed of this matrix

Definition at line 119 of file 2d/matrix.hh.

References T2DVector< T2DVector< T > >::x, and T2DVector< T2DVector< T > >::y.

Field Documentation

◆ _0

template<typename T>
const T2DMatrix< T > T2DMatrix< T >::_0
static

Definition at line 65 of file 2d/matrix.hh.

◆ _1

template<typename T>
const T2DMatrix< T > T2DMatrix< T >::_1
static

Definition at line 64 of file 2d/matrix.hh.


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