fmatvec 0.0.0

Public Types | Public Member Functions | Static Public Attributes | List of all members
fmatvec::RowVector< Fixed< N >, AT > Class Template Reference

This is a rowvector class of general shape in dense storage format. More...

`#include <fixed_row_vector.h>`

Inheritance diagram for fmatvec::RowVector< Fixed< N >, AT >:
[legend]

## Public Types

using | iterator = AT *
using | const_iterator = const AT *
using | value_type = AT
Public Types inherited from fmatvec::Matrix< General, Fixed< 1 >, Fixed< N >, AT >
using | value_type = AT
using | shape_type = General

## Public Member Functions

| RowVector (Noinit ini)
| RowVector (Init ini=INIT, const AT &a=AT())
| RowVector (int n, Noinit ini)
| RowVector (int n, Init ini=INIT, const AT &a=AT())
| RowVector (const RowVector< Fixed< N >, AT > &A)=default
| Copy Constructor. More...
template<class Row >
| RowVector (const RowVector< Row, AT > &A)
| Copy Constructor. More...
template<class Type , class Row , class Col >
| RowVector (const Matrix< Type, Row, Col, AT > &A)
| Copy Constructor. More...
| RowVector (const char *str)
| String Constructor. More...
RowVector< Fixed< N >, AT > & | operator= (const RowVector< Fixed< N >, AT > &x)=default
| Assignment operator. More...
template<class Row >
RowVector< Fixed< N >, AT > & | operator= (const RowVector< Row, AT > &x)
| Assignment operator. More...
template<class Row >
RowVector< Fixed< N >, AT > & | operator<<= (const RowVector< Row, AT > &x)
| Matrix assignment. More...
AT & | operator() (int i)
| Element operator. More...
const AT & | operator() (int i) const
| Element operator. More...
iterator | begin ()
iterator | end ()
const_iterator | begin () const
const_iterator | end () const
const_iterator | cbegin () const noexcept
const_iterator | cend () const noexcept
AT & | e (int i)
const AT & | e (int i) const
| Element operator. More...
RowVector< Fixed< N >, AT > & | init (const AT &val=AT())
| Initialization. More...
RowVector< Fixed< N >, AT > & | init (Init, const AT &a=AT())
RowVector< Fixed< N >, AT > & | init (Noinit, const AT &a=AT())
constexpr int | size () const
| Size. More...
void | resize (int n)
int | inc () const
| Increment. More...
| operator std::vector< AT > () const
| Cast to std::vector<AT>. More...
| RowVector (const std::vector< AT > &v)
| std::vector<AT> Constructor. Constructs and initializes a vector with a std::vector<AT> object. More...
const Vector< Fixed< N >, AT > | T () const
| Cast to AT. More...
Public Member Functions inherited from fmatvec::Matrix< General, Fixed< 1 >, Fixed< N >, AT >
AT & | operator() (int i, int j)
| Standard constructor. More...
const AT & | operator() (int i, int j) const
| Element operator. More...
AT & | e (int i, int j)
const AT & | e (int i, int j) const
int | rows () const
| Number of rows. More...
int | cols () const
| Number of columns. More...
| operator std::vector< std::vector< AT >> () const
| Cast to std::vector<std::vector<AT>>. More...

## Static Public Attributes

static constexpr bool | isVector {true}
Static Public Attributes inherited from fmatvec::Matrix< General, Fixed< 1 >, Fixed< N >, AT >
static constexpr bool | isVector

## Detailed Description

### template<int N, class AT>
class fmatvec::RowVector< Fixed< N >, AT >

This is a rowvector class of general shape in dense storage format.

Template class RowVector of type General,Fixed<1>,Fixed<N>,id. shape is general and storage form is dense. The template parameter AT defines the atomic type of the rowvector. Valid types are int, float, double, complex<float> and complex<double>

## Constructor & Destructor Documentation

## ◆ RowVector() [1/5]

template<int N, class AT >

fmatvec::RowVector< Fixed< N >, AT >::RowVector | ( | const RowVector< Fixed< N >, AT > & | A | ) |

default

Copy Constructor.

See RowVector(const RowVector<Fixed<N>,AT>

## ◆ RowVector() [2/5]

template<int N, class AT >
template<class Row >

fmatvec::RowVector< Fixed< N >, AT >::RowVector | ( | const RowVector< Row, AT > & | A | ) |

inline

Copy Constructor.

See Vector(const Vector<General, AT>&)

## ◆ RowVector() [3/5]

template<int N, class AT >
template<class Type , class Row , class Col >

fmatvec::RowVector< Fixed< N >, AT >::RowVector | ( | const Matrix< Type, Row, Col, AT > & | A | ) |

inline explicit

Copy Constructor.

See Vector(const Vector<General, AT>&)

## ◆ RowVector() [4/5]

template<int N, class AT >

fmatvec::RowVector< Fixed< N >, AT >::RowVector | ( | const char * | str | ) |

inline

String Constructor.

Constructs and initializes a vector with a string in a matlab-like notation. The entries are seperated by semicolons. For example

RowVector<Fixed<N>,AT>e> x("[3,1,2]");

constructs the vector

\[ x=\begin{pmatrix}3 1 2\end{pmatrix} \]

Parameters

  str | The string the vector will be initialized with.

## ◆ RowVector() [5/5]

template<int N, class AT >

fmatvec::RowVector< Fixed< N >, AT >::RowVector | ( | const std::vector< AT > & | v | ) |

inline explicit

std::vector<AT> Constructor. Constructs and initializes a vector with a std::vector<AT> object.

Parameters

  v | The std::vector<AT> the vector will be initialized with.

## Member Function Documentation

## ◆ e()

template<int N, class AT >

const AT& fmatvec::RowVector< Fixed< N >, AT >::e | ( | int | i | ) | const

inline

Element operator.

See e(int)

## ◆ inc()

template<int N, class AT >

int fmatvec::RowVector< Fixed< N >, AT >::inc | ( |  | ) | const

inline

Increment.

Todo:
  Docu

Returns
  The increment.

## ◆ init()

template<int N, class AT >

RowVector< Fixed< N >, AT > & fmatvec::RowVector< Fixed< N >, AT >::init | ( | const AT & | val = `AT()` | ) |

inline

Initialization.

Initializes all elements of the calling rowvector with the value given by a.

Parameters

  a | Value all elements will be initialized with.

Returns
  A reference to the calling rowvector.

## ◆ operator std::vector< AT >()

template<int N, class AT >

fmatvec::RowVector< Fixed< N >, AT >::operator std::vector< AT > | ( |  | ) | const

inline explicit

Cast to std::vector<AT>.

Returns
  The std::vector<AT> representation of the vector

## ◆ operator()() [1/2]

template<int N, class AT >

AT& fmatvec::RowVector< Fixed< N >, AT >::operator() | ( | int | i | ) |

inline

Element operator.

Returns a reference to the i-th element.

Parameters

  i | The i-th element.

Returns
  A reference to the element x(i).

Remarks
  The bounds are checked in debug mode.

See also
  operator()(int) const

## ◆ operator()() [2/2]

template<int N, class AT >

const AT& fmatvec::RowVector< Fixed< N >, AT >::operator() | ( | int | i | ) | const

inline

Element operator.

See operator()(int)

## ◆ operator<<=()

template<int N, class AT >
template<class Row >

RowVector<Fixed<N>,AT>& fmatvec::RowVector< Fixed< N >, AT >::operator<<= | ( | const RowVector< Row, AT > & | x | ) |

inline

Matrix assignment.

Copies the band matrix given by A.

Parameters

  A | The matrix to be copied.

Returns
  A reference to the calling matrix.

## ◆ operator=() [1/2]

template<int N, class AT >

RowVector<Fixed<N>,AT>& fmatvec::RowVector< Fixed< N >, AT >::operator= | ( | const RowVector< Fixed< N >, AT > & | x | ) |

inline default

Assignment operator.

Copies the vector given by x.

Parameters

  x | The vector to be assigned.

Returns
  A reference to the calling vector.

## ◆ operator=() [2/2]

template<int N, class AT >
template<class Row >

RowVector<Fixed<N>,AT>& fmatvec::RowVector< Fixed< N >, AT >::operator= | ( | const RowVector< Row, AT > & | x | ) |

inline

Assignment operator.

Copies the vector given by x.

Parameters

  x | The vector to be assigned.

Returns
  A reference to the calling vector.

## ◆ resize()

template<int N, class AT >

void fmatvec::RowVector< Fixed< N >, AT >::resize | ( | int | n | ) |

inline

Resize a fixed vector Do nothing for the fixed dimension and throw on any other dimension.

## ◆ size()

template<int N, class AT >

constexpr int fmatvec::RowVector< Fixed< N >, AT >::size | ( |  | ) | const

inline

Size.

Returns
  The size of the rowvector.

## ◆ T()

template<int N, class AT >

const Vector< Fixed< N >, AT > fmatvec::RowVector< Fixed< N >, AT >::T | ( |  | ) | const

inline

Cast to AT.

Returns
  The AT representation of the vector

AT Constructor. Constructs and initializes a vector with a AT object.

Parameters

  x | The AT the vector will be initialized with.

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

- /mbsim-env/fmatvec/fmatvec/fixed_row_vector.h