# ma::maths

Linear algebra for reconstructed data. More...

## Classes#

Class to store reconstructed data.

Define an Array with 12 columns to represent a 3D orientation and a 3D position along a sequence. Convenient class with dedicated methods to construct/access poses.

Base class for data storage.

Base class for binary operations.

Compute difference between given expressions.

Compute the sum of two expressions.

Compute the cross product of two expressions.

Compute the transformation of two expressions.

Expression to extract a block of data.

An array expression mapping an existing array of data.

Base class for unary operations.

Compute the Euclidean norm for each row.

Compute the average for each row.

Scale the data.

Normalize the data.

Replicate the rows vertically.

Compute the inverse.

Compute euler angles.

## Functions#

Result
to_arraybase_derived(T *ts, int components, int offset=0, int type=-1)

Map< Array< N > >
to_array(TimeSequence *ts, int offset=0, int type=-1)

Map< const Array< N > >
to_array(const TimeSequence *ts, int offset=0, int type=-1)

Map< Scalar >
to_scalar(TimeSequence *ts, int offset=0, int type=-1)

Map< const Scalar >
to_scalar(const TimeSequence *ts, int offset=0, int type=-1)

Map< Vector >
to_vector(TimeSequence *ts, int offset=0, int type=-1)

Map< const Vector >
to_vector(const TimeSequence *ts, int offset=0, int type=-1)

Map< Position >
to_position(TimeSequence *ts)

Map< const Position >
to_position(const TimeSequence *ts)

Map< Pose >
to_pose(TimeSequence *ts)

Map< const Pose >
to_pose(const TimeSequence *ts)

auto
generate_residuals(const U &condition) -> decltype(condition.select(Traits< Array< U::ColsAtCompileTime >>::Residuals::Zero(condition.rows(), 1),-1.0))

## Detailed Description#

This module corresponds to the library `openma_maths`

The usage of the library would be done only through the header `openma/maths.h`. You should not include other (sub-)header as they are dependent between them.

Todo

Details the goal and usage or ma::maths.

## Function Documentation#

Result ma::maths::to_arraybase_derived ( T * ts , int components , int offset = 0 , int type = -1 ) [inline]

Extract a Result Map object from the given TimeSequence ts. The Result object will have componments columns. If necessary the position of the data to extract can be shifted. It is also possible to specify the type of the TimeSequence by specifying a TimeSequence::Type value to type. If no type is required, you can let the value to -1. In case the number of components or the shift is greater than the number of columns, a empty object will be returned, This is the same if the expected type is not the good one.

Map< Array< N > > ma::maths::to_array ( TimeSequence * ts , int offset = 0 , int type = -1 ) [inline]

Extract from a TimeSequence ts a Map> where the number of columns of the resulting array is used as the number of components to extract. It is possible to specify a possible offset to shift the data to extract. The use of type will verify if the TimeSequence has the requeted type.

const Map< Array< N > > ma::maths::to_array ( const TimeSequence * ts , int offset = 0 , int type = -1 ) [inline]

Extract from a TimeSequence ts a Map> where the number of columns of the resulting array is used as the number of components to extract. It is possible to specify a possible offset to shift the data to extract. The use of type will verify if the TimeSequence has the requeted type.

Map< Scalar > ma::maths::to_scalar ( TimeSequence * ts , int offset = 0 , int type = -1 ) [inline]

Specialized extraction method where the resulting Map has 1 column. It is possible to specify a possible offset to shift the data to extract. The use of type will verify if the TimeSequence has the requeted type.

Map< const Scalar > ma::maths::to_scalar ( const TimeSequence * ts , int offset = 0 , int type = -1 ) [inline]

Specialized extraction method where the resulting Map has 1 column. It is possible to specify a possible offset to shift the data to extract. The use of type will verify if the TimeSequence has the requeted type.

Map< Vector > ma::maths::to_vector ( TimeSequence * ts , int offset = 0 , int type = -1 ) [inline]

Specialized extraction method where the resulting Map has 3 columns. It is possible to specify a possible offset to shift the data to extract. The use of type will verify if the TimeSequence has the requeted type.

Map< const Vector > ma::maths::to_vector ( const TimeSequence * ts , int offset = 0 , int type = -1 ) [inline]

Specialized extraction method where the resulting Map has 3 columns. It is possible to specify a possible offset to shift the data to extract. The use of type will verify if the TimeSequence has the requeted type.

Map< Position > ma::maths::to_position ( TimeSequence * ts ) [inline]

Specialized extraction method where the resulting Map has 3 columns (as well as the input - no possible offset) and the type must be set to TimeSequence::Marker.

Map< const Position > ma::maths::to_position ( const TimeSequence * ts ) [inline]

Specialized extraction method where the resulting Map has 3 columns (as well as the input - no possible offset) and the type must be set to TimeSequence::Marker.

Map< Pose > ma::maths::to_pose ( TimeSequence * ts ) [inline]

Specialized extraction method where the result is a Map object (as well as the input - no possible offset) and the type must be set to TimeSequence::Pose.

const Map< Pose > ma::maths::to_pose ( const TimeSequence * ts ) [inline]

Specialized extraction method where the result is a Map object (as well as the input - no possible offset) and the type must be set to TimeSequence::Pose.

auto ma::maths::generate_residuals ( const U & condition ) [inline]

Returns a column vector representing the result of the given condition. For elements where the condition is respected, the value is set to 0. Otherwise the value is set to -1.0. This represent valid (>= 0) and invalid (< 0) reconstructed data.