MipBaselib::Roto2DArma Class Reference

This class represents the generic rotation matrix in 2D. More...

#include <R2Arma.h>

List of all members.

Public Member Functions

 Roto2DArma (CanonicalArmaMatrix init=ZERO_ARMA_MATRIX)
 Default constructor.
 Roto2DArma (const Decimal &a11, const Decimal &a12, const Decimal &a21, const Decimal &a22)
 Complete constructor, given as the four elements of the matrix.
 Roto2DArma (const Decimal &yaw)
 Constructor with yaw (cos(yaw) -sin(yaw); sin(yaw) cos(yaw)).
 Roto2DArma (const Roto2DArma &A)
 Copy constructor.
 Roto2DArma (const arma::Mat< Decimal >::fixed< 2, 2 > &rhs)
 Copy constructor from an arma Matrix.
 Roto2DArma (const vector< Decimal > &vec)
 Constructor with vector of Decimal (vec.at(0) vec.at(1); vec.at(2) vec.at(3)).
Roto2DArmaoperator= (const Roto2DArma &rhs)
 Assignment operator.
Roto2DArmaoperator= (const arma::Mat< Decimal >::fixed< 2, 2 > &rhs)
 Assignment operator.
Roto2DArmaoperator+= (const Roto2DArma &pos)
 Compound assignment operator product by a another Roto2DArma pos +=.
Roto2DArma operator+ (Roto2DArma &other) const
 Binary arithmetic operator element-wise Roto2DArma.
Roto2DArma operator- (Roto2DArma &other) const
 Binary arithmetic operator element-wise Roto2DArma.
Roto2DArmaoperator-= (const Roto2DArma &pos)
 Compound assignment operator product by a another Roto2DArma pos -=.
Roto2DArmaoperator*= (const Roto2DArma &pos)
 Compound assignment operator product by a another Roto2DArma pos *=.
Roto2DArmaoperator*= (const Decimal &scalar)
 Compound assignment operator product by a scalar *.
Roto2DArma operator* (Roto2DArma &other) const
 Binary arithmetic operator element-wise scalar.
Roto2DArmaoperator/= (const Roto2DArma &pos)
 Compound assignment operator product by a another Roto2DArma pos *=.
Roto2DArmaoperator/= (const Decimal &scalar)
 Compound assignment operator product by a scalar *.
Roto2DArma operator/ (Roto2DArma &other) const
 Binary arithmetic operator element-wise scalar.
string print ()
 Print.
Roto2DArma invMatrix ()
 Return the inverse matrix using armadillo libraries.
arma::Mat< DecimalsubMat (int r, int c, int R, int C)
 Return the submatrix specified by the input values.
arma::Row< Decimal >::fixed< 2 > getFirstRow () const
 Get the first row of the matrix.
arma::Row< Decimal >::fixed< 2 > getSecondRow () const
 Get the second row of the matrix.
arma::Col< Decimal >::fixed< 2 > getFirstCol () const
 Get the first row of the matrix.
arma::Col< Decimal >::fixed< 2 > getSecondCol () const
 Get the second row of the matrix.
Decimal getElem (int r, int c) const
 Return the element in position [r,c] starting from [0,0].
void setElem (int r, int c, const Decimal &item)
 Set the element in position [r,c] starting from [0,0].
Decimal getYaw () const
 Get the yaw angle.
Angle getYawAngle () const
 Get the yaw angle.
arma::Mat< Decimal >::fixed< 2, 2 > * getMat ()
 Pointer to armadillo matrix.


Detailed Description

This class represents the generic rotation matrix in 2D.

Constructor & Destructor Documentation

Roto2DArma::Roto2DArma ( CanonicalArmaMatrix  init = ZERO_ARMA_MATRIX  ) 

Default constructor.

Roto2DArma::Roto2DArma ( const Decimal a11,
const Decimal a12,
const Decimal a21,
const Decimal a22 
)

Complete constructor, given as the four elements of the matrix.

Roto2DArma::Roto2DArma ( const Decimal yaw  ) 

Constructor with yaw (cos(yaw) -sin(yaw); sin(yaw) cos(yaw)).

Roto2DArma::Roto2DArma ( const Roto2DArma A  ) 

Copy constructor.

Roto2DArma::Roto2DArma ( const arma::Mat< Decimal >::fixed< 2, 2 > &  rhs  ) 

Copy constructor from an arma Matrix.

MipBaselib::Roto2DArma::Roto2DArma ( const vector< Decimal > &  vec  ) 

Constructor with vector of Decimal (vec.at(0) vec.at(1); vec.at(2) vec.at(3)).

Note:
Assumption: vector in input has 4 elements. No checking for computational efficiency


Member Function Documentation

Roto2DArma & Roto2DArma::operator= ( const Roto2DArma rhs  ) 

Assignment operator.

Roto2DArma & Roto2DArma::operator= ( const arma::Mat< Decimal >::fixed< 2, 2 > &  rhs  ) 

Assignment operator.

Roto2DArma & Roto2DArma::operator+= ( const Roto2DArma pos  ) 

Compound assignment operator product by a another Roto2DArma pos +=.

Roto2DArma Roto2DArma::operator+ ( Roto2DArma other  )  const

Binary arithmetic operator element-wise Roto2DArma.

Roto2DArma Roto2DArma::operator- ( Roto2DArma other  )  const

Binary arithmetic operator element-wise Roto2DArma.

Roto2DArma & Roto2DArma::operator-= ( const Roto2DArma pos  ) 

Compound assignment operator product by a another Roto2DArma pos -=.

Roto2DArma & Roto2DArma::operator*= ( const Roto2DArma pos  ) 

Compound assignment operator product by a another Roto2DArma pos *=.

Roto2DArma & Roto2DArma::operator*= ( const Decimal scalar  ) 

Compound assignment operator product by a scalar *.

Roto2DArma Roto2DArma::operator* ( Roto2DArma other  )  const

Binary arithmetic operator element-wise scalar.

Roto2DArma & Roto2DArma::operator/= ( const Roto2DArma pos  ) 

Compound assignment operator product by a another Roto2DArma pos *=.

Roto2DArma & Roto2DArma::operator/= ( const Decimal scalar  ) 

Compound assignment operator product by a scalar *.

Roto2DArma Roto2DArma::operator/ ( Roto2DArma other  )  const

Binary arithmetic operator element-wise scalar.

string Roto2DArma::print (  ) 

Print.

Roto2DArma Roto2DArma::invMatrix (  ) 

Return the inverse matrix using armadillo libraries.

Returns:
Inverse matrix

arma::Mat< Decimal > Roto2DArma::subMat ( int  r,
int  c,
int  R,
int  C 
)

Return the submatrix specified by the input values.

Parameters:
[in] r First row
[in] R Last row
[in] c First column
[in] C Last column
Note:
No control on the dimension and exceeding od row/column for efficiency

arma::Row< Decimal >::fixed< 2 > Roto2DArma::getFirstRow (  )  const

Get the first row of the matrix.

Returns:
The first row of the matrix

arma::Row< Decimal >::fixed< 2 > Roto2DArma::getSecondRow (  )  const

Get the second row of the matrix.

Returns:
The second row of the matrix

arma::Col< Decimal >::fixed< 2 > Roto2DArma::getFirstCol (  )  const

Get the first row of the matrix.

Returns:
The first row of the matrix

arma::Col< Decimal >::fixed< 2 > Roto2DArma::getSecondCol (  )  const

Get the second row of the matrix.

Returns:
The second row of the matrix

Decimal Roto2DArma::getElem ( int  r,
int  c 
) const

Return the element in position [r,c] starting from [0,0].

Parameters:
[in] r Row of the element one wants to find
[in] c Column of the element one wants to find
Returns:
Element in position [r,c]

void Roto2DArma::setElem ( int  r,
int  c,
const Decimal item 
)

Set the element in position [r,c] starting from [0,0].

Parameters:
[in] r Row of the element one wants to set
[in] c Column of the element one wants to set
[in] item Element one wants to insert in [r,c]

Decimal Roto2DArma::getYaw (  )  const

Get the yaw angle.

Returns:
Yaw angle

Angle Roto2DArma::getYawAngle (  )  const

Get the yaw angle.

Returns:
Yaw angle

arma::Mat< Decimal >::fixed< 2, 2 > * Roto2DArma::getMat (  ) 

Pointer to armadillo matrix.


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

Generated on Mon Feb 20 07:01:12 2017 for MIP by  doxygen 1.5.6