#include <TooN.h>
Public Member Functions | |
Members in the category ``sized operators'' | |
int | size () const |
int | num_rows () const |
int | num_cols () const |
Members used by Vector | |
template<int Size, class Precision , class Base > | |
void | eval (Vector< Size, Precision, Base > &v) const |
template<int Size, typename P1 , typename B1 > | |
void | plusequals (Vector< Size, P1, B1 > &v) const |
template<int Size, typename P1 , typename B1 > | |
void | minusequals (Vector< Size, P1, B1 > &v) const |
template<int Size, typename P1 , typename B1 > | |
Operator< T > | add (const Vector< Size, P1, B1 > &v) const |
template<int Size, typename P1 , typename B1 > | |
Operator< T > | rsubtract (const Vector< Size, P1, B1 > &v) const |
template<int Size, typename P1 , typename B1 > | |
Operator< T > | lsubtract (const Vector< Size, P1, B1 > &v) const |
Members used by Matrix | |
This function must be present for construction and assignment of matrices to work. | |
template<int R, int C, class P , class B > | |
void | eval (Matrix< R, C, P, B > &m) const |
template<int Rows, int Cols, typename P1 , typename B1 > | |
Operator< T > | add (const Matrix< Rows, Cols, P1, B1 > &m) const |
template<int Rows, int Cols, typename P1 , typename B1 > | |
Operator< T > | rsubtract (const Matrix< Rows, Cols, P1, B1 > &m) const |
template<int Rows, int Cols, typename P1 , typename B1 > | |
Operator< T > | lsubtract (const Matrix< Rows, Cols, P1, B1 > &m) const |
template<int Rows, int Cols, typename P1 , typename B1 > | |
void | plusequals (Matrix< Rows, Cols, P1, B1 > &m) const |
template<int Rows, int Cols, typename P1 , typename B1 > | |
void | minusequals (Matrix< Rows, Cols, P1, B1 > &m) const |
Members in the category ``sizeable oberators'' | |
Operator< T > | operator() (int size) const |
Operator< T > | operator() (int num_rows, int num_cols) const |
Members in the category ``scalable operators'' | |
typedef T | Precision |
template<class Pout , class Pmult > | |
Operator< Internal::Identity < Pout > > | scale_me (const Pmult &m) const |
For internal use only.
They have two main uses. The first use is in construction and is completely hidden. For an expression such as a+b, the return value of operator+ will be constructed in place in the return statement, to prevent excessive copying and calls to new/delete.
The other use is much more visible and is for objects such as TooN::Zeros and TooN::Idendity .
The features allowed (construction, addition, etc) depend on the members present. For simplicity, general arguments are given below. If members are non-general, then the operators will simply not be applicable to all vectors or matrices.
Operators belong to any of a number of categories depending on the members they provide. The categories are:
typedef T Precision |
Precision of the operator's scale.
int size | ( | ) | const |
This must be provided in order to construct dynamic vectors.
int num_rows | ( | ) | const |
This along with num_cols() must be present in order to construct matrices.
Reimplemented in Operator< Internal::SizedIdentity< Precision > >.
int num_cols | ( | ) | const |
This along with num_rows() must be present in order to construct matrices.
Reimplemented in Operator< Internal::SizedIdentity< Precision > >.
This function must be present for construction and assignment of vectors to work.
Referenced by DiagonalMatrix< Size, Precision, Base >::DiagonalMatrix(), Matrix< Size, Size, Precision >::Matrix(), Vector< Vertices, Precision >::operator=(), and Vector< Vertices, Precision >::Vector().
void plusequals | ( | Vector< Size, P1, B1 > & | v | ) | const |
This must be present for vector += operator.
Referenced by Vector< Vertices, Precision >::operator+=().
void minusequals | ( | Vector< Size, P1, B1 > & | v | ) | const |
This must be present for vector -= operator.
This function must be present for vector + operator and operator + vector.
This function must be present for vector - operator.
This function must be present for operator - vector.
This function must be present for matrix + operator and operator + matrix.
This function must be present for matrix - operator.
This function must be present for operator - matrix.
void plusequals | ( | Matrix< Rows, Cols, P1, B1 > & | m | ) | const |
This must be present for matrix += operator.
void minusequals | ( | Matrix< Rows, Cols, P1, B1 > & | m | ) | const |
This must be present for matrix -= operator.
Operator<T> operator() | ( | int | size | ) | const |
Create an operator that knows its size.
Suitable for vectors and square matrices.
Operator<T> operator() | ( | int | num_rows, | |
int | num_cols | |||
) | const |
Create an operator that knows its size, suitable for matrices.
Operator<Internal::Identity<Pout> > scale_me | ( | const Pmult & | m | ) | const |
Scale the operator by a scalar and return a new opeator.
Reimplemented in Operator< Internal::SizedIdentity< Precision > >.