TinyVector< 1, T > Class Template Reference

#include <TinyVector.hpp>

Collaboration diagram for TinyVector< 1, T >:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 operator T & ()
 operator const T & () const
T & operator[] (const size_t &i)
const T & operator[] (const size_t &i) const
size_t size () const
 TinyVector (const T &y)
 TinyVector ()
 TinyVector (const TinyVector< 1, real_t > &V)
 Copy constructor.
 ~TinyVector ()

Protected Attributes

__x
 The value of the.

Private Types

enum  { Dimension = 1 }
typedef T ValueType
 The type of values stored in the TinyVector.


Detailed Description

template<typename T>
class TinyVector< 1, T >

Definition at line 830 of file TinyVector.hpp.


Member Typedef Documentation

template<typename T>
typedef T TinyVector< 1, T >::ValueType [private]

The type of values stored in the TinyVector.

Definition at line 833 of file TinyVector.hpp.


Member Enumeration Documentation

template<typename T>
anonymous enum [private]

Enumerator:
Dimension  The dimension of the vector

Definition at line 835 of file TinyVector.hpp.

00835        {
00836     Dimension =1                
00837   };


Constructor & Destructor Documentation

template<typename T>
TinyVector< 1, T >::TinyVector ( const T &  y  )  [inline]

Constructs a TinyVector using a T

Parameters:
y the given value

Definition at line 908 of file TinyVector.hpp.

00909     : __x(y)
00910   {
00911     ;
00912   }

template<typename T>
TinyVector< 1, T >::TinyVector (  )  [inline]

Default constructor.

Note:
data are not initialized

Definition at line 919 of file TinyVector.hpp.

00920   {
00921     ;
00922   }

template<typename T>
TinyVector< 1, T >::TinyVector ( const TinyVector< 1, real_t > &  V  )  [inline]

Copy constructor.

Copy constructor.

Parameters:
V the original vector

Definition at line 930 of file TinyVector.hpp.

00931     : __x(V.__x)
00932   {
00933     ;
00934   }

template<typename T>
TinyVector< 1, T >::~TinyVector (  )  [inline]

Destructor

Definition at line 940 of file TinyVector.hpp.

00941   {
00942     ;
00943   }


Member Function Documentation

template<typename T>
TinyVector< 1, T >::operator T & (  )  [inline]

Cast operators to use TinyVector<1, T> as r_values. So, TinyVector<1,T> can be used as an argument for all 'T' functions.

Returns:
the value

Definition at line 850 of file TinyVector.hpp.

References TinyVector< N, T >::__x.

00851   {
00852     return __x;
00853   }

template<typename T>
TinyVector< 1, T >::operator const T & (  )  const [inline]

Cast operators to use TinyVector<1, T> as r_values. So, TinyVector<1,T> can be used as an argument for all 'T' functions.

Returns:
the value

Definition at line 862 of file TinyVector.hpp.

References TinyVector< N, T >::__x.

00863   {
00864     return __x;
00865   }

template<typename T>
T& TinyVector< 1, T >::operator[] ( const size_t &  i  )  [inline]

Compatibility access function

Parameters:
i the component
Returns:
the ith value

Definition at line 874 of file TinyVector.hpp.

References TinyVector< N, T >::__x, and ASSERT.

00875   {
00876     ASSERT(i==0);
00877     return __x;
00878   }

template<typename T>
const T& TinyVector< 1, T >::operator[] ( const size_t &  i  )  const [inline]

Compatibility access function

Parameters:
i the component
Returns:
the ith value

Definition at line 887 of file TinyVector.hpp.

References TinyVector< N, T >::__x, and ASSERT.

00888   {
00889     ASSERT(i==0);
00890     return __x;
00891   }

template<typename T>
size_t TinyVector< 1, T >::size (  )  const [inline]

Read-only access to the dimension of the TinyVector.

Returns:
1

Definition at line 898 of file TinyVector.hpp.

00899   {
00900     return 1;
00901   }


Member Data Documentation

template<typename T>
T TinyVector< 1, T >::__x [protected]

The value of the.

Definition at line 840 of file TinyVector.hpp.


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

Generated on Wed Nov 19 00:16:30 2008 for FreeFEM3D (aka ff3d) by  doxygen 1.5.6