NeoPZ
Public Types | Public Member Functions | Private Member Functions | Private Attributes | List of all members
TinyVector< T, Num > Class Template Reference

#include <tinyvec.h>

Collaboration diagram for TinyVector< T, Num >:
[legend]

Public Types

typedef T value_type
 

Public Member Functions

 TinyVector ()
 
 TinyVector (const T &val)
 
 TinyVector (const TinyVector< T, Num > &a)
 
 ~TinyVector ()
 
T & operator[] (int i)
 
const T & operator[] (int i) const
 
T & operator() (int i)
 
const T & operator() (int i) const
 
TinyVector< T, Num > & operator= (const T &val)
 
TinyVector< T, Num > & operator= (const TinyVector< T, Num > &a)
 
int size () const
 
int capacity () const
 
T * begin () const
 
int no (const T *ptr) const
 
TinyVector< T, Num > & operator+= (const TinyVector< T, Num > &v)
 
TinyVector< T, Num > & operator-= (const TinyVector< T, Num > &v)
 

Private Member Functions

void CheckSize (int i) const
 
void copy (const TinyVector< T, Num > &a)
 
void copy (const T &val)
 

Private Attributes

ptr_to_data [Num]
 

Detailed Description

template<class T, int Num>
class TinyVector< T, Num >

Definition at line 24 of file tinyvec.h.

Member Typedef Documentation

◆ value_type

template<class T, int Num>
typedef T TinyVector< T, Num >::value_type

Definition at line 33 of file tinyvec.h.

Constructor & Destructor Documentation

◆ TinyVector() [1/3]

template<class T, int Num>
TinyVector< T, Num >::TinyVector ( )
inline

Definition at line 35 of file tinyvec.h.

References TinyVector< T, Num >::copy().

◆ TinyVector() [2/3]

template<class T, int Num>
TinyVector< T, Num >::TinyVector ( const T &  val)
inline

Definition at line 36 of file tinyvec.h.

References TinyVector< T, Num >::copy().

◆ TinyVector() [3/3]

template<class T, int Num>
TinyVector< T, Num >::TinyVector ( const TinyVector< T, Num > &  a)
inline

Definition at line 37 of file tinyvec.h.

References TinyVector< T, Num >::copy().

◆ ~TinyVector()

template<class T, int Num>
TinyVector< T, Num >::~TinyVector ( )
inline

Definition at line 40 of file tinyvec.h.

Member Function Documentation

◆ begin()

template<class T, int Num>
T* TinyVector< T, Num >::begin ( ) const
inline

Definition at line 62 of file tinyvec.h.

References TinyVector< T, Num >::ptr_to_data.

Referenced by TinyVector< T, Num >::no().

◆ capacity()

template<class T, int Num>
int TinyVector< T, Num >::capacity ( ) const
inline

Definition at line 61 of file tinyvec.h.

Referenced by TinyVector< T, Num >::size().

◆ CheckSize()

template<class T, int Num>
void TinyVector< T, Num >::CheckSize ( int  i) const
inlineprivate

Definition at line 69 of file tinyvec.h.

References error().

Referenced by TinyVector< T, Num >::operator()(), and TinyVector< T, Num >::operator[]().

◆ copy() [1/2]

template<class T, int Num>
void TinyVector< T, Num >::copy ( const TinyVector< T, Num > &  a)
inlineprivate

Definition at line 77 of file tinyvec.h.

References Copy().

Referenced by TinyVector< T, Num >::operator=(), and TinyVector< T, Num >::TinyVector().

◆ copy() [2/2]

template<class T, int Num>
void TinyVector< T, Num >::copy ( const T &  val)
inlineprivate

Definition at line 80 of file tinyvec.h.

References Copy().

◆ no()

template<class T, int Num>
int TinyVector< T, Num >::no ( const T *  ptr) const
inline

◆ operator()() [1/2]

template<class T, int Num>
T& TinyVector< T, Num >::operator() ( int  i)
inline

◆ operator()() [2/2]

template<class T, int Num>
const T& TinyVector< T, Num >::operator() ( int  i) const
inline

◆ operator+=()

template<class T , int Num>
TinyVector< T, Num > & TinyVector< T, Num >::operator+= ( const TinyVector< T, Num > &  v)
inline

Definition at line 103 of file tinyvec.h.

References TinyVector< T, Num >::ptr_to_data.

Referenced by TinyVector< T, Num >::no().

◆ operator-=()

template<class T , int Num>
TinyVector< T, Num > & TinyVector< T, Num >::operator-= ( const TinyVector< T, Num > &  v)
inline

Definition at line 114 of file tinyvec.h.

References TinyVector< T, Num >::ptr_to_data.

Referenced by TinyVector< T, Num >::no().

◆ operator=() [1/2]

template<class T, int Num>
TinyVector< T, Num >& TinyVector< T, Num >::operator= ( const T &  val)
inline

Definition at line 56 of file tinyvec.h.

References TinyVector< T, Num >::copy().

◆ operator=() [2/2]

template<class T, int Num>
TinyVector< T, Num >& TinyVector< T, Num >::operator= ( const TinyVector< T, Num > &  a)
inline

Definition at line 57 of file tinyvec.h.

References TinyVector< T, Num >::copy().

◆ operator[]() [1/2]

template<class T, int Num>
T& TinyVector< T, Num >::operator[] ( int  i)
inline

◆ operator[]() [2/2]

template<class T, int Num>
const T& TinyVector< T, Num >::operator[] ( int  i) const
inline

◆ size()

template<class T, int Num>
int TinyVector< T, Num >::size ( ) const
inline

Definition at line 60 of file tinyvec.h.

References TinyVector< T, Num >::capacity().

Member Data Documentation

◆ ptr_to_data

template<class T, int Num>
T TinyVector< T, Num >::ptr_to_data[Num]
private

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