CGAL 6.0 - 2D Hyperbolic Surface Triangulations
|
Describes a complex number type that does not use square root.
Field
CGAL::Complex_number
Types | |
typedef unspecified_type | FT |
Field number type: must be a model of FieldNumberType . | |
Creation | |
ComplexNumber () | |
Default constructor, sets the both the real part and the imaginary part to \( 0 \). | |
ComplexNumber (const FT &real_part) | |
Constructor, sets the real part to real_part and the imaginary part to \( 0 \). | |
ComplexNumber (const FT &real_part, const FT &imaginary_part) | |
Constructor, sets the real part to real_part and the imaginary part to imaginary_part . | |
template<class U , class V > | |
Complex_number (U &&real_part, V &&imaginary_part) | |
Constructor, sets the real part to real_part and the imaginary part to imaginary_part . | |
Get and Set | |
void | real (const FT &real_part) |
sets the real part to real_part . | |
void | imag (const FT &imaginary_part) |
sets the imaginary part to imaginary_part . | |
FT | real () const |
returns the real part. | |
FT | imag () const |
returns the imaginary part. | |
Operations | |
FT | norm (Complex_number< FT > z) const |
returns the square of the modulus. | |
ComplexNumber< FT > | conj (Complex_number< FT > z) const |
returns the conjugate. | |
ComplexNumber< FT > | operator+ (const ComplexNumber< FT > &z) const |
returns +z. | |
ComplexNumber< FT > | operator- (const ComplexNumber< FT > &z) const |
returns -z. | |
ComplexNumber< FT > | operator+= (const ComplexNumber< FT > &other) const |
Unary complex addition. | |
ComplexNumber< FT > | operator-= (const ComplexNumber< FT > &other) const |
Unary complex substraction. | |
ComplexNumber< FT > | operator*= (const ComplexNumber< FT > &other) const |
Unary complex multiplication. | |
ComplexNumber< FT > | operator/= (const ComplexNumber< FT > &other) const |
Unary complex division. | |
ComplexNumber< FT > | operator= (const ComplexNumber< FT > &other) const |
Copy operator. | |
bool | operator== (const Complex_number< FT > &z1, const Complex_number< FT > &z2) |
Equality test. | |
bool | operator!= (const Complex_number< FT > &z1, const Complex_number< FT > &z2) |
Inequality test. | |
Complex_number< FT > | operator+ (const Complex_number< FT > &z1, const Complex_number< FT > &z2) |
Binary complex addition. | |
Complex_number< FT > | operator- (const Complex_number< FT > &z1, const Complex_number< FT > &z2) |
Binary complex substraction. | |
Complex_number< FT > | operator* (const Complex_number< FT > &z1, const Complex_number< FT > &z2) |
Binary complex multiplication. | |
Complex_number< FT > | operator/ (const Complex_number< FT > &z1, const Complex_number< FT > &z2) |
Binary complex division. | |
std::ostream & | operator<< (std::ostream &s, const Complex_number< FT > &z) |
writes the complex in a stream. | |
void | operator>> (std::istream &s, Complex_number< FT > &z) |
reads the complex from a stream. | |