Medusa  1.1
Coordinate Free Mehless Method implementation
MatrixAddons.hpp File Reference

Detailed Description

Plugins for Eigen::Matrix class.

This extension adds some convenience constructors and assignments from scalars and initializer lists for fixed size matrices. Additionally if makes all matrices compatible with range based for loops and STL containers by adding appropriate begin() and end() methods. It also offers linear and row linear views to matrices.

Definition in file MatrixAddons.hpp.

Go to the source code of this file.

Functions

Matrixoperator= (const Scalar &s)
 Assign scalar to a matrix, setting all its elements to s. More...
 
 Matrix (const Scalar &s)
 Construct matrix from scalar. Enabled only for fixed size matrices. More...
 
 Matrix (std::initializer_list< Scalar > lst)
 Construct a fixed sized matrix from an initializer list. More...
 
Map< Matrix< Scalar, Dynamic, 1 > > asLinear ()
 Returns a view to a matrix as a column vector. More...
 
Map< Matrix< Scalar, Dynamic, 1 > > asRowLinear ()
 Returns a view to a matrix as a row vector. More...
 

Function Documentation

◆ asLinear()

Map< Matrix< Scalar, Dynamic, 1 > > asLinear ( )

Returns a view to a matrix as a column vector.

Definition at line 53 of file MatrixAddons.hpp.

◆ asRowLinear()

Map< Matrix< Scalar, Dynamic, 1 > > asRowLinear ( )

Returns a view to a matrix as a row vector.

Definition at line 60 of file MatrixAddons.hpp.

◆ Matrix() [1/2]

Matrix ( const Scalar &  s)

Construct matrix from scalar. Enabled only for fixed size matrices.

Examples
test/types/Vec_test.cpp.

Definition at line 21 of file MatrixAddons.hpp.

◆ Matrix() [2/2]

Matrix ( std::initializer_list< Scalar >  lst)

Construct a fixed sized matrix from an initializer list.

Definition at line 42 of file MatrixAddons.hpp.

◆ operator=()

Matrix& operator= ( const Scalar &  s)

Assign scalar to a matrix, setting all its elements to s.

Definition at line 15 of file MatrixAddons.hpp.