TBCI::TVector< T > Class Template Reference

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

#include <vector.h>

Inheritance diagram for TBCI::TVector< T >:

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

Collaboration graph
[legend]

List of all members.

Public Types

typedef T value_type
typedef T element_type
typedef T aligned_value_type

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)
 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
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
 KG, 2001-06-29: Strange: If we don't inline this, we seems to get better performance in our solver benchmark (iPIII).
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.
TVector< T > & operator-= (const T &)
 TV -= a.
TVector< T > & operator*= (const T &)
 TV *= a.
TVector< T > & operator/= (const T &)
 TV /= a.
TVector< T > & operator+= (const Vector< T > &)
 TV += V.
TVector< T > & operator-= (const Vector< T > &)
 TV -= V.
TVector< T > & operator+= (const TVector< T > &tv)
TVector< T > & operator-= (const TVector< T > &tv)
TVector< T > & operator+= (const TSVector< T > &tsv)
 TV += TSV.
TVector< T > & operator-= (const TSVector< T > &tsv)
 TV -= TSV.
min ()
max ()
sum ()
double fabssqr ()
double fabs ()
abs ()
TVector< T > & operator+ (const Vector< T > &)
TVector< T > & operator- (const Vector< T > &)
TVector< T > & operator+ (const TSVector< T > &ts)
 TV = TV + TSV Transformed to TV += TSV.
TVector< T > & operator- (const TSVector< T > &ts)
 TV = TV - TSV Transformed to TV -= TSV.
const TVector< T > & operator+ (const TVector< T > &a)
 TV = TV + TV Transformed to TV += TV.
const TVector< T > & operator- (const TVector< T > &a)
 TV = TV - TV Transformed to TV -= TV.
operator() (const unsigned long i)
operator[] (const unsigned long i)
const T & getcref (const unsigned long i) const
tbci_traits< T >::const_refval_type get (const unsigned long i) const
T & setval (const unsigned long i) const
T & setval (const T &val, const unsigned long i) const
T & set (const T &val, const unsigned long i) const
TVector< T > slice (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< T > operator* (const T &)
TSVector< T > operator/ (const T &)
TSVector< T > operator- ()
operator* (const Vector< T > &v)
operator* (TVector< T > &tv)
template<typename U>
 TVector (const BVector< U > &bv)

Static Public Member Functions

static const char * vec_info ()

Friends

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


Detailed Description

template<typename T>
class TBCI::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 81 of file vector.h.


Member Typedef Documentation

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

Reimplemented from TBCI::BVector< T >.

Reimplemented in TBCI::Vector< T >, and TBCI::Vector< unsigned >.

Definition at line 89 of file vector.h.

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

Reimplemented from TBCI::BVector< T >.

Reimplemented in TBCI::Vector< T >, and TBCI::Vector< unsigned >.

Definition at line 90 of file vector.h.

template<typename T>
typedef T TBCI::TVector< T >::aligned_value_type

Reimplemented from TBCI::BVector< T >.

Reimplemented in TBCI::Vector< T >, and TBCI::Vector< unsigned >.

Definition at line 91 of file vector.h.


Constructor & Destructor Documentation

template<typename T>
TBCI::TVector< T >::TVector ( const unsigned long  d = 0  )  [inline, explicit]

Definition at line 93 of file vector.h.

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

Definition at line 94 of file vector.h.

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

Definition at line 95 of file vector.h.

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

Definition at line 96 of file vector.h.

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

Definition at line 98 of file vector.h.

template<typename T>
TBCI::TVector< T >::TVector ( const TSVector< T > &  ts  )  [inline, explicit]

Definition at line 100 of file vector.h.

template<typename T>
TBCI::TVector< T >::TVector ( const Mat_Brack< T > &  mb  )  [inline]

template<typename T>
TBCI::TVector< T >::~TVector (  )  [inline]

Definition at line 104 of file vector.h.

template<typename T>
template<typename U>
TBCI::TVector< T >::TVector ( const BVector< U > &  bv  )  [inline, explicit]

Definition at line 237 of file vector.h.


Member Function Documentation

template<typename T>
unsigned long TBCI::TVector< T >::size (  )  const [inline]

Reimplemented from TBCI::BVector< T >.

Definition at line 113 of file vector.h.

Referenced by TBCI::basis_trafo(), TBCI::Basis_Trafo(), TBCI::cediv(), TBCI::cemul(), TBCI::chisq(), TBCI::Chisq(), TBCI::chisquare(), TBCI::Chisquare_2D(), TBCI::conj(), TBCI::Tensor< T >::contract(), TBCI::Matrix< T >::div_rows(), TBCI::BdMatrix< T >::div_rows(), TBCI::do_fbdmat_vec_mul(), TBCI::dot(), TBCI::BdMatrix< T >::dotMult(), TBCI::ediv(), TBCI::emul(), TBCI::grid_min(), TBCI::Grid_Min_2D(), TBCI::Index::idx_fill_in1(), TBCI::Index::idx_fill_in2(), TBCI::imag(), TBCI::lev_mar(), TBCI::LM_fit_2D(), TBCI::LU_bkw_subst(), TBCI::LU_fwd_subst(), TBCI::lu_solve(), TBCI::lu_solve_expert(), TBCI::CSCMatrix< T >::MatVecMult(), TBCI::CRMatrix< T >::MatVecMult(), TBCI::Matrix< T >::mult_rows(), TBCI::BdMatrix< T >::mult_rows(), TBCI::Vector< T >::operator*(), TBCI::Symm_BdMatrix< T >::operator*(), TBCI::Matrix< T >::operator*(), TBCI::TSMatrix< T >::operator*(), TBCI::F_TSMatrix< T >::operator*(), TBCI::CSCMatrix< T >::operator*(), TBCI::CRMatrix< T >::operator*(), TBCI::BdMatrix< T >::operator*(), TBCI::Vector< T >::operator+(), TBCI::operator+(), TBCI::Vector< T >::operator-(), TBCI::operator-(), TBCI::TVector< T >::operator=(), TBCI::par_comp(), TBCI::partial_del(), TBCI::Partial_Del(), TBCI::real(), TBCI::CTensor< T >::resize(), TBCI::CRMatrix< T >::set_row(), TBCI::BdMatrix< T >::set_row(), TBCI::ILU0_BdMatrixPreconditioner< T >::solve(), TBCI::DILU_BdMatrixPreconditioner< T >::solve(), TBCI::sv_decomp_backsub(), TBCI::Matrix< T >::transMult(), TBCI::F_BandMatrix< T >::transMult(), TBCI::CSCMatrix< T >::transMult(), TBCI::CRMatrix< T >::transMult(), and TBCI::BdMatrix< T >::transMult().

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

Reimplemented from TBCI::BVector< T >.

Reimplemented in TBCI::Vector< T >, and TBCI::Vector< unsigned >.

Definition at line 115 of file vector.h.

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

Reimplemented in TBCI::Vector< T >, and TBCI::Vector< unsigned >.

Definition at line 117 of file vector.h.

template<typename T>
TVector< T > & TBCI::TVector< T >::operator= ( const TVector< T > &  tv  )  [inline]

template<typename T>
TVector< T > & TBCI::TVector< T >::operator= ( const TSVector< T > &  ts  )  [inline]

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

Reimplemented in TBCI::Vector< T >, and TBCI::Vector< unsigned >.

Definition at line 123 of file vector.h.

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

Reimplemented in TBCI::Vector< T >, and TBCI::Vector< unsigned >.

Definition at line 127 of file vector.h.

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

Reimplemented in TBCI::Vector< T >, and TBCI::Vector< unsigned >.

Definition at line 128 of file vector.h.

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

Reimplemented in TBCI::Vector< T >, and TBCI::Vector< unsigned >.

Definition at line 130 of file vector.h.

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

KG, 2001-06-29: Strange: If we don't inline this, we seems to get better performance in our solver benchmark (iPIII).

Reimplemented from TBCI::BVector< T >.

Definition at line 131 of file vector.h.

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

Reimplemented from TBCI::BVector< T >.

Definition at line 133 of file vector.h.

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

Reimplemented in TBCI::Vector< T >, and TBCI::Vector< unsigned >.

Definition at line 134 of file vector.h.

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

Reimplemented in TBCI::Vector< T >, and TBCI::Vector< unsigned >.

Definition at line 135 of file vector.h.

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

TV += a.

Definition at line 672 of file vector.h.

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

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

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

TV -= a.

Definition at line 679 of file vector.h.

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

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

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

TV *= a.

Reimplemented from TBCI::Vector_Sig< T >.

Definition at line 686 of file vector.h.

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

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

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

TV /= a.

Reimplemented from TBCI::Vector_Sig< T >.

Definition at line 694 of file vector.h.

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

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

TV += V.

Definition at line 703 of file vector.h.

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

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

TV -= V.

Definition at line 711 of file vector.h.

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

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

Definition at line 145 of file vector.h.

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

Definition at line 147 of file vector.h.

template<typename T>
TVector< T > & TBCI::TVector< T >::operator+= ( const TSVector< T > &  tsv  )  [inline]

template<typename T>
TVector< T > & TBCI::TVector< T >::operator-= ( const TSVector< T > &  tsv  )  [inline]

template<typename T>
T TBCI::TVector< T >::min (  )  [inline]

Definition at line 155 of file vector.h.

template<typename T>
T TBCI::TVector< T >::max (  )  [inline]

Definition at line 156 of file vector.h.

template<typename T>
T TBCI::TVector< T >::sum (  )  [inline]

Definition at line 157 of file vector.h.

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

Definition at line 159 of file vector.h.

Referenced by std::fabs(), TBCI::fabssqr(), and TBCI::TSVector< T >::fabssqr().

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

Definition at line 160 of file vector.h.

Referenced by TBCI::TSVector< T >::fabs(), and std::fabs().

template<typename T>
T TBCI::TVector< T >::abs (  )  [inline]

Definition at line 161 of file vector.h.

Referenced by TBCI::TSVector< T >::abs(), and std::abs().

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

Definition at line 743 of file vector.h.

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

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

Definition at line 749 of file vector.h.

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

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

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

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

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

Definition at line 759 of file vector.h.

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

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

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

Definition at line 770 of file vector.h.

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

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

Reimplemented from TBCI::BVector< T >.

Reimplemented in TBCI::Vector< T >, and TBCI::Vector< unsigned >.

Definition at line 191 of file vector.h.

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

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

Reimplemented from TBCI::BVector< T >.

Reimplemented in TBCI::Vector< T >, and TBCI::Vector< unsigned >.

Definition at line 194 of file vector.h.

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

template<typename T>
tbci_traits<T>::const_refval_type TBCI::TVector< T >::get ( const unsigned long  i  )  const [inline]

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

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

Definition at line 202 of file vector.h.

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

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

Definition at line 962 of file vector.h.

References BCHK, TBCI::BVector< T >::dim, T, TBCIDELETE, UNLIKELY, and TBCI::BVector< T >::vec.

template<typename T>
TVector< T > & TBCI::TVector< T >::incr ( const unsigned long  wh,
const T  i = (T)1 
) [inline]

Definition at line 979 of file vector.h.

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

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

Definition at line 827 of file vector.h.

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

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

Definition at line 830 of file vector.h.

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

template<typename T>
TSVector< T > TBCI::TVector< T >::operator* ( const T &  a  )  [inline]

Definition at line 835 of file vector.h.

template<typename T>
TSVector< T > TBCI::TVector< T >::operator/ ( const T &  a  )  [inline]

Definition at line 842 of file vector.h.

References T.

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

Definition at line 857 of file vector.h.

References T.

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

Definition at line 214 of file vector.h.

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

Definition at line 216 of file vector.h.

template<typename T>
static const char* TBCI::TVector< T >::vec_info (  )  [inline, static]

Reimplemented from TBCI::BVector< T >.

Reimplemented in TBCI::Vector< T >, and TBCI::Vector< unsigned >.

Definition at line 228 of file vector.h.


Friends And Related Function Documentation

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

Definition at line 84 of file vector.h.

template<typename T>
friend class TSVector< T > [friend]

Reimplemented in TBCI::Vector< T >, and TBCI::Vector< unsigned >.

Definition at line 85 of file vector.h.

template<typename T>
friend class Matrix< T > [friend]

Definition at line 86 of file vector.h.

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

Definition at line 87 of file vector.h.

template<typename T>
TVector<T> conj ( const Vector< T > &  v  )  [friend]

Definition at line 897 of file vector.h.

Referenced by TBCI::conj().

template<typename T>
TVector<T> real ( const Vector< T > &  v  )  [friend]

Definition at line 907 of file vector.h.

Referenced by TBCI::real().

template<typename T>
TVector<T> imag ( const Vector< T > &  v  )  [friend]

Definition at line 918 of file vector.h.

Referenced by TBCI::imag().

template<typename T>
TVector<T>& conj ( TVector< T > &  tv  )  [friend]

Definition at line 868 of file vector.h.

template<typename T>
TVector<T>& real ( TVector< T > &  tv  )  [friend]

Definition at line 877 of file vector.h.

template<typename T>
TVector<T>& imag ( TVector< T > &  tv  )  [friend]

Definition at line 887 of file vector.h.

template<typename T>
std:: ostream& operator<< ( std::ostream &  os,
const TVector< T > &  tv 
) [friend]

Definition at line 262 of file vector.h.

template<typename T>
void do_mat_vec_mult ( const unsigned  start,
const unsigned  end,
TVector< T > *  res,
const Matrix< T > *  mat,
const Vector< T > *  vec 
) [friend]

template<typename T>
void do_mat_tsv_mult ( const unsigned  start,
const unsigned  end,
TVector< T > *  res,
const Matrix< T > *  mat,
const TSVector< T > *  rsv 
) [friend]

template<typename T>
void do_mat_vec_transmult ( const unsigned  start,
const unsigned  end,
TVector< T > *  res,
const Matrix< T > *  mat,
const Vector< T > *  vec 
) [friend]


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

Generated on Wed Nov 20 09:29:44 2013 for TBCI Numerical high perf. C++ Library by  doxygen 1.5.6