TBCI Numerical high perf. C++ Library  2.8.0
vector_sig.h
Go to the documentation of this file.
1 
6 //-------------------------------------------------------------
7 // Kurt F Garloff, 08/2000
8 // $Id: vector_sig.h,v 1.2.2.8 2019/05/28 11:13:02 garloff Exp $
9 //-------------------------------------------------------------
10 
11 
12 #ifndef TBCI_VECTOR_SIG_H
13 #define TBCI_VECTOR_SIG_H
14 
15 #include "tbci/basics.h"
16 
17 #ifdef PRAGMA_I
18 # pragma interface "tbci/vector_sig.h"
19 #endif
20 
22 
23 template <typename T> class BVector_Sig;
24 template <typename T> class Vector_Sig;
25 template <typename T> class TVector;
26 template <typename T> class Vector;
27 
40 template <typename T>
41 class BVector_Sig
42 {
43  public:
44  // de/constructor
46  BVector_Sig (const unsigned long) {}
47  /*virtual*/ ~BVector_Sig () {}
48 
49  // access
50  T& operator () (const unsigned long);
51  typename tbci_traits<T>::const_refval_type \
52  operator () (const unsigned long) const;
53 
54  unsigned long size () const;
55  BVector_Sig<T>& fill (const T&);
57  //{ return this->fill ((T)0); }
58 
59  // available for all vectors
60  bool operator == (const BVector_Sig<T>&) const;
61  bool operator != (const BVector_Sig<T>&) const;
62 
63 
64  // static function
65  static const char* vec_info();
66 };
67 
71 template <typename T>
72 class Vector_Sig : public BVector_Sig<T>
73 {
74  public:
75  // de/constructor
76  Vector_Sig () {}
77  Vector_Sig (const unsigned);
78  /* virtual */ ~Vector_Sig () {}
79 
80  // put arithmetic abilities here
83  Vector_Sig<T> operator * (const T&) const;
84  Vector_Sig<T> operator / (const T&) const;
85 
88  Vector_Sig<T>& operator *= (const T&);
89  Vector_Sig<T>& operator /= (const T&);
90 
91  bool operator <= (const Vector_Sig<T>&) const;
92  bool operator >= (const Vector_Sig<T>&) const;
93  bool operator < (const Vector_Sig<T>&) const;
94  bool operator > (const Vector_Sig<T>&) const;
95 };
96 
98 
99 #endif /* TBCI_VECTOR_SIG_H */
bool operator==(const BVector_Sig< T > &) const
abstract base class (signature) for Vectors with arithmetics
Definition: vector_sig.h:24
BVector_Sig< T > & clear()
T & operator()(const unsigned long)
bool operator>=(const Vector_Sig< T > &) const
#define NAMESPACE_TBCI
Definition: basics.h:317
abstract base class (signature) for Vectors without arithmetics
Definition: vector_sig.h:23
unsigned long size() const
BVector_Sig< T > & fill(const T &)
Vector_Sig< T > & operator-=(const Vector_Sig< T > &)
static const char * vec_info()
Vector_Sig< T > & operator*=(const T &)
bool operator!=(const BVector_Sig< T > &) const
Vector_Sig< T > & operator/=(const T &)
bool operator>(const Vector_Sig< T > &) const
Vector_Sig< T > operator/(const T &) const
Vector_Sig< T > & operator+=(const Vector_Sig< T > &)
Vector_Sig< T > operator*(const T &) const
Vector_Sig< T > operator-(const Vector_Sig< T > &) const
Vector_Sig< T > operator+(const Vector_Sig< T > &) const
Temporary Base Class Idiom: Class TVector is used for temporary variables.
Definition: bvector.h:52
#define NAMESPACE_END
Definition: basics.h:323
BVector_Sig(const unsigned long)
Definition: vector_sig.h:46
Definition: bvector.h:54
#define T
Definition: bdmatlib.cc:20