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>
191 for (
register unsigned long i = 0;
i < tv.
size();
i++)
197 template <typename T>
201 for (
register unsigned long i = 0;
i < tv.
size();
i++)
208 template <typename T>
215 for (
register unsigned long i = 0;
i < tv.
size();
i++)
221 template <typename T>
228 for (
register unsigned long i = 0;
i < tv.
size();
i++)
234 template <typename T>
242 for (
register unsigned long i = 0;
i < tv.
size();
i++)
250 template <typename T>
254 for (
register unsigned long i = 0;
i < tv.
size();
i++)
260 template <typename T>
264 for (
register unsigned long i = 0;
i < tv.
size();
i++)
270 template <typename T>
277 for (
register unsigned long i = 0;
i < tv.
size();
i++)
284 template <typename T>
291 for (
register unsigned long i = 0;
i < tv.
size();
i++)
297 template <typename T>
305 for (
register unsigned long i = 0;
i < tv.
size();
i++)
313 template <typename T>
317 for (
register unsigned long i = 0;
i < tv.
size();
i++)
323 template <typename T>
330 for (
register unsigned long i = 0;
i < tv.
size();
i++)
336 template <typename T>
344 for (
register unsigned long i = 0;
i < tv.
size();
i++)
351 template <typename T>
358 for (
register unsigned long i = 0;
i < tv.
size();
i++)
364 template <typename T>
368 for (
register unsigned long i = 0;
i < tv.
size();
i++)
375 template <typename T>
379 for (
register unsigned long i = 0;
i < tv.
size();
i++)
385 template <typename T>
389 for (
register unsigned long i = 0;
i < tv.
size();
i++)
395 template <typename T>
402 for (
register unsigned long i = 0;
i < tv.
size();
i++)
409 template <typename T>
416 for (
register unsigned long i = 0;
i < tv.
size();
i++)
422 template <typename T>
430 for (
register unsigned long i = 0;
i < tv.
size();
i++)
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();
477 for (
register unsigned long i = 0;
i < sz; ++
i) {
480 comp = (t -
sum) - y;
490 T sum =
T(0.0);
T comp =
T(0.0);
491 const unsigned long sz = v.
size();
492 for (
register unsigned long i = 0;
i < sz; ++
i) {
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
#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)
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)
unsigned int rows() const
number of rows