ReactOS 0.4.15-dev-7918-g2a2556c
complex< double > Struct Reference

#include <_complex.h>

Public Types

typedef double value_type
 
typedef complex< double_Self
 

Public Member Functions

 complex (value_type __x=0.0, value_type __y=0.0)
 
 complex (const complex< double > &__z)
 
 complex (const complex< float > &__z)
 
 complex (const complex< long double > &__z)
 
value_type real () const
 
value_type imag () const
 
_Selfoperator= (value_type __x)
 
_Selfoperator+= (value_type __x)
 
_Selfoperator-= (value_type __x)
 
_Selfoperator*= (value_type __x)
 
_Selfoperator/= (value_type __x)
 
_Selfoperator= (const _Self &__z)
 
_Selfoperator+= (const _Self &__z)
 
_Selfoperator-= (const _Self &__z)
 
_Selfoperator*= (const _Self &__z)
 
_Selfoperator/= (const _Self &__z)
 

Static Public Member Functions

static void _STLP_CALL _div (const double &__z1_r, const double &__z1_i, const double &__z2_r, const double &__z2_i, double &__res_r, double &__res_i)
 
static void _STLP_CALL _div (const double &__z1_r, const double &__z2_r, const double &__z2_i, double &__res_r, double &__res_i)
 

Public Attributes

value_type _M_re
 
value_type _M_im
 

Detailed Description

Definition at line 318 of file _complex.h.

Member Typedef Documentation

◆ _Self

typedef complex<double> complex< double >::_Self

Definition at line 320 of file _complex.h.

◆ value_type

typedef double complex< double >::value_type

Definition at line 319 of file _complex.h.

Constructor & Destructor Documentation

◆ complex() [1/4]

complex< double >::complex ( value_type  __x = 0.0,
value_type  __y = 0.0 
)
inline

Definition at line 324 of file _complex.h.

325 : _M_re(__x), _M_im(__y) {}
value_type _M_im
Definition: _complex.h:452
value_type _M_re
Definition: _complex.h:451

◆ complex() [2/4]

complex< double >::complex ( const complex< double > &  __z)
inline

Definition at line 327 of file _complex.h.

328 : _M_re(__z._M_re), _M_im(__z._M_im) {}

◆ complex() [3/4]

complex< double >::complex ( const complex< float > &  __z)
inline

Definition at line 602 of file _complex.h.

603 : _M_re(__z._M_re), _M_im(__z._M_im) {}
value_type _M_im
Definition: _complex.h:314
value_type _M_re
Definition: _complex.h:313

◆ complex() [4/4]

complex< double >::complex ( const complex< long double > &  __z)
inlineexplicit

Definition at line 607 of file _complex.h.

608 : _M_re((double)__z._M_re), _M_im((double)__z._M_im) {}

Member Function Documentation

◆ _div() [1/2]

void _STLP_CALL complex< double >::_div ( const double __z1_r,
const double __z1_i,
const double __z2_r,
const double __z2_i,
double __res_r,
double __res_i 
)
static

Definition at line 139 of file complex.cpp.

142{ _divT(__z1_r, __z1_i, __z2_r, __z2_i, __res_r, __res_i); }
static void _divT(const _Tp &__z1_r, const _Tp &__z1_i, const _Tp &__z2_r, const _Tp &__z2_i, _Tp &__res_r, _Tp &__res_i)
Definition: complex.cpp:84

◆ _div() [2/2]

void _STLP_CALL complex< double >::_div ( const double __z1_r,
const double __z2_r,
const double __z2_i,
double __res_r,
double __res_i 
)
static

Definition at line 145 of file complex.cpp.

148{ _divT(__z1_r, __z2_r, __z2_i, __res_r, __res_i); }

◆ imag()

value_type complex< double >::imag ( ) const
inline

Definition at line 335 of file _complex.h.

335{ return _M_im; }

◆ operator*=() [1/2]

_Self & complex< double >::operator*= ( const _Self __z)
inline

Definition at line 433 of file _complex.h.

433 {
434 value_type __r = _M_re * __z._M_re - _M_im * __z._M_im;
435 value_type __i = _M_re * __z._M_im + _M_im * __z._M_re;
436 _M_re = __r;
437 _M_im = __i;
438 return *this;
439 }
double value_type
Definition: _complex.h:319

◆ operator*=() [2/2]

_Self & complex< double >::operator*= ( value_type  __x)
inline

Definition at line 352 of file _complex.h.

352 {
353 _M_re *= __x;
354 _M_im *= __x;
355 return *this;
356 }

◆ operator+=() [1/2]

_Self & complex< double >::operator+= ( const _Self __z)
inline

Definition at line 421 of file _complex.h.

421 {
422 _M_re += __z._M_re;
423 _M_im += __z._M_im;
424 return *this;
425 }

◆ operator+=() [2/2]

_Self & complex< double >::operator+= ( value_type  __x)
inline

Definition at line 344 of file _complex.h.

344 {
345 _M_re += __x;
346 return *this;
347 }

◆ operator-=() [1/2]

_Self & complex< double >::operator-= ( const _Self __z)
inline

Definition at line 427 of file _complex.h.

427 {
428 _M_re -= __z._M_re;
429 _M_im -= __z._M_im;
430 return *this;
431 }

◆ operator-=() [2/2]

_Self & complex< double >::operator-= ( value_type  __x)
inline

Definition at line 348 of file _complex.h.

348 {
349 _M_re -= __x;
350 return *this;
351 }

◆ operator/=() [1/2]

_Self & complex< double >::operator/= ( const _Self __z)
inline

Definition at line 441 of file _complex.h.

441 {
442 value_type __r;
443 value_type __i;
444 _div(_M_re, _M_im, __z._M_re, __z._M_im, __r, __i);
445 _M_re = __r;
446 _M_im = __i;
447 return *this;
448 }
static void _STLP_CALL _div(const double &__z1_r, const double &__z1_i, const double &__z2_r, const double &__z2_i, double &__res_r, double &__res_i)
Definition: complex.cpp:139

◆ operator/=() [2/2]

_Self & complex< double >::operator/= ( value_type  __x)
inline

Definition at line 357 of file _complex.h.

357 {
358 _M_re /= __x;
359 _M_im /= __x;
360 return *this;
361 }

◆ operator=() [1/2]

_Self & complex< double >::operator= ( const _Self __z)
inline

Definition at line 415 of file _complex.h.

415 {
416 _M_re = __z._M_re;
417 _M_im = __z._M_im;
418 return *this;
419 }

◆ operator=() [2/2]

_Self & complex< double >::operator= ( value_type  __x)
inline

Definition at line 339 of file _complex.h.

339 {
340 _M_re = __x;
341 _M_im = 0.0;
342 return *this;
343 }

◆ real()

value_type complex< double >::real ( ) const
inline

Definition at line 334 of file _complex.h.

334{ return _M_re; }

Member Data Documentation

◆ _M_im

Definition at line 452 of file _complex.h.

Referenced by operator*=(), operator+=(), operator-=(), operator/=(), and operator=().

◆ _M_re

Definition at line 451 of file _complex.h.

Referenced by operator*=(), operator+=(), operator-=(), operator/=(), and operator=().


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