Loading...
Searching...
No Matches
ap Namespace Reference

## Data Structures

class | ap_error
class | complex
class | const_raw_vector
class | raw_vector
class | template_1d_array
class | template_2d_array

## Typedefs

typedef template_1d_array< int > | integer_1d_array
typedef template_1d_array< double > | real_1d_array
typedef template_1d_array< complex > | complex_1d_array
typedef template_1d_array< bool > | boolean_1d_array
typedef template_2d_array< int > | integer_2d_array
typedef template_2d_array< double > | real_2d_array
typedef template_2d_array< complex > | complex_2d_array
typedef template_2d_array< bool > | boolean_2d_array

## Functions

const complex | operator/ (const complex &lhs, const complex &rhs)
const bool | operator== (const complex &lhs, const complex &rhs)
const bool | operator!= (const complex &lhs, const complex &rhs)
const complex | operator+ (const complex &lhs)
const complex | operator- (const complex &lhs)
const complex | operator+ (const complex &lhs, const complex &rhs)
const complex | operator+ (const complex &lhs, const double &rhs)
const complex | operator+ (const double &lhs, const complex &rhs)
const complex | operator- (const complex &lhs, const complex &rhs)
const complex | operator- (const complex &lhs, const double &rhs)
const complex | operator- (const double &lhs, const complex &rhs)
const complex | operator* (const complex &lhs, const complex &rhs)
const complex | operator* (const complex &lhs, const double &rhs)
const complex | operator* (const double &lhs, const complex &rhs)
const complex | operator/ (const double &lhs, const complex &rhs)
const complex | operator/ (const complex &lhs, const double &rhs)
const double | abscomplex (const complex &z)
const complex | conj (const complex &z)
const complex | csqr (const complex &z)
template<class T>
T | vdotproduct (const_raw_vector< T > v1, const_raw_vector< T > v2)
template<class T>
void | vmove (raw_vector< T > vdst, const_raw_vector< T > vsrc)
template<class T>
void | vmoveneg (raw_vector< T > vdst, const_raw_vector< T > vsrc)
template<class T, class T2>
void | vmove (raw_vector< T > vdst, const_raw_vector< T > vsrc, T2 alpha)
template<class T>
void | vadd (raw_vector< T > vdst, const_raw_vector< T > vsrc)
template<class T, class T2>
void | vadd (raw_vector< T > vdst, const_raw_vector< T > vsrc, T2 alpha)
template<class T>
void | vsub (raw_vector< T > vdst, const_raw_vector< T > vsrc)
template<class T, class T2>
void | vsub (raw_vector< T > vdst, const_raw_vector< T > vsrc, T2 alpha)
template<class T, class T2>
void | vmul (raw_vector< T > vdst, T2 alpha)
int | sign (double x)
double | randomreal ()
int | randominteger (int maxv)
int | round (double x)
int | trunc (double x)
int | ifloor (double x)
int | iceil (double x)
double | pi ()
double | sqr (double x)
int | maxint (int m1, int m2)
int | minint (int m1, int m2)
double | maxreal (double m1, double m2)
double | minreal (double m1, double m2)

## Variables

const double | machineepsilon = 5E-16
const double | maxrealnumber = 1E300
const double | minrealnumber = 1E-300

## Typedef Documentation

## boolean_1d_array

typedef template_1d_array< bool > ap::boolean_1d_array

Definition at line 976 of file ap.h.

## boolean_2d_array

typedef template_2d_array< bool > ap::boolean_2d_array

Definition at line 980 of file ap.h.

## complex_1d_array

typedef template_1d_array< complex > ap::complex_1d_array

Definition at line 975 of file ap.h.

## complex_2d_array

typedef template_2d_array< complex > ap::complex_2d_array

Definition at line 979 of file ap.h.

## integer_1d_array

typedef template_1d_array< int > ap::integer_1d_array

Definition at line 973 of file ap.h.

## integer_2d_array

typedef template_2d_array< int > ap::integer_2d_array

Definition at line 977 of file ap.h.

## real_1d_array

typedef template_1d_array< double > ap::real_1d_array

Definition at line 974 of file ap.h.

## real_2d_array

typedef template_2d_array< double > ap::real_2d_array

Definition at line 978 of file ap.h.

## Function Documentation

## abscomplex()

double ap::abscomplex | ( | const complex & | z | ) |

Definition at line 97 of file ap.cpp.

{
double w;
double xabs;
double yabs;
double v;
xabs = fabs(z.x);
yabs = fabs(z.y);
w = xabs>yabs ? xabs : yabs;
v = xabs<yabs ? xabs : yabs;
if( v==0 )
return w;
else
{
double t = v/w;
return w*sqrt(1+t*t);
}
}
ap::complex::x
double x
Definition ap.h:100
ap::complex::y
double y
Definition ap.h:100
w
const CanonicalForm & w
Definition facAbsFact.cc:51
v
const Variable & v
< [in] a sqrfree bivariate poly
Definition facBivar.h:39
sqrt
gmp_float sqrt(const gmp_float &a)
Definition mpr_complex.cc:319

## conj()

const complex ap::conj | ( | const complex & | z | ) |

Definition at line 117 of file ap.cpp.

{ return ap::complex(z.x, -z.y); }
ap::complex
Definition ap.h:60

## csqr()

const complex ap::csqr | ( | const complex & | z | ) |

Definition at line 120 of file ap.cpp.

{ return ap::complex(z.x*z.x-z.y*z.y, 2*z.x*z.y); }

## iceil()

int ap::iceil | ( | double | x | ) |

Definition at line 153 of file ap.cpp.

{ return int(ceil(x)); }
x
Variable x
Definition cfModGcd.cc:4090

## ifloor()

int ap::ifloor | ( | double | x | ) |

Definition at line 150 of file ap.cpp.

{ return int(floor(x)); }

## maxint()

int ap::maxint | ( | int | m1,
|  | int | m2 )

Definition at line 162 of file ap.cpp.

{
return m1>m2 ? m1 : m2;
}

## maxreal()

double ap::maxreal | ( | double | m1,
|  | double | m2 )

Definition at line 172 of file ap.cpp.

{
return m1>m2 ? m1 : m2;
}

## minint()

int ap::minint | ( | int | m1,
|  | int | m2 )

Definition at line 167 of file ap.cpp.

{
return m1>m2 ? m2 : m1;
}

## minreal()

double ap::minreal | ( | double | m1,
|  | double | m2 )

Definition at line 177 of file ap.cpp.

{
return m1>m2 ? m2 : m1;
}

## operator!=()

bool ap::operator!= | ( | const complex & | lhs,
|  | const complex & | rhs )

Definition at line 14 of file ap.cpp.

{ return lhs.x!=rhs.x || lhs.y!=rhs.y; }

## operator*() [1/3]

const complex ap::operator* | ( | const complex & | lhs,
|  | const complex & | rhs )

Definition at line 41 of file ap.cpp.

{ return ap::complex(lhs.x*rhs.x - lhs.y*rhs.y, lhs.x*rhs.y + lhs.y*rhs.x); }

## operator*() [2/3]

const complex ap::operator* | ( | const complex & | lhs,
|  | const double & | rhs )

Definition at line 44 of file ap.cpp.

{ return ap::complex(lhs.x*rhs, lhs.y*rhs); }

## operator*() [3/3]

const complex ap::operator* | ( | const double & | lhs,
|  | const complex & | rhs )

Definition at line 47 of file ap.cpp.

{ return ap::complex(lhs*rhs.x, lhs*rhs.y); }

## operator+() [1/4]

const complex ap::operator+ | ( | const complex & | lhs | ) |

Definition at line 17 of file ap.cpp.

{ return lhs; }

## operator+() [2/4]

const complex ap::operator+ | ( | const complex & | lhs,
|  | const complex & | rhs )

Definition at line 23 of file ap.cpp.

{ ap::complex r = lhs; r += rhs; return r; }

## operator+() [3/4]

const complex ap::operator+ | ( | const complex & | lhs,
|  | const double & | rhs )

Definition at line 26 of file ap.cpp.

{ ap::complex r = lhs; r += rhs; return r; }

## operator+() [4/4]

const complex ap::operator+ | ( | const double & | lhs,
|  | const complex & | rhs )

Definition at line 29 of file ap.cpp.

{ ap::complex r = rhs; r += lhs; return r; }

## operator-() [1/4]

const complex ap::operator- | ( | const complex & | lhs | ) |

Definition at line 20 of file ap.cpp.

{ return ap::complex(-lhs.x, -lhs.y); }

## operator-() [2/4]

const complex ap::operator- | ( | const complex & | lhs,
|  | const complex & | rhs )

Definition at line 32 of file ap.cpp.

{ ap::complex r = lhs; r -= rhs; return r; }

## operator-() [3/4]

const complex ap::operator- | ( | const complex & | lhs,
|  | const double & | rhs )

Definition at line 35 of file ap.cpp.

{ ap::complex r = lhs; r -= rhs; return r; }

## operator-() [4/4]

const complex ap::operator- | ( | const double & | lhs,
|  | const complex & | rhs )

Definition at line 38 of file ap.cpp.

{ ap::complex r = lhs; r -= rhs; return r; }

## operator/() [1/3]

const complex ap::operator/ | ( | const complex & | lhs,
|  | const complex & | rhs )

Definition at line 50 of file ap.cpp.

{
ap::complex result;
double e;
double f;
if( fabs(rhs.y)<fabs(rhs.x) )
{
e = rhs.y/rhs.x;
f = rhs.x+rhs.y*e;
result.x = (lhs.x+lhs.y*e)/f;
result.y = (lhs.y-lhs.x*e)/f;
}
else
{
e = rhs.x/rhs.y;
f = rhs.y+rhs.x*e;
result.x = (lhs.y+lhs.x*e)/f;
result.y = (-lhs.x+lhs.y*e)/f;
}
return result;
}
f
FILE * f
Definition checklibs.c:9
result
return result
Definition facAbsBiFact.cc:76

## operator/() [2/3]

const complex ap::operator/ | ( | const complex & | lhs,
|  | const double & | rhs )

Definition at line 94 of file ap.cpp.

{ return ap::complex(lhs.x/rhs, lhs.y/rhs); }

## operator/() [3/3]

const complex ap::operator/ | ( | const double & | lhs,
|  | const complex & | rhs )

Definition at line 72 of file ap.cpp.

{
ap::complex result;
double e;
double f;
if( fabs(rhs.y)<fabs(rhs.x) )
{
e = rhs.y/rhs.x;
f = rhs.x+rhs.y*e;
result.x = lhs/f;
result.y = -lhs*e/f;
}
else
{
e = rhs.x/rhs.y;
f = rhs.y+rhs.x*e;
result.x = lhs*e/f;
result.y = -lhs/f;
}
return result;
}

## operator==()

bool ap::operator== | ( | const complex & | lhs,
|  | const complex & | rhs )

Definition at line 11 of file ap.cpp.

{ return lhs.x==rhs.x && lhs.y==rhs.y; }

## pi()

double ap::pi | ( |  | ) |

Definition at line 156 of file ap.cpp.

{ return 3.14159265358979323846; }

## randominteger()

int ap::randominteger | ( | int | maxv | ) |

Definition at line 141 of file ap.cpp.

{ return rand()%maxv; }

## randomreal()

double ap::randomreal | ( |  | ) |

Definition at line 133 of file ap.cpp.

{
int i = rand();
while(i==RAND_MAX)
i =rand();
return double(i)/double(RAND_MAX);
}
i
int i
Definition cfEzgcd.cc:132

## round()

int ap::round | ( | double | x | ) |

Definition at line 144 of file ap.cpp.

{ return int(floor(x+0.5)); }

## sign()

int ap::sign | ( | double | x | ) |

Definition at line 126 of file ap.cpp.

{
if( x>0 ) return 1;
if( x<0 ) return -1;
return 0;
}

## sqr()

double ap::sqr | ( | double | x | ) |

Definition at line 159 of file ap.cpp.

{ return x*x; }

## trunc()

int ap::trunc | ( | double | x | ) |

Definition at line 147 of file ap.cpp.

{ return int(x>0 ? floor(x) : ceil(x)); }

## vadd() [1/2]

template<class T>

void ap::vadd | ( | raw_vector< T > | vdst,
|  | const_raw_vector< T > | vsrc )

Definition at line 413 of file ap.h.

{
ap_error::make_assertion(vdst.GetLength()==vsrc.GetLength());
if( vdst.GetStep()==1 && vsrc.GetStep()==1 )
{
//
// fast
//
T *p1 = vdst.GetData();
const T *p2 = vsrc.GetData();
int imax = vdst.GetLength()/4;
int i;
for(i=imax; i!=0; i--)
{
*p1 += *p2;
p1[1] += p2[1];
p1[2] += p2[2];
p1[3] += p2[3];
p1 += 4;
p2 += 4;
}
for(i=0; i<vdst.GetLength()%4; i++)
*(p1++) += *(p2++);
return;
}
else
{
//
// general
//
int offset11 = vdst.GetStep(), offset12 = 2*offset11, offset13 = 3*offset11, offset14 = 4*offset11;
int offset21 = vsrc.GetStep(), offset22 = 2*offset21, offset23 = 3*offset21, offset24 = 4*offset21;
T *p1 = vdst.GetData();
const T *p2 = vsrc.GetData();
int imax = vdst.GetLength()/4;
int i;
for(i=0; i<imax; i++)
{
*p1 += *p2;
p1[offset11] += p2[offset21];
p1[offset12] += p2[offset22];
p1[offset13] += p2[offset23];
p1 += offset14;
p2 += offset24;
}
for(i=0; i<vdst.GetLength()%4; i++)
{
*p1 += *p2;
p1 += vdst.GetStep();
p2 += vsrc.GetStep();
}
return;
}
}
ap::ap_error::make_assertion
static void make_assertion(bool bClause)
Definition ap.h:49
ap::const_raw_vector::GetStep
int GetStep() const
Definition ap.h:148
ap::const_raw_vector::GetData
const T * GetData() const
Definition ap.h:142
ap::const_raw_vector::GetLength
int GetLength() const
Definition ap.h:145
ap::raw_vector::GetData
T * GetData()
Definition ap.h:172
T
STATIC_VAR jList * T
Definition janet.cc:30

## vadd() [2/2]

template<class T, class T2>

void ap::vadd | ( | raw_vector< T > | vdst,
|  | const_raw_vector< T > | vsrc,
|  | T2 | alpha )

Definition at line 473 of file ap.h.

{
ap_error::make_assertion(vdst.GetLength()==vsrc.GetLength());
if( vdst.GetStep()==1 && vsrc.GetStep()==1 )
{
//
// fast
//
T *p1 = vdst.GetData();
const T *p2 = vsrc.GetData();
int imax = vdst.GetLength()/4;
int i;
for(i=imax; i!=0; i--)
{
*p1 += alpha*(*p2);
p1[1] += alpha*p2[1];
p1[2] += alpha*p2[2];
p1[3] += alpha*p2[3];
p1 += 4;
p2 += 4;
}
for(i=0; i<vdst.GetLength()%4; i++)
*(p1++) += alpha*(*(p2++));
return;
}
else
{
//
// general
//
int offset11 = vdst.GetStep(), offset12 = 2*offset11, offset13 = 3*offset11, offset14 = 4*offset11;
int offset21 = vsrc.GetStep(), offset22 = 2*offset21, offset23 = 3*offset21, offset24 = 4*offset21;
T *p1 = vdst.GetData();
const T *p2 = vsrc.GetData();
int imax = vdst.GetLength()/4;
int i;
for(i=0; i<imax; i++)
{
*p1 += alpha*(*p2);
p1[offset11] += alpha*p2[offset21];
p1[offset12] += alpha*p2[offset22];
p1[offset13] += alpha*p2[offset23];
p1 += offset14;
p2 += offset24;
}
for(i=0; i<vdst.GetLength()%4; i++)
{
*p1 += alpha*(*p2);
p1 += vdst.GetStep();
p2 += vsrc.GetStep();
}
return;
}
}
alpha
Variable alpha
Definition facAbsBiFact.cc:52

## vdotproduct()

template<class T>

T ap::vdotproduct | ( | const_raw_vector< T > | v1,
|  | const_raw_vector< T > | v2 )

Definition at line 181 of file ap.h.

{
ap_error::make_assertion(v1.GetLength()==v2.GetLength());
if( v1.GetStep()==1 && v2.GetStep()==1 )
{
//
// fast
//
T r = 0;
const T *p1 = v1.GetData();
const T *p2 = v2.GetData();
int imax = v1.GetLength()/4;
int i;
for(i=imax; i!=0; i--)
{
r += (*p1)*(*p2) + p1[1]*p2[1] + p1[2]*p2[2] + p1[3]*p2[3];
p1+=4;
p2+=4;
}
for(i=0; i<v1.GetLength()%4; i++)
r += (*(p1++))*(*(p2++));
return r;
}
else
{
//
// general
//
int offset11 = v1.GetStep(), offset12 = 2*offset11, offset13 = 3*offset11, offset14 = 4*offset11;
int offset21 = v2.GetStep(), offset22 = 2*offset21, offset23 = 3*offset21, offset24 = 4*offset21;
T r = 0;
const T *p1 = v1.GetData();
const T *p2 = v2.GetData();
int imax = v1.GetLength()/4;
int i;
for(i=0; i<imax; i++)
{
r += (*p1)*(*p2) + p1[offset11]*p2[offset21] + p1[offset12]*p2[offset22] + p1[offset13]*p2[offset23];
p1+=offset14;
p2+=offset24;
}
for(i=0; i<v1.GetLength()%4; i++)
{
r += (*p1)*(*p2);
p1+=offset11;
p2+=offset21;
}
return r;
}
}

## vmove() [1/2]

template<class T>

void ap::vmove | ( | raw_vector< T > | vdst,
|  | const_raw_vector< T > | vsrc )

Definition at line 237 of file ap.h.

{
ap_error::make_assertion(vdst.GetLength()==vsrc.GetLength());
if( vdst.GetStep()==1 && vsrc.GetStep()==1 )
{
//
// fast
//
T *p1 = vdst.GetData();
const T *p2 = vsrc.GetData();
int imax = vdst.GetLength()/2;
int i;
for(i=imax; i!=0; i--)
{
*p1 = *p2;
p1[1] = p2[1];
p1 += 2;
p2 += 2;
}
if(vdst.GetLength()%2 != 0)
*p1 = *p2;
return;
}
else
{
//
// general
//
int offset11 = vdst.GetStep(), offset12 = 2*offset11, offset13 = 3*offset11, offset14 = 4*offset11;
int offset21 = vsrc.GetStep(), offset22 = 2*offset21, offset23 = 3*offset21, offset24 = 4*offset21;
T *p1 = vdst.GetData();
const T *p2 = vsrc.GetData();
int imax = vdst.GetLength()/4;
int i;
for(i=0; i<imax; i++)
{
*p1 = *p2;
p1[offset11] = p2[offset21];
p1[offset12] = p2[offset22];
p1[offset13] = p2[offset23];
p1 += offset14;
p2 += offset24;
}
for(i=0; i<vdst.GetLength()%4; i++)
{
*p1 = *p2;
p1 += vdst.GetStep();
p2 += vsrc.GetStep();
}
return;
}
}

## vmove() [2/2]

template<class T, class T2>

void ap::vmove | ( | raw_vector< T > | vdst,
|  | const_raw_vector< T > | vsrc,
|  | T2 | alpha )

Definition at line 353 of file ap.h.

{
ap_error::make_assertion(vdst.GetLength()==vsrc.GetLength());
if( vdst.GetStep()==1 && vsrc.GetStep()==1 )
{
//
// fast
//
T *p1 = vdst.GetData();
const T *p2 = vsrc.GetData();
int imax = vdst.GetLength()/4;
int i;
for(i=imax; i!=0; i--)
{
*p1 = alpha*(*p2);
p1[1] = alpha*p2[1];
p1[2] = alpha*p2[2];
p1[3] = alpha*p2[3];
p1 += 4;
p2 += 4;
}
for(i=0; i<vdst.GetLength()%4; i++)
*(p1++) = alpha*(*(p2++));
return;
}
else
{
//
// general
//
int offset11 = vdst.GetStep(), offset12 = 2*offset11, offset13 = 3*offset11, offset14 = 4*offset11;
int offset21 = vsrc.GetStep(), offset22 = 2*offset21, offset23 = 3*offset21, offset24 = 4*offset21;
T *p1 = vdst.GetData();
const T *p2 = vsrc.GetData();
int imax = vdst.GetLength()/4;
int i;
for(i=0; i<imax; i++)
{
*p1 = alpha*(*p2);
p1[offset11] = alpha*p2[offset21];
p1[offset12] = alpha*p2[offset22];
p1[offset13] = alpha*p2[offset23];
p1 += offset14;
p2 += offset24;
}
for(i=0; i<vdst.GetLength()%4; i++)
{
*p1 = alpha*(*p2);
p1 += vdst.GetStep();
p2 += vsrc.GetStep();
}
return;
}
}

## vmoveneg()

template<class T>

void ap::vmoveneg | ( | raw_vector< T > | vdst,
|  | const_raw_vector< T > | vsrc )

Definition at line 295 of file ap.h.

{
ap_error::make_assertion(vdst.GetLength()==vsrc.GetLength());
if( vdst.GetStep()==1 && vsrc.GetStep()==1 )
{
//
// fast
//
T *p1 = vdst.GetData();
const T *p2 = vsrc.GetData();
int imax = vdst.GetLength()/2;
int i;
for(i=0; i<imax; i++)
{
*p1 = -*p2;
p1[1] = -p2[1];
p1 += 2;
p2 += 2;
}
if(vdst.GetLength()%2 != 0)
*p1 = -*p2;
return;
}
else
{
//
// general
//
int offset11 = vdst.GetStep(), offset12 = 2*offset11, offset13 = 3*offset11, offset14 = 4*offset11;
int offset21 = vsrc.GetStep(), offset22 = 2*offset21, offset23 = 3*offset21, offset24 = 4*offset21;
T *p1 = vdst.GetData();
const T *p2 = vsrc.GetData();
int imax = vdst.GetLength()/4;
int i;
for(i=imax; i!=0; i--)
{
*p1 = -*p2;
p1[offset11] = -p2[offset21];
p1[offset12] = -p2[offset22];
p1[offset13] = -p2[offset23];
p1 += offset14;
p2 += offset24;
}
for(i=0; i<vdst.GetLength()%4; i++)
{
*p1 = -*p2;
p1 += vdst.GetStep();
p2 += vsrc.GetStep();
}
return;
}
}

## vmul()

template<class T, class T2>

void ap::vmul | ( | raw_vector< T > | vdst,
|  | T2 | alpha )

Definition at line 603 of file ap.h.

{
if( vdst.GetStep()==1 )
{
//
// fast
//
T *p1 = vdst.GetData();
int imax = vdst.GetLength()/4;
int i;
for(i=imax; i!=0; i--)
{
*p1 *= alpha;
p1[1] *= alpha;
p1[2] *= alpha;
p1[3] *= alpha;
p1 += 4;
}
for(i=0; i<vdst.GetLength()%4; i++)
*(p1++) *= alpha;
return;
}
else
{
//
// general
//
int offset11 = vdst.GetStep(), offset12 = 2*offset11, offset13 = 3*offset11, offset14 = 4*offset11;
T *p1 = vdst.GetData();
int imax = vdst.GetLength()/4;
int i;
for(i=0; i<imax; i++)
{
*p1 *= alpha;
p1[offset11] *= alpha;
p1[offset12] *= alpha;
p1[offset13] *= alpha;
p1 += offset14;
}
for(i=0; i<vdst.GetLength()%4; i++)
{
*p1 *= alpha;
p1 += vdst.GetStep();
}
return;
}
}

## vsub() [1/2]

template<class T>

void ap::vsub | ( | raw_vector< T > | vdst,
|  | const_raw_vector< T > | vsrc )

Definition at line 533 of file ap.h.

{
ap_error::make_assertion(vdst.GetLength()==vsrc.GetLength());
if( vdst.GetStep()==1 && vsrc.GetStep()==1 )
{
//
// fast
//
T *p1 = vdst.GetData();
const T *p2 = vsrc.GetData();
int imax = vdst.GetLength()/4;
int i;
for(i=imax; i!=0; i--)
{
*p1 -= *p2;
p1[1] -= p2[1];
p1[2] -= p2[2];
p1[3] -= p2[3];
p1 += 4;
p2 += 4;
}
for(i=0; i<vdst.GetLength()%4; i++)
*(p1++) -= *(p2++);
return;
}
else
{
//
// general
//
int offset11 = vdst.GetStep(), offset12 = 2*offset11, offset13 = 3*offset11, offset14 = 4*offset11;
int offset21 = vsrc.GetStep(), offset22 = 2*offset21, offset23 = 3*offset21, offset24 = 4*offset21;
T *p1 = vdst.GetData();
const T *p2 = vsrc.GetData();
int imax = vdst.GetLength()/4;
int i;
for(i=0; i<imax; i++)
{
*p1 -= *p2;
p1[offset11] -= p2[offset21];
p1[offset12] -= p2[offset22];
p1[offset13] -= p2[offset23];
p1 += offset14;
p2 += offset24;
}
for(i=0; i<vdst.GetLength()%4; i++)
{
*p1 -= *p2;
p1 += vdst.GetStep();
p2 += vsrc.GetStep();
}
return;
}
}

## vsub() [2/2]

template<class T, class T2>

void ap::vsub | ( | raw_vector< T > | vdst,
|  | const_raw_vector< T > | vsrc,
|  | T2 | alpha )

Definition at line 593 of file ap.h.

{
vadd(vdst, vsrc, -alpha);
}
ap::vadd
void vadd(raw_vector< T > vdst, const_raw_vector< T > vsrc)
Definition ap.h:413

## Variable Documentation

## machineepsilon

const double ap::machineepsilon = 5E-16

extern

Definition at line 995 of file svd_si.h.

## maxrealnumber

const double ap::maxrealnumber = 1E300

extern

Definition at line 996 of file svd_si.h.

## minrealnumber

const double ap::minrealnumber = 1E-300

extern

Definition at line 997 of file svd_si.h.