9 #ifndef TBCI_VECTOR_EXTRA_H
10 #define TBCI_VECTOR_EXTRA_H
12 #include "tbci/vector.h"
13 #include "tbci/matrix.h"
16 #if !defined(NO_GD) && !defined(AUTO_DECL)
17 # include "tbci/vector_extra_gd.h"
27 const unsigned long dim = b.
size();
38 const unsigned long dim = b.
size();
48 const unsigned long dim = b.
size();
58 const unsigned long dim = b.
size();
68 const unsigned long dim = b.
size();
79 const unsigned long dim = b.
size();
89 const unsigned long dim = b.
size();
99 const unsigned long dim = b.
size();
109 template <typename T>
119 template <typename T>
128 template <typename T>
137 template <typename T>
146 template <typename T>
156 template <typename T>
165 template <typename T>
174 template <typename T>
187 template <typename T>
197 template <typename T>
208 template <typename T>
221 template <typename T>
234 template <typename T>
250 template <typename T>
260 template <typename T>
270 template <typename T>
284 template <typename T>
297 template <typename T>
313 template <typename T>
323 template <typename T>
336 template <typename T>
351 template <typename T>
364 template <typename T>
375 template <typename T>
385 template <typename T>
395 template <typename T>
409 template <typename T>
422 template <typename T>
439 template <typename T>
447 template <typename T>
450 const unsigned d = b.
size();
457 template <typename T>
475 T sum =
T(0.0);
T comp =
T(0.0);
476 const unsigned long sz = v.
size();
480 comp = (t -
sum) - y;
490 T sum =
T(0.0);
T comp =
T(0.0);
491 const unsigned long sz = v.
size();
495 comp += (t -
sum) - y;
504 # define _VEC getvec()
505 # define _ENDVEC getendvec()
508 # define _COL columns()
509 # define _FAC getfac()
512 template <typename T>
515 const unsigned int rw = a.
rows(), cl = a.
columns();
518 TMatrix<T>
res (rw, cl);
519 do_vec_vec_mul<T> (a._DIM, res._VEC, a._VEC, b._VEC);
524 template <typename T>
527 const unsigned int rw = a .
rows(), cl = a.
columns();
530 TMatrix<T>
res (rw, cl);
531 do_vec_vec_cmul<T> (a._DIM, res._VEC, a._VEC, b._VEC);
536 template <typename T>
539 const unsigned int rw = a .
rows(), cl = a.
columns();
542 TMatrix<T>
res (rw, cl);
543 do_vec_vec_div<T> (a._DIM, res._VEC, a._VEC, b._VEC);
548 template <typename T>
551 const unsigned int rw = a .
rows(), cl = a.
columns();
554 TMatrix<T>
res (rw, cl);
555 do_vec_vec_cdiv<T> (a._DIM, res._VEC, a._VEC, b._VEC);
561 template <typename T>
569 template <typename T>
579 template <typename T>
T sum(const FS_Vector< dims, T > &fv)
void detach(TMatrix< T > *=0)
T & setval(const unsigned long i) const
BVector< T > & setsize(const unsigned long size)
T *const & vecptr() const
tbci_traits< T >::const_refval_type get(const unsigned long i) const
FS_Vector< dims, T > cediv(const FS_Vector< dims, T > &f1, const FS_Vector< dims, T > &f2)
#define BCHK(cond, exc, txt, ind, rtval)
const T & getcref(const unsigned long i) const HOT
T & set(const T &val, const unsigned long i) const
#define STD_SMP_TEMPLATE4C(oper, dm, a1, a2, a3, a4)
T get(const unsigned long i) const HOT
unsigned int columns() const
number of columns
BVector< T > & setptr(T *pointer)
FS_Vector< dims, T > ediv(const FS_Vector< dims, T > &f1, const FS_Vector< dims, T > &f2)
int conj(const int arg)
conj for elementary types
void detach(const T *=0) const
const T & getcref(const unsigned long i) const
unsigned long size() const
#define STD_SMP_TEMPLATE2C(oper, dm, a1, a2)
BVector< T > & resize(const BVector< T > &)
Actually it's a resize and copy (some people would expect the assignment op to do this) ...
Temporary Base Class Idiom: Class TVector is used for temporary variables.
unsigned long size() const
#define STD_SMP_TEMPLATE3VC(oper, dm, a1, a2, a3)
const Vector< T > Vector< T > Vector< T > Vector< T > & y
const Vector< T > Vector< T > Vector< T > Vector< T > Vector< T > Vector< T > Vector< T > Vector< T > long int res
FS_Vector< dims, T > cemul(const FS_Vector< dims, T > &f1, const FS_Vector< dims, T > &f2)
const unsigned TMatrix< T > const Matrix< T > * a
const Vector< T > Vector< T > Vector< T > Vector< T > Vector< T > Vector< T > Vector< T > Vector< T > long int int char v
< find minimun of func on grid with resolution res
FS_Vector< dims, T > emul(const FS_Vector< dims, T > &f1, const FS_Vector< dims, T > &f2)
unsigned int rows() const
number of rows