Loading...
Searching...
No Matches
ap::complex Class Reference

`#include <ap.h>`

## Public Member Functions

| complex ()
| complex (const double &_x)
| complex (const double &_x, const double &_y)
| complex (const complex &z)
complex & | operator= (const double &v)
complex & | operator+= (const double &v)
complex & | operator-= (const double &v)
complex & | operator*= (const double &v)
complex & | operator/= (const double &v)
complex & | operator= (const complex &z)
complex & | operator+= (const complex &z)
complex & | operator-= (const complex &z)
complex & | operator*= (const complex &z)
complex & | operator/= (const complex &z)
| complex ()
| complex (const double &_x)
| complex (const double &_x, const double &_y)
| complex (const complex &z)
complex & | operator= (const double &v)
complex & | operator+= (const double &v)
complex & | operator-= (const double &v)
complex & | operator*= (const double &v)
complex & | operator/= (const double &v)
complex & | operator= (const complex &z)
complex & | operator+= (const complex &z)
complex & | operator-= (const complex &z)
complex & | operator*= (const complex &z)
complex & | operator/= (const complex &z)

## Data Fields

double | x
double | y

## Detailed Description

Definition at line 59 of file ap.h.

## Constructor & Destructor Documentation

## complex() [1/8]

ap::complex::complex | ( |  | ) |

inline

Definition at line 62 of file ap.h.

:x(0.0),y(0.0){};
ap::complex::x
double x
Definition ap.h:100
ap::complex::y
double y
Definition ap.h:100

## complex() [2/8]

ap::complex::complex | ( | const double & | _x | ) |

inline

Definition at line 63 of file ap.h.

:x(_x),y(0.0){};

## complex() [3/8]

ap::complex::complex | ( | const double & | _x,
|  | const double & | _y )

inline

Definition at line 64 of file ap.h.

:x(_x),y(_y){};

## complex() [4/8]

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

inline

Definition at line 65 of file ap.h.

:x(z.x),y(z.y){};

## complex() [5/8]

ap::complex::complex | ( |  | ) |

inline

Definition at line 71 of file svd_si.h.

:x(0.0),y(0.0){};

## complex() [6/8]

ap::complex::complex | ( | const double & | _x | ) |

inline

Definition at line 72 of file svd_si.h.

:x(_x),y(0.0){};

## complex() [7/8]

ap::complex::complex | ( | const double & | _x,
|  | const double & | _y )

inline

Definition at line 73 of file svd_si.h.

:x(_x),y(_y){};

## complex() [8/8]

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

inline

Definition at line 74 of file svd_si.h.

:x(z.x),y(z.y){};

## Member Function Documentation

## operator*=() [1/4]

complex & ap::complex::operator*= | ( | const complex & | z | ) |

inline

Definition at line 76 of file ap.h.

{ double t = x*z.x-y*z.y; y = x*z.y+y*z.x; x = t; return *this; };

## operator*=() [2/4]

complex & ap::complex::operator*= | ( | const complex & | z | ) |

inline

Definition at line 85 of file svd_si.h.

{ double t = x*z.x-y*z.y; y = x*z.y+y*z.x; x = t; return *this; };

## operator*=() [3/4]

complex & ap::complex::operator*= | ( | const double & | v | ) |

inline

Definition at line 70 of file ap.h.

{ x *= v; y *= v; return *this; };
v
const Variable & v
< [in] a sqrfree bivariate poly
Definition facBivar.h:39

## operator*=() [4/4]

complex & ap::complex::operator*= | ( | const double & | v | ) |

inline

Definition at line 79 of file svd_si.h.

{ x *= v; y *= v; return *this; };

## operator+=() [1/4]

complex & ap::complex::operator+= | ( | const complex & | z | ) |

inline

Definition at line 74 of file ap.h.

{ x += z.x; y += z.y; return *this; };

## operator+=() [2/4]

complex & ap::complex::operator+= | ( | const complex & | z | ) |

inline

Definition at line 83 of file svd_si.h.

{ x += z.x; y += z.y; return *this; };

## operator+=() [3/4]

complex & ap::complex::operator+= | ( | const double & | v | ) |

inline

Definition at line 68 of file ap.h.

{ x += v; return *this; };

## operator+=() [4/4]

complex & ap::complex::operator+= | ( | const double & | v | ) |

inline

Definition at line 77 of file svd_si.h.

{ x += v; return *this; };

## operator-=() [1/4]

complex & ap::complex::operator-= | ( | const complex & | z | ) |

inline

Definition at line 75 of file ap.h.

{ x -= z.x; y -= z.y; return *this; };

## operator-=() [2/4]

complex & ap::complex::operator-= | ( | const complex & | z | ) |

inline

Definition at line 84 of file svd_si.h.

{ x -= z.x; y -= z.y; return *this; };

## operator-=() [3/4]

complex & ap::complex::operator-= | ( | const double & | v | ) |

inline

Definition at line 69 of file ap.h.

{ x -= v; return *this; };

## operator-=() [4/4]

complex & ap::complex::operator-= | ( | const double & | v | ) |

inline

Definition at line 78 of file svd_si.h.

{ x -= v; return *this; };

## operator/=() [1/4]

complex & ap::complex::operator/= | ( | const complex & | z | ) |

inline

Definition at line 77 of file ap.h.

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

## operator/=() [2/4]

complex & ap::complex::operator/= | ( | const complex & | z | ) |

inline

Definition at line 86 of file svd_si.h.

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

## operator/=() [3/4]

complex & ap::complex::operator/= | ( | const double & | v | ) |

inline

Definition at line 71 of file ap.h.

{ x /= v; y /= v; return *this; };

## operator/=() [4/4]

complex & ap::complex::operator/= | ( | const double & | v | ) |

inline

Definition at line 80 of file svd_si.h.

{ x /= v; y /= v; return *this; };

## operator=() [1/4]

complex & ap::complex::operator= | ( | const complex & | z | ) |

inline

Definition at line 73 of file ap.h.

{ x = z.x; y = z.y; return *this; };

## operator=() [2/4]

complex & ap::complex::operator= | ( | const complex & | z | ) |

inline

Definition at line 82 of file svd_si.h.

{ x = z.x; y = z.y; return *this; };

## operator=() [3/4]

complex & ap::complex::operator= | ( | const double & | v | ) |

inline

Definition at line 67 of file ap.h.

{ x = v; y = 0.0; return *this; };

## operator=() [4/4]

complex & ap::complex::operator= | ( | const double & | v | ) |

inline

Definition at line 76 of file svd_si.h.

{ x = v; y = 0.0; return *this; };

## Field Documentation

## x

double ap::complex::x

Definition at line 100 of file ap.h.

## y

double ap::complex::y

Definition at line 100 of file ap.h.

The documentation for this class was generated from the following files:

- Singular/svd/libs/ap.h
- Singular/svd_si.h