ma::maths::Map

An array expression mapping an existing array of data. More...

Header
#include <openma/maths/map.h>

Module

Public Types#

using
Values = typename Traits< Map< Derived >>::Values

using
Residuals = typename Traits< Map< Derived >>::Residuals

using
Index = typename Traits< Map< Derived >>::Index

using
Scalar = typename Traits< Map< Derived >>::Scalar

Public Functions#

Map()

Map(Index rows, Scalar *values, Scalar *residuals)

Map(const Map< U > &other)

Map< Derived > &
operator=(const XprBase< U > &other)

Detailed Description#

Todo

Write a detailed description

Member Type Documentation#

ma::maths::Map::Index

Type used to access elements in Values or Residuals.

ma::maths::Map::Residuals

Type representing the residuals associated with the data. Depending of the inheriting class (e.g Array or Map), the residuals are stored using specific Eigen (http://eigen.tuxfamily.org) object (i.e. Eigen::Array or Eigen::Map).

ma::maths::Map::Scalar

Type used for each element in Values and Residuals.

ma::maths::Map::Values

Type representing the data. Depending of the inheriting class (e.g Array or Map), the data are stored using specific Eigen (http://eigen.tuxfamily.org) object (i.e. Eigen::Array or Eigen::Map).

Member Function Documentation#

ma::maths::Map::Map ( ) [inline]

Default constructor. This create a null map. The method isValid() will return false. The use of this constructor is interesting only if you want to reuse a variable.

ma::maths::Map::Map ( Index rows , Scalar * values , Scalar * residuals ) [inline]

Constructor where rows must correspond to the number of rows provided in values and residuals. The number of elements in values must correspond to rows multiplied by the number of columns used by the Derived class. The number of elements in residuals must correspond to rows elements.

ma::maths::Map::Map ( const Map < U > & other ) [inline]

Copy constructor for const Map only

Map < Derived > & ma::maths::Map::operator= ( const XprBase < U > & other ) [inline]

Assignment operator from any other template expression

Warning

You should be sur to have a Map object able to store the result of the template expression other. Otherwise, you should have a crash (buffer overflow). Do not use the default constructor.