64 complex(
const double &_x,
const double &_y):
x(_x),
y(_y){};
82 if( fabs(z.
y)<fabs(z.
x) )
194 for(
i=imax;
i!=0;
i--)
196 r += (*p1)*(*p2) + p1[1]*p2[1] + p1[2]*p2[2] + p1[3]*p2[3];
201 r += (*(p1++))*(*(p2++));
209 int offset11 = v1.
GetStep(), offset12 = 2*offset11, offset13 = 3*offset11, offset14 = 4*offset11;
210 int offset21 = v2.
GetStep(), offset22 = 2*offset21, offset23 = 3*offset21, offset24 = 4*offset21;
216 for(
i=0;
i<imax;
i++)
218 r += (*p1)*(*p2) + p1[offset11]*p2[offset21] + p1[offset12]*p2[offset22] + p1[offset13]*p2[offset23];
249 for(
i=imax;
i!=0;
i--)
265 int offset11 = vdst.
GetStep(), offset12 = 2*offset11, offset13 = 3*offset11, offset14 = 4*offset11;
266 int offset21 = vsrc.
GetStep(), offset22 = 2*offset21, offset23 = 3*offset21, offset24 = 4*offset21;
271 for(
i=0;
i<imax;
i++)
274 p1[offset11] = p2[offset21];
275 p1[offset12] = p2[offset22];
276 p1[offset13] = p2[offset23];
307 for(
i=0;
i<imax;
i++)
323 int offset11 = vdst.
GetStep(), offset12 = 2*offset11, offset13 = 3*offset11, offset14 = 4*offset11;
324 int offset21 = vsrc.
GetStep(), offset22 = 2*offset21, offset23 = 3*offset21, offset24 = 4*offset21;
329 for(
i=imax;
i!=0;
i--)
332 p1[offset11] = -p2[offset21];
333 p1[offset12] = -p2[offset22];
334 p1[offset13] = -p2[offset23];
352template<
class T,
class T2>
365 for(
i=imax;
i!=0;
i--)
375 *(p1++) =
alpha*(*(p2++));
383 int offset11 = vdst.
GetStep(), offset12 = 2*offset11, offset13 = 3*offset11, offset14 = 4*offset11;
384 int offset21 = vsrc.
GetStep(), offset22 = 2*offset21, offset23 = 3*offset21, offset24 = 4*offset21;
389 for(
i=0;
i<imax;
i++)
392 p1[offset11] =
alpha*p2[offset21];
393 p1[offset12] =
alpha*p2[offset22];
394 p1[offset13] =
alpha*p2[offset23];
425 for(
i=imax;
i!=0;
i--)
443 int offset11 = vdst.
GetStep(), offset12 = 2*offset11, offset13 = 3*offset11, offset14 = 4*offset11;
444 int offset21 = vsrc.
GetStep(), offset22 = 2*offset21, offset23 = 3*offset21, offset24 = 4*offset21;
449 for(
i=0;
i<imax;
i++)
452 p1[offset11] += p2[offset21];
453 p1[offset12] += p2[offset22];
454 p1[offset13] += p2[offset23];
472template<
class T,
class T2>
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];
495 *(p1++) +=
alpha*(*(p2++));
503 int offset11 = vdst.
GetStep(), offset12 = 2*offset11, offset13 = 3*offset11, offset14 = 4*offset11;
504 int offset21 = vsrc.
GetStep(), offset22 = 2*offset21, offset23 = 3*offset21, offset24 = 4*offset21;
509 for(
i=0;
i<imax;
i++)
512 p1[offset11] +=
alpha*p2[offset21];
513 p1[offset12] +=
alpha*p2[offset22];
514 p1[offset13] +=
alpha*p2[offset23];
545 for(
i=imax;
i!=0;
i--)
563 int offset11 = vdst.
GetStep(), offset12 = 2*offset11, offset13 = 3*offset11, offset14 = 4*offset11;
564 int offset21 = vsrc.
GetStep(), offset22 = 2*offset21, offset23 = 3*offset21, offset24 = 4*offset21;
569 for(
i=0;
i<imax;
i++)
572 p1[offset11] -= p2[offset21];
573 p1[offset12] -= p2[offset22];
574 p1[offset13] -= p2[offset23];
592template<
class T,
class T2>
602template<
class T,
class T2>
613 for(
i=imax;
i!=0;
i--)
630 int offset11 = vdst.
GetStep(), offset12 = 2*offset11, offset13 = 3*offset11, offset14 = 4*offset11;
634 for(
i=0;
i<imax;
i++)
637 p1[offset11] *=
alpha;
638 p1[offset12] *=
alpha;
639 p1[offset13] *=
alpha;
679 #ifndef UNSAFE_MEM_COPY
704 #ifndef UNSAFE_MEM_COPY
749 for(
int i=iLow;
i<=iHigh;
i++)
750 (*
this)(
i) = pContent[
i-iLow];
833 #ifndef UNSAFE_MEM_COPY
860 #ifndef UNSAFE_MEM_COPY
890 void setbounds(
int iLow1,
int iHigh1,
int iLow2,
int iHigh2 )
894 m_iVecSize = (iHigh1-iLow1+1)*(iHigh2-iLow2+1);
904 void setcontent(
int iLow1,
int iHigh1,
int iLow2,
int iHigh2,
const T *pContent )
944 return raw_vector<T>(&((*
this)(iRow, iColumnStart)), iColumnEnd-iColumnStart+1, 1);
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