TBCI Numerical high perf. C++ Library  2.8.0
Public Types | Public Member Functions | Static Public Member Functions | Friends | List of all members
TVector< T > Class Template Reference

Temporary Base Class Idiom: Class TVector is used for temporary variables. More...

#include <bvector.h>

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

Public Types

typedef T value_type
 
typedef T element_type
 
typedef T aligned_value_type TALIGN (MIN_ALIGN2)
 
- Public Types inherited from BVector< T >
typedef Titerator
 STL-like iterator support. More...
 
typedef const Tconst_iterator
 

Public Member Functions

 TVector (const unsigned long d=0)
 
 TVector (const T &val, const unsigned long d)
 
 TVector (const BVector< T > &bv)
 
 TVector (const Vector< T > &v)
 
 TVector (const TVector< T > &tv) HOT
 
 TVector (const TSVector< T > &ts)
 
 TVector (const Mat_Brack< T > &)
 
 ~TVector ()
 
unsigned long size () const
 
TVector< T > & operator= (const T &a)
 
TVector< T > & operator= (const Vector< T > &v)
 
TVector< T > & operator= (const TVector< T > &tv)
 alias More...
 
TVector< T > & operator= (const TSVector< T > &ts)
 
bool operator== (const TVector< T > &tv) const
 
bool operator!= (const TVector< T > &tv) const
 
bool operator== (const Vector< T > &v) const
 
bool operator!= (const Vector< T > &v) const
 
bool operator== (const BVector< T > &bv) const
 
bool operator!= (const BVector< T > &v) const
 
bool operator== (const TSVector< T > &tsv) const
 
bool operator!= (const TSVector< T > &tsv) const
 
TVector< T > & operator+= (const T &)
 TV += a. More...
 
TVector< T > & operator-= (const T &)
 TV -= a. More...
 
TVector< T > & operator*= (const T &)
 TV *= a. More...
 
TVector< T > & operator/= (const T &)
 TV /= a. More...
 
TVector< T > & operator+= (const Vector< T > &) HOT
 TV += V. More...
 
TVector< T > & operator-= (const Vector< T > &) HOT
 TV -= V. More...
 
TVector< T > & operator+= (const TVector< T > &tv)
 
TVector< T > & operator-= (const TVector< T > &tv)
 
TVector< T > & operator+= (const TSVector< T > &tsv) HOT
 TV += TSV. More...
 
TVector< T > & operator-= (const TSVector< T > &tsv) HOT
 TV -= TSV. More...
 
T min ()
 
T max ()
 
T sum ()
 
double fabssqr ()
 
double fabs ()
 
T abs ()
 
TVector< T > & operator+ (const Vector< T > &) HOT
 
TVector< T > & operator- (const Vector< T > &) HOT
 
TVector< T > & operator+ (const TSVector< T > &ts) HOT
 TV = TV + TSV Transformed to TV += TSV. More...
 
TVector< T > & operator- (const TSVector< T > &ts) HOT
 TV = TV - TSV Transformed to TV -= TSV. More...
 
const TVector< T > & operator+ (const TVector< T > &a) HOT
 TV = TV + TV Transformed to TV += TV. More...
 
const TVector< T > & operator- (const TVector< T > &a) HOT
 TV = TV - TV Transformed to TV -= TV. More...
 
T operator() (const unsigned long i)
 
T operator[] (const unsigned long i)
 
const Tgetcref (const unsigned long i) const
 
tbci_traits< T >::const_refval_type get (const unsigned long i) const
 
Tsetval (const unsigned long i) const
 
Tsetval (const T &val, const unsigned long i) const
 
Tset (const T &val, const unsigned long i) const
 
TVector< Tslice (const unsigned long, const unsigned long)
 
TVector< T > & incr (const unsigned long, const T=(T) 1)
 
TVector< T > & operator+ (const T &)
 
TVector< T > & operator- (const T &)
 
TSVector< Toperator* (const T &)
 
TSVector< Toperator/ (const T &)
 
TSVector< Toperator- ()
 
T operator* (const Vector< T > &v)
 
T operator* (TVector< T > &tv)
 
template<typename U >
 TVector (const BVector< U > &bv)
 
- Public Member Functions inherited from BVector< T >
 BVector (const unsigned long=0)
 
 BVector (const T &, const unsigned long)
 
 BVector (const BVector< T > &) HOT
 copy constructor More...
 
 BVector (const vararg va,...)
 
void destroy ()
 
 ~BVector ()
 
BVector< T > & init_0 ()
 
BVector< T > & fill (const T &) HOT
 
BVector< T > & resize (const BVector< T > &)
 Actually it's a resize and copy (some people would expect the assignment op to do this) More...
 
BVector< T > & resize (const unsigned long)
 
BVector< T > & resize (const T &, const unsigned long)
 
BVector< T > & cheapdownsize (const unsigned long)
 
BVector< T > & clear ()
 
BVector< T > & append (const T &)
 performs poorly More...
 
BVector< T > & push_back (const T &value)
 performs poorly More...
 
BVector< T > & append (const BVector< T > &)
 
BVector< T > & remove (const unsigned long)
 
BVector< T > & revert ()
 
BVector< T > & bubble_sort ()
 
BVector< T > & swap (BVector< T > &v)
 
Toperator() (const unsigned long) HOT
 
tbci_traits< T >::const_refval_type operator() (const unsigned long) const HOT
 
const Tgetcref (const unsigned long idx) const
 
tbci_traits< T >::const_refval_type get (const unsigned long idx) const HOT
 
Tset (const unsigned long idx) HOT
 
Tset (const T &val, unsigned long idx)
 
Toperator[] (const unsigned long i)
 
tbci_traits< T >::const_refval_type operator[] (const unsigned long i) const
 
unsigned long size () const HOT
 
T *const & vecptr () const
 
iterator begin ()
 
iterator end ()
 
const_iterator begin () const
 
const_iterator end () const
 
BVector< T > & setptr (T *pointer)
 
BVector< T > & setsize (const unsigned long size)
 
T *const & get_fortran_vector () const
 
void set_fortran_vector (T *pointer)
 
BVector< T > & operator= (const T &a)
 
BVector< T > & operator= (const BVector< T > &) HOT
 Note that the assignment op does NEVER resize the target BVector. More...
 
BVector< T > & alias (const BVector< T > &bv)
 
BVector< T > & copy (const BVector< T > &bv)
 copy does a resize, if necessary More...
 
bool operator== (const BVector< T > &) const HOT
 KG, 2001-06-29: Strange: If we don't inline this, we seems to get better performance in our solver benchmark (iPIII) More...
 
bool operator!= (const BVector< T > &bv) const
 
bool operator<= (const BVector< T > &bv) const
 
bool operator>= (const BVector< T > &bv) const
 
bool operator< (const BVector< T > &bv) const
 
bool operator> (const BVector< T > &bv) const
 
bool contains (const T &, unsigned long *=0) const
 
BVector< Tconcat (const BVector< T > &) const
 
template<typename U >
 BVector (const BVector< U > &bv)
 
- Public Member Functions inherited from BVector_Sig< T >
 BVector_Sig ()
 
 BVector_Sig (const unsigned long)
 
 ~BVector_Sig ()
 
Toperator() (const unsigned long)
 
tbci_traits< T >::const_refval_type operator() (const unsigned long) const
 
unsigned long size () const
 
BVector_Sig< T > & fill (const T &)
 
BVector_Sig< T > & clear ()
 
bool operator== (const BVector_Sig< T > &) const
 
bool operator!= (const BVector_Sig< T > &) const
 
- Public Member Functions inherited from Vector_Sig< T >
 Vector_Sig ()
 
 Vector_Sig (const unsigned)
 
 ~Vector_Sig ()
 
Vector_Sig< Toperator+ (const Vector_Sig< T > &) const
 
Vector_Sig< Toperator- (const Vector_Sig< T > &) const
 
Vector_Sig< Toperator* (const T &) const
 
Vector_Sig< Toperator/ (const T &) const
 
Vector_Sig< T > & operator+= (const Vector_Sig< T > &)
 
Vector_Sig< T > & operator-= (const Vector_Sig< T > &)
 
Vector_Sig< T > & operator*= (const T &)
 
Vector_Sig< T > & operator/= (const T &)
 
bool operator<= (const Vector_Sig< T > &) const
 
bool operator>= (const Vector_Sig< T > &) const
 
bool operator< (const Vector_Sig< T > &) const
 
bool operator> (const Vector_Sig< T > &) const
 

Static Public Member Functions

static const char * vec_info ()
 
- Static Public Member Functions inherited from BVector< T >
static const char * vec_info ()
 
- Static Public Member Functions inherited from BVector_Sig< T >
static const char * vec_info ()
 

Friends

class Vector< T >
 
class TSVector< T >
 
class Matrix< T >
 
class BdMatrix< T >
 
TVector< T > conj FGD (const Vector< T > &)
 
TVector< T > real FGD (const Vector< T > &)
 
TVector< T > imag FGD (const Vector< T > &)
 
TVector< T > &conj FGD (TVector< T > &)
 
TVector< T > &real FGD (TVector< T > &)
 
TVector< T > &imag FGD (TVector< T > &)
 
STD__ ostream & operator<< FGD (STD__ ostream &, const TVector< T > &)
 
NOINST void FRIEND_TBCI2__
do_mat_vec_mult 
FGD (const unsigned start, const unsigned end, TVector< T > *res, const Matrix< T > *mat, const Vector< T > *vec)
 
NOINST void FRIEND_TBCI2__
do_mat_tsv_mult 
FGD (const unsigned start, const unsigned end, TVector< T > *res, const Matrix< T > *mat, const TSVector< T > *rsv)
 
NOINST void FRIEND_TBCI2__
do_mat_vec_transmult 
FGD (const unsigned start, const unsigned end, TVector< T > *res, const Matrix< T > *mat, const Vector< T > *vec)
 

Additional Inherited Members

- Protected Types inherited from BVector< T >
typedef T value_type
 
typedef T element_type
 
typedef T aligned_value_type TALIGN (MIN_ALIGN2)
 
- Protected Attributes inherited from BVector< T >
Tvec
 
unsigned long dim
 
bool keep
 

Detailed Description

template<typename T>
class TVector< T >

Temporary Base Class Idiom: Class TVector is used for temporary variables.

Unlike real Vectors it can be copied by aliasing. Never use TVectors in your programs explicitly!

Definition at line 52 of file bvector.h.

Member Typedef Documentation

template<typename T>
typedef T TVector< T >::element_type

Definition at line 81 of file vector.h.

template<typename T>
typedef T aligned_value_type TVector< T >::TALIGN(MIN_ALIGN2)

Definition at line 82 of file vector.h.

template<typename T>
typedef T TVector< T >::value_type

Definition at line 80 of file vector.h.

Constructor & Destructor Documentation

template<typename T>
TVector< T >::TVector ( const unsigned long  d = 0)
inlineexplicit

Definition at line 84 of file vector.h.

template<typename T>
TVector< T >::TVector ( const T val,
const unsigned long  d 
)
inline

Definition at line 85 of file vector.h.

template<typename T>
TVector< T >::TVector ( const BVector< T > &  bv)
inline

Definition at line 86 of file vector.h.

template<typename T>
TVector< T >::TVector ( const Vector< T > &  v)
inline

Definition at line 87 of file vector.h.

template<typename T>
TVector< T >::TVector ( const TVector< T > &  tv)
inline

Definition at line 89 of file vector.h.

References BVector< T >::dim, and BVector< T >::vec.

template<typename T>
TVector< T >::TVector ( const TSVector< T > &  ts)
inlineexplicit
template<typename T >
TVector< T >::TVector ( const Mat_Brack< T > &  mb)
inline

Definition at line 2333 of file matrix.h.

References TMatrix< T >::dim, and TMatrix< T >::vec.

template<typename T>
TVector< T >::~TVector ( )
inline

Definition at line 95 of file vector.h.

References BVector< T >::keep.

template<typename T>
template<typename U >
TVector< T >::TVector ( const BVector< U > &  bv)
inlineexplicit

Definition at line 228 of file vector.h.

Member Function Documentation

template<typename T>
T TVector< T >::abs ( )
inline

Definition at line 152 of file vector.h.

References Vector< T >::abs().

template<typename T>
double TVector< T >::fabs ( )
inline

Definition at line 151 of file vector.h.

References Vector< T >::fabs().

template<typename T>
double TVector< T >::fabssqr ( )
inline

Definition at line 150 of file vector.h.

References Vector< T >::fabssqr().

Referenced by fabssqr().

template<typename T>
tbci_traits<T>::const_refval_type TVector< T >::get ( const unsigned long  i) const
inline
template<typename T>
const T& TVector< T >::getcref ( const unsigned long  i) const
inline
template<typename T >
TVector< T > & TVector< T >::incr ( const unsigned long  wh,
const T  i = (T)1 
)
inline

Definition at line 973 of file vector.h.

References BCHK, BdMatrix< T >::dim, and i.

template<typename T>
T TVector< T >::max ( )
inline

Definition at line 147 of file vector.h.

References Vector< T >::max().

template<typename T>
T TVector< T >::min ( )
inline

Definition at line 146 of file vector.h.

References Vector< T >::min().

template<typename T>
bool TVector< T >::operator!= ( const TVector< T > &  tv) const
inline

Definition at line 118 of file vector.h.

template<typename T>
bool TVector< T >::operator!= ( const Vector< T > &  v) const
inline

Definition at line 121 of file vector.h.

References v.

template<typename T>
bool TVector< T >::operator!= ( const BVector< T > &  v) const
inline

Definition at line 124 of file vector.h.

References v.

template<typename T>
bool TVector< T >::operator!= ( const TSVector< T > &  tsv) const
inline

Definition at line 126 of file vector.h.

template<typename T>
T TVector< T >::operator() ( const unsigned long  i)
inline

Definition at line 182 of file vector.h.

References BVector< T >::destroy(), i, T, and BVector< T >::vec.

Referenced by TVector< T >::operator[]().

template<typename T >
TSVector< T > TVector< T >::operator* ( const T a)
inline

Definition at line 829 of file vector.h.

References a.

template<typename T>
T TVector< T >::operator* ( const Vector< T > &  v)
inline

Definition at line 205 of file vector.h.

References v.

template<typename T>
T TVector< T >::operator* ( TVector< T > &  tv)
inline

Definition at line 207 of file vector.h.

References v.

template<typename T >
TVector< T > & TVector< T >::operator*= ( const T a)
inline

TV *= a.

Definition at line 680 of file vector.h.

References BdMatrix< T >::dim, and STD_SMP_TEMPLATE2C.

template<typename T >
TVector< T > & TVector< T >::operator+ ( const Vector< T > &  a)
inline

Definition at line 737 of file vector.h.

References BdMatrix< T >::operator+=().

template<typename T >
TVector< T > & TVector< T >::operator+ ( const TSVector< T > &  ts)
inline

TV = TV + TSV Transformed to TV += TSV.

Definition at line 927 of file vector.h.

References BCHK, TSVector< T >::destroy(), BdMatrix< T >::dim, TSVector< T >::dim, TSVector< T >::fac(), LIKELY, STD_SMP_TEMPLATE3VC, and TSVector< T >::vec.

template<typename T >
const TVector< T > & TVector< T >::operator+ ( const TVector< T > &  a)

TV = TV + TV Transformed to TV += TV.

Definition at line 753 of file vector.h.

References BCHK, BdMatrix< T >::destroy(), BVector< T >::dim, BdMatrix< T >::dim, STD_SMP_TEMPLATE2V, and BVector< T >::vec.

template<typename T >
TVector< T > & TVector< T >::operator+ ( const T a)
inline

Definition at line 821 of file vector.h.

References BdMatrix< T >::operator+=().

template<typename T >
TVector< T > & TVector< T >::operator+= ( const T a)
inline

TV += a.

Definition at line 666 of file vector.h.

References BdMatrix< T >::dim, and STD_SMP_TEMPLATE2C.

Referenced by TVector< T >::operator+=().

template<typename T >
TVector< T > & TVector< T >::operator+= ( const Vector< T > &  a)
inline

TV += V.

Definition at line 697 of file vector.h.

References BCHK, BVector< T >::dim, BdMatrix< T >::dim, STD_SMP_TEMPLATE2V, and BVector< T >::vec.

template<typename T>
TVector<T>& TVector< T >::operator+= ( const TVector< T > &  tv)
inline

Definition at line 136 of file vector.h.

References TVector< T >::operator+=().

template<typename T >
TVector< T > & TVector< T >::operator+= ( const TSVector< T > &  tsv)
inline
template<typename T >
TVector< T > & TVector< T >::operator- ( const Vector< T > &  a)
inline

Definition at line 743 of file vector.h.

References BdMatrix< T >::operator-=().

template<typename T >
TVector< T > & TVector< T >::operator- ( const TSVector< T > &  ts)
inline

TV = TV - TSV Transformed to TV -= TSV.

Definition at line 942 of file vector.h.

References BCHK, TSVector< T >::destroy(), BdMatrix< T >::dim, TSVector< T >::dim, TSVector< T >::fac(), LIKELY, STD_SMP_TEMPLATE3VC, and TSVector< T >::vec.

template<typename T >
const TVector< T > & TVector< T >::operator- ( const TVector< T > &  a)

TV = TV - TV Transformed to TV -= TV.

Definition at line 764 of file vector.h.

References BCHK, BdMatrix< T >::destroy(), BVector< T >::dim, BdMatrix< T >::dim, STD_SMP_TEMPLATE2V, and BVector< T >::vec.

template<typename T >
TVector< T > & TVector< T >::operator- ( const T a)
inline

Definition at line 824 of file vector.h.

References BdMatrix< T >::operator-=().

template<typename T >
TSVector< T > TVector< T >::operator- ( )
inline

Definition at line 851 of file vector.h.

References T.

template<typename T >
TVector< T > & TVector< T >::operator-= ( const T a)
inline

TV -= a.

Definition at line 673 of file vector.h.

References BdMatrix< T >::dim, and STD_SMP_TEMPLATE2C.

Referenced by TVector< T >::operator-=().

template<typename T >
TVector< T > & TVector< T >::operator-= ( const Vector< T > &  a)
inline

TV -= V.

Definition at line 705 of file vector.h.

References BCHK, BVector< T >::dim, BdMatrix< T >::dim, STD_SMP_TEMPLATE2V, and BVector< T >::vec.

template<typename T>
TVector<T>& TVector< T >::operator-= ( const TVector< T > &  tv)
inline

Definition at line 138 of file vector.h.

References TVector< T >::operator-=().

template<typename T >
TVector< T > & TVector< T >::operator-= ( const TSVector< T > &  tsv)
inline
template<typename T >
TSVector< T > TVector< T >::operator/ ( const T a)
inline

Definition at line 836 of file vector.h.

References T.

template<typename T >
TVector< T > & TVector< T >::operator/= ( const T a)
inline

TV /= a.

Definition at line 688 of file vector.h.

References BCHK, BdMatrix< T >::operator*=(), and T.

template<typename T>
TVector<T>& TVector< T >::operator= ( const T a)
inline

Definition at line 106 of file vector.h.

References BVector< T >::operator=().

Referenced by Vector< unsigned >::operator=().

template<typename T>
TVector<T>& TVector< T >::operator= ( const Vector< T > &  v)
inline

Definition at line 108 of file vector.h.

References BVector< T >::operator=().

template<typename T >
TVector< T > & TVector< T >::operator= ( const TVector< T > &  tv)
inline
template<typename T >
TVector< T > & TVector< T >::operator= ( const TSVector< T > &  ts)
inline
template<typename T>
bool TVector< T >::operator== ( const TVector< T > &  tv) const
inline

Definition at line 114 of file vector.h.

References LIKELY, v, and BVector< T >::vec.

template<typename T>
bool TVector< T >::operator== ( const Vector< T > &  v) const
inline

Definition at line 119 of file vector.h.

template<typename T>
bool TVector< T >::operator== ( const BVector< T > &  bv) const
inline

Definition at line 122 of file vector.h.

References v.

template<typename T>
bool TVector< T >::operator== ( const TSVector< T > &  tsv) const
inline

Definition at line 125 of file vector.h.

template<typename T>
T TVector< T >::operator[] ( const unsigned long  i)
inline

Definition at line 185 of file vector.h.

References TVector< T >::operator()().

template<typename T>
T& TVector< T >::set ( const T val,
const unsigned long  i 
) const
inline
template<typename T>
T& TVector< T >::setval ( const unsigned long  i) const
inline
template<typename T>
T& TVector< T >::setval ( const T val,
const unsigned long  i 
) const
inline

Definition at line 193 of file vector.h.

References i, and BVector< T >::vec.

template<typename T>
unsigned long TVector< T >::size ( ) const
inline
template<typename T >
TVector< T > TVector< T >::slice ( const unsigned long  i0,
const unsigned long  i1 
)
inline

Definition at line 956 of file vector.h.

References BCHK, BdMatrix< T >::dim, T, TBCIDELETE, and UNLIKELY.

template<typename T>
T TVector< T >::sum ( )
inline

Definition at line 148 of file vector.h.

References Vector< T >::sum().

template<typename T>
static const char* TVector< T >::vec_info ( )
inlinestatic

Definition at line 219 of file vector.h.

Friends And Related Function Documentation

template<typename T>
friend class BdMatrix< T >
friend

Definition at line 78 of file vector.h.

template<typename T>
TVector<T> conj FGD ( const Vector< T > &  )
friend
template<typename T>
TVector<T> real FGD ( const Vector< T > &  )
friend
template<typename T>
TVector<T> imag FGD ( const Vector< T > &  )
friend
template<typename T>
TVector<T>& conj FGD ( TVector< T > &  )
friend
template<typename T>
TVector<T>& real FGD ( TVector< T > &  )
friend
template<typename T>
TVector<T>& imag FGD ( TVector< T > &  )
friend
template<typename T>
NOINST void FRIEND_TBCI2__ do_mat_vec_mult FGD ( const unsigned  start,
const unsigned  end,
TVector< T > *  res,
const Matrix< T > *  mat,
const Vector< T > *  vec 
)
friend
template<typename T>
NOINST void FRIEND_TBCI2__ do_mat_tsv_mult FGD ( const unsigned  start,
const unsigned  end,
TVector< T > *  res,
const Matrix< T > *  mat,
const TSVector< T > *  rsv 
)
friend
template<typename T>
NOINST void FRIEND_TBCI2__ do_mat_vec_transmult FGD ( const unsigned  start,
const unsigned  end,
TVector< T > *  res,
const Matrix< T > *  mat,
const Vector< T > *  vec 
)
friend
template<typename T>
friend class Matrix< T >
friend

Definition at line 77 of file vector.h.

template<typename T>
STD__ ostream& operator<< FGD ( STD__ ostream &  ,
const TVector< T > &   
)
friend
template<typename T>
friend class TSVector< T >
friend

Definition at line 76 of file vector.h.

template<typename T>
friend class Vector< T >
friend

Definition at line 75 of file vector.h.


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