184 if(
v1.GetStep()==1 &&
v2.GetStep()==1 )
190 const T *p1 =
v1.GetData();
191 const T *p2 =
v2.GetData();
192 int imax =
v1.GetLength()/4;
194 for(
i=imax;
i!=0;
i--)
196 r += (*p1)*(*p2) + p1[1]*p2[1] + p1[2]*p2[2] + p1[3]*p2[3];
200 for(
i=0;
i<
v1.GetLength()%4;
i++)
201 r += (*(p1++))*(*(p2++));
212 const T *p1 =
v1.GetData();
213 const T *p2 =
v2.GetData();
214 int imax =
v1.GetLength()/4;
216 for(
i=0;
i<imax;
i++)
222 for(
i=0;
i<
v1.GetLength()%4;
i++)
240 if(
vdst.GetStep()==1 &&
vsrc.GetStep()==1 )
245 T *p1 =
vdst.GetData();
246 const T *p2 =
vsrc.GetData();
247 int imax =
vdst.GetLength()/2;
249 for(
i=imax;
i!=0;
i--)
256 if(
vdst.GetLength()%2 != 0)
267 T *p1 =
vdst.GetData();
268 const T *p2 =
vsrc.GetData();
269 int imax =
vdst.GetLength()/4;
271 for(
i=0;
i<imax;
i++)
280 for(
i=0;
i<
vdst.GetLength()%4;
i++)
283 p1 +=
vdst.GetStep();
284 p2 +=
vsrc.GetStep();
298 if(
vdst.GetStep()==1 &&
vsrc.GetStep()==1 )
303 T *p1 =
vdst.GetData();
304 const T *p2 =
vsrc.GetData();
305 int imax =
vdst.GetLength()/2;
307 for(
i=0;
i<imax;
i++)
314 if(
vdst.GetLength()%2 != 0)
325 T *p1 =
vdst.GetData();
326 const T *p2 =
vsrc.GetData();
327 int imax =
vdst.GetLength()/4;
329 for(
i=imax;
i!=0;
i--)
338 for(
i=0;
i<
vdst.GetLength()%4;
i++)
341 p1 +=
vdst.GetStep();
342 p2 +=
vsrc.GetStep();
352template<
class T,
class T2>
356 if(
vdst.GetStep()==1 &&
vsrc.GetStep()==1 )
361 T *p1 =
vdst.GetData();
362 const T *p2 =
vsrc.GetData();
363 int imax =
vdst.GetLength()/4;
365 for(
i=imax;
i!=0;
i--)
374 for(
i=0;
i<
vdst.GetLength()%4;
i++)
375 *(p1++) =
alpha*(*(p2++));
385 T *p1 =
vdst.GetData();
386 const T *p2 =
vsrc.GetData();
387 int imax =
vdst.GetLength()/4;
389 for(
i=0;
i<imax;
i++)
398 for(
i=0;
i<
vdst.GetLength()%4;
i++)
401 p1 +=
vdst.GetStep();
402 p2 +=
vsrc.GetStep();
416 if(
vdst.GetStep()==1 &&
vsrc.GetStep()==1 )
421 T *p1 =
vdst.GetData();
422 const T *p2 =
vsrc.GetData();
423 int imax =
vdst.GetLength()/4;
425 for(
i=imax;
i!=0;
i--)
434 for(
i=0;
i<
vdst.GetLength()%4;
i++)
445 T *p1 =
vdst.GetData();
446 const T *p2 =
vsrc.GetData();
447 int imax =
vdst.GetLength()/4;
449 for(
i=0;
i<imax;
i++)
458 for(
i=0;
i<
vdst.GetLength()%4;
i++)
461 p1 +=
vdst.GetStep();
462 p2 +=
vsrc.GetStep();
472template<
class T,
class T2>
476 if(
vdst.GetStep()==1 &&
vsrc.GetStep()==1 )
481 T *p1 =
vdst.GetData();
482 const T *p2 =
vsrc.GetData();
483 int imax =
vdst.GetLength()/4;
485 for(
i=imax;
i!=0;
i--)
488 p1[1] +=
alpha*p2[1];
489 p1[2] +=
alpha*p2[2];
490 p1[3] +=
alpha*p2[3];
494 for(
i=0;
i<
vdst.GetLength()%4;
i++)
495 *(p1++) +=
alpha*(*(p2++));
505 T *p1 =
vdst.GetData();
506 const T *p2 =
vsrc.GetData();
507 int imax =
vdst.GetLength()/4;
509 for(
i=0;
i<imax;
i++)
518 for(
i=0;
i<
vdst.GetLength()%4;
i++)
521 p1 +=
vdst.GetStep();
522 p2 +=
vsrc.GetStep();
536 if(
vdst.GetStep()==1 &&
vsrc.GetStep()==1 )
541 T *p1 =
vdst.GetData();
542 const T *p2 =
vsrc.GetData();
543 int imax =
vdst.GetLength()/4;
545 for(
i=imax;
i!=0;
i--)
554 for(
i=0;
i<
vdst.GetLength()%4;
i++)
565 T *p1 =
vdst.GetData();
566 const T *p2 =
vsrc.GetData();
567 int imax =
vdst.GetLength()/4;
569 for(
i=0;
i<imax;
i++)
578 for(
i=0;
i<
vdst.GetLength()%4;
i++)
581 p1 +=
vdst.GetStep();
582 p2 +=
vsrc.GetStep();
592template<
class T,
class T2>
602template<
class T,
class T2>
605 if(
vdst.GetStep()==1 )
610 T *p1 =
vdst.GetData();
611 int imax =
vdst.GetLength()/4;
613 for(
i=imax;
i!=0;
i--)
621 for(
i=0;
i<
vdst.GetLength()%4;
i++)
631 T *p1 =
vdst.GetData();
632 int imax =
vdst.GetLength()/4;
634 for(
i=0;
i<imax;
i++)
642 for(
i=0;
i<
vdst.GetLength()%4;
i++)
645 p1 +=
vdst.GetStep();
679 #ifndef UNSAFE_MEM_COPY
704 #ifndef UNSAFE_MEM_COPY
750 (*
this)(
i) = pContent[
i-
iLow];
833 #ifndef UNSAFE_MEM_COPY
860 #ifndef UNSAFE_MEM_COPY
999int maxint(
int m1,
int m2);
1000int minint(
int m1,
int m2);
1001double maxreal(
double m1,
double m2);
1002double minreal(
double m1,
double m2);
static void make_assertion(bool bClause)
complex & operator+=(const double &v)
complex & operator+=(const complex &z)
complex(const double &_x)
complex & operator-=(const complex &z)
complex & operator=(const double &v)
complex & operator-=(const double &v)
complex & operator*=(const complex &z)
complex & operator*=(const double &v)
complex & operator/=(const double &v)
complex & operator/=(const complex &z)
complex(const double &_x, const double &_y)
complex(const complex &z)
const T * GetData() const
const_raw_vector(const T *Data, int Length, int Step)
raw_vector(T *Data, int Length, int Step)
raw_vector< T > getvector(int iStart, int iEnd)
int gethighbound(int iBoundNum=0) const
bool wrongIdx(int i) const
const_raw_vector< T > getvector(int iStart, int iEnd) const
const T & operator()(int i) const
int getlowbound(int iBoundNum=0) const
void setcontent(int iLow, int iHigh, const T *pContent)
template_1d_array(const template_1d_array &rhs)
void setbounds(int iLow, int iHigh)
const template_1d_array & operator=(const template_1d_array &rhs)
const T * getcontent() const
void setcontent(int iLow1, int iHigh1, int iLow2, int iHigh2, const T *pContent)
template_2d_array(const template_2d_array &rhs)
const T & operator()(int i1, int i2) const
void setbounds(int iLow1, int iHigh1, int iLow2, int iHigh2)
bool wrongRow(int i) const
bool wrongColumn(int j) const
const T * getcontent() const
int getlowbound(int iBoundNum) const
const_raw_vector< T > getcolumn(int iColumn, int iRowStart, int iRowEnd) const
const template_2d_array & operator=(const template_2d_array &rhs)
raw_vector< T > getrow(int iRow, int iColumnStart, int iColumnEnd)
raw_vector< T > getcolumn(int iColumn, int iRowStart, int iRowEnd)
int gethighbound(int iBoundNum) const
const_raw_vector< T > getrow(int iRow, int iColumnStart, int iColumnEnd) const
T & operator()(int i1, int i2)
const Variable & v
< [in] a sqrfree bivariate poly
int maxint(int m1, int m2)
template_2d_array< double > real_2d_array
template_1d_array< bool > boolean_1d_array
template_2d_array< bool > boolean_2d_array
const complex operator*(const complex &lhs, const complex &rhs)
const complex csqr(const complex &z)
T vdotproduct(const_raw_vector< T > v1, const_raw_vector< T > v2)
const double machineepsilon
void vmove(raw_vector< T > vdst, const_raw_vector< T > vsrc)
template_2d_array< int > integer_2d_array
const double minrealnumber
template_2d_array< complex > complex_2d_array
void vmoveneg(raw_vector< T > vdst, const_raw_vector< T > vsrc)
void vadd(raw_vector< T > vdst, const_raw_vector< T > vsrc)
int randominteger(int maxv)
double maxreal(double m1, double m2)
const double abscomplex(const complex &z)
template_1d_array< complex > complex_1d_array
const bool operator!=(const complex &lhs, const complex &rhs)
double minreal(double m1, double m2)
int minint(int m1, int m2)
void vmul(raw_vector< T > vdst, T2 alpha)
void vsub(raw_vector< T > vdst, const_raw_vector< T > vsrc)
const complex conj(const complex &z)
const complex operator+(const complex &lhs)
const complex operator/(const complex &lhs, const complex &rhs)
template_1d_array< int > integer_1d_array
const double maxrealnumber
const bool operator==(const complex &lhs, const complex &rhs)
const complex operator-(const complex &lhs)
template_1d_array< double > real_1d_array