TooN::DiagonalMatrix< Size, Precision, Base > Class Template Reference
[Linear Algebra]

#include <diagmatrix.h>

List of all members.

Public Member Functions

const Vector< Size, Precision,
Base >::as_slice_type 
diagonal_slice () const
 Return the leading diagonal as a vector.
Vector< Size, Precision, Base >
::as_slice_type 
diagonal_slice ()
 Return the leading diagonal as a vector.
const Precision & operator[] (int i) const
 Index the leading elements on the diagonal.
Precision & operator[] (int i)
 Index the leading elements on the diagonal.
Constructors

template<int Size2, typename Precision2 , typename Base2 >
 DiagonalMatrix (const Vector< Size2, Precision2, Base2 > &from)
template<class Op >
 DiagonalMatrix (const Operator< Op > &op)
 my_vector constructed from a TooN::Operator
 DiagonalMatrix (Precision *data_in, int size_in, int stride_in, Internal::Slicing)
 DiagonalMatrix (Precision *data, int size_in)
 DiagonalMatrix (Precision *data)
 DiagonalMatrix (int size_in)
 DiagonalMatrix ()

Public Attributes

Vector< Size, Precision, Base > my_vector
 The vector used to hold the leading diagonal.

Detailed Description

template<int Size = Dynamic, typename Precision = DefaultPrecision, typename Base = Internal::VBase>
class TooN::DiagonalMatrix< Size, Precision, Base >

A diagonal matrix

Support is limited but diagonal matrices can be multiplied by vectors, matrices or diagonal matrices on either side.

Diagonal matrices can be created from vectors by using the as_diagonal() member function:

Vector<3> v = makeVector(1,2,3);
Vector<3> v2 = v.as_diagonal() * v;   // v2 = (1,4,9)

A vector can be obtained from the diagonal matrix by using the diagonal_slice() member function.

Definition at line 56 of file diagmatrix.h.


Constructor & Destructor Documentation

template<int Size = Dynamic, typename Precision = DefaultPrecision, typename Base = Internal::VBase>
TooN::DiagonalMatrix< Size, Precision, Base >::DiagonalMatrix (  )  [inline]

Definition at line 61 of file diagmatrix.h.

template<int Size = Dynamic, typename Precision = DefaultPrecision, typename Base = Internal::VBase>
TooN::DiagonalMatrix< Size, Precision, Base >::DiagonalMatrix ( int  size_in  )  [inline]

Definition at line 62 of file diagmatrix.h.

template<int Size = Dynamic, typename Precision = DefaultPrecision, typename Base = Internal::VBase>
TooN::DiagonalMatrix< Size, Precision, Base >::DiagonalMatrix ( Precision *  data  )  [inline]

Definition at line 63 of file diagmatrix.h.

template<int Size = Dynamic, typename Precision = DefaultPrecision, typename Base = Internal::VBase>
TooN::DiagonalMatrix< Size, Precision, Base >::DiagonalMatrix ( Precision *  data,
int  size_in 
) [inline]

Definition at line 64 of file diagmatrix.h.

template<int Size = Dynamic, typename Precision = DefaultPrecision, typename Base = Internal::VBase>
TooN::DiagonalMatrix< Size, Precision, Base >::DiagonalMatrix ( Precision *  data_in,
int  size_in,
int  stride_in,
Internal::Slicing   
) [inline]

Definition at line 65 of file diagmatrix.h.

template<int Size = Dynamic, typename Precision = DefaultPrecision, typename Base = Internal::VBase>
template<class Op >
TooN::DiagonalMatrix< Size, Precision, Base >::DiagonalMatrix ( const Operator< Op > &  op  )  [inline]

my_vector constructed from a TooN::Operator

Definition at line 72 of file diagmatrix.h.

template<int Size = Dynamic, typename Precision = DefaultPrecision, typename Base = Internal::VBase>
template<int Size2, typename Precision2 , typename Base2 >
TooN::DiagonalMatrix< Size, Precision, Base >::DiagonalMatrix ( const Vector< Size2, Precision2, Base2 > &  from  )  [inline]

Definition at line 80 of file diagmatrix.h.


Member Function Documentation

template<int Size = Dynamic, typename Precision = DefaultPrecision, typename Base = Internal::VBase>
const Vector<Size, Precision, Base>::as_slice_type TooN::DiagonalMatrix< Size, Precision, Base >::diagonal_slice (  )  const [inline]

Return the leading diagonal as a vector.

Definition at line 100 of file diagmatrix.h.

template<int Size = Dynamic, typename Precision = DefaultPrecision, typename Base = Internal::VBase>
Vector<Size, Precision, Base>::as_slice_type TooN::DiagonalMatrix< Size, Precision, Base >::diagonal_slice (  )  [inline]

Return the leading diagonal as a vector.

Definition at line 95 of file diagmatrix.h.

template<int Size = Dynamic, typename Precision = DefaultPrecision, typename Base = Internal::VBase>
const Precision& TooN::DiagonalMatrix< Size, Precision, Base >::operator[] ( int  i  )  const [inline]

Index the leading elements on the diagonal.

Definition at line 92 of file diagmatrix.h.

template<int Size = Dynamic, typename Precision = DefaultPrecision, typename Base = Internal::VBase>
Precision& TooN::DiagonalMatrix< Size, Precision, Base >::operator[] ( int  i  )  [inline]

Index the leading elements on the diagonal.

Definition at line 90 of file diagmatrix.h.


Member Data Documentation

template<int Size = Dynamic, typename Precision = DefaultPrecision, typename Base = Internal::VBase>
Vector<Size,Precision,Base> TooN::DiagonalMatrix< Size, Precision, Base >::my_vector

The vector used to hold the leading diagonal.

Definition at line 105 of file diagmatrix.h.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Friends Defines


libtoon
Author(s): Florian Weisshardt
autogenerated on Fri Jan 11 10:09:49 2013