SourceForge Logo Tiny Vector Matrix library using Expression Templates Sourceforge Project Page

tvmet::XprLiteral< T > Class Template Reference

#include <tvmet/xpr/Literal.h>

Inheritance diagram for tvmet::XprLiteral< T >:

Inheritance graph
[legend]
Collaboration diagram for tvmet::XprLiteral< T >:

Collaboration graph
[legend]
List of all members.

Detailed Description

template<class T>
class tvmet::XprLiteral< T >

Specify literals like scalars into the expression.

This expression is used for vectors and matrices - the decision is done by the access operator.


Public Types

enum  { ops = 1 }
 Complexity counter. More...
typedef T value_type

Public Member Functions

 XprLiteral (value_type value)
 Constructor by value for literals .
value_type operator() (std::size_t) const
 Index operator, gives the value for vectors.
value_type operator() (std::size_t, std::size_t) const
 Index operator for arrays/matrices.
void print_xpr (std::ostream &os, std::size_t l=0) const

Private Member Functions

 XprLiteral ()
XprLiteraloperator= (const XprLiteral &)

Private Attributes

const value_type m_data


Member Typedef Documentation

template<class T>
typedef T tvmet::XprLiteral< T >::value_type


Member Enumeration Documentation

template<class T>
anonymous enum

Complexity counter.

Enumerator:
ops 


Constructor & Destructor Documentation

template<class T>
tvmet::XprLiteral< T >::XprLiteral (  )  [private]

template<class T>
tvmet::XprLiteral< T >::XprLiteral ( value_type  value  )  [inline, explicit]

Constructor by value for literals .


Member Function Documentation

template<class T>
XprLiteral& tvmet::XprLiteral< T >::operator= ( const XprLiteral< T > &   )  [private]

template<class T>
value_type tvmet::XprLiteral< T >::operator() ( std::size_t   )  const [inline]

Index operator, gives the value for vectors.

template<class T>
value_type tvmet::XprLiteral< T >::operator() ( std::size_t  ,
std::size_t   
) const [inline]

Index operator for arrays/matrices.

template<class T>
void tvmet::XprLiteral< T >::print_xpr ( std::ostream &  os,
std::size_t  l = 0 
) const [inline]


Member Data Documentation

template<class T>
const value_type tvmet::XprLiteral< T >::m_data [private]


Author: