1 #ifndef SimTK_SIMMATRIX_CONJUGATE_H_
2 #define SimTK_SIMMATRIX_CONJUGATE_H_
72 #ifndef SimTK_MIXED_PRECISION_REAL_COMPLEX_ALREADY_DEFINED
75 inline complex<float>
operator*(
const complex<float>& c,
int r) {
return c*(float)r;}
76 inline complex<float>
operator*(
int r,
const complex<float>& c) {
return (
float)r*c;}
77 inline complex<double>
operator*(
const complex<float>& c,
const double& r) {
return complex<double>(c)*r;}
78 inline complex<double>
operator*(
const double& r,
const complex<float>& c) {
return r*complex<double>(c);}
79 inline complex<long double>
operator*(
const complex<float>& c,
const long double& r) {
return complex<long double>(c)*r;}
80 inline complex<long double>
operator*(
const long double& r,
const complex<float>& c) {
return r*complex<long double>(c);}
82 inline complex<float>
operator/(
const complex<float>& c,
int r) {
return c/(float)r;}
83 inline complex<float>
operator/(
int r,
const complex<float>& c) {
return (
float)r/c;}
84 inline complex<double>
operator/(
const complex<float>& c,
const double& r) {
return complex<double>(c)/r;}
85 inline complex<double>
operator/(
const double& r,
const complex<float>& c) {
return r/complex<double>(c);}
86 inline complex<long double>
operator/(
const complex<float>& c,
const long double& r) {
return complex<long double>(c)/r;}
87 inline complex<long double>
operator/(
const long double& r,
const complex<float>& c) {
return r/complex<long double>(c);}
89 inline complex<float>
operator+(
const complex<float>& c,
int r) {
return c+(float)r;}
90 inline complex<float>
operator+(
int r,
const complex<float>& c) {
return (
float)r+c;}
91 inline complex<double>
operator+(
const complex<float>& c,
const double& r) {
return complex<double>(c)+r;}
92 inline complex<double>
operator+(
const double& r,
const complex<float>& c) {
return r+complex<double>(c);}
93 inline complex<long double>
operator+(
const complex<float>& c,
const long double& r) {
return complex<long double>(c)+r;}
94 inline complex<long double>
operator+(
const long double& r,
const complex<float>& c) {
return r+complex<long double>(c);}
96 inline complex<float>
operator-(
const complex<float>& c,
int r) {
return c-(float)r;}
97 inline complex<float>
operator-(
int r,
const complex<float>& c) {
return (
float)r-c;}
98 inline complex<double>
operator-(
const complex<float>& c,
const double& r) {
return complex<double>(c)-r;}
99 inline complex<double>
operator-(
const double& r,
const complex<float>& c) {
return r-complex<double>(c);}
100 inline complex<long double>
operator-(
const complex<float>& c,
const long double& r) {
return complex<long double>(c)-r;}
101 inline complex<long double>
operator-(
const long double& r,
const complex<float>& c) {
return r-complex<long double>(c);}
104 inline complex<double>
operator*(
const complex<double>& c,
int r) {
return c*(double)r;}
105 inline complex<double>
operator*(
int r,
const complex<double>& c) {
return (
double)r*c;}
106 inline complex<double>
operator*(
const complex<double>& c,
const float& r) {
return c*(double)r;}
107 inline complex<double>
operator*(
const float& r,
const complex<double>& c) {
return (
double)r*c;}
108 inline complex<long double>
operator*(
const complex<double>& c,
const long double& r){
return complex<long double>(c)*r;}
109 inline complex<long double>
operator*(
const long double& r,
const complex<double>& c){
return r*complex<long double>(c);}
111 inline complex<double>
operator/(
const complex<double>& c,
int r) {
return c/(double)r;}
112 inline complex<double>
operator/(
int r,
const complex<double>& c) {
return (
double)r/c;}
113 inline complex<double>
operator/(
const complex<double>& c,
const float& r) {
return c/(double)r;}
114 inline complex<double>
operator/(
const float& r,
const complex<double>& c) {
return (
double)r/c;}
115 inline complex<long double>
operator/(
const complex<double>& c,
const long double& r){
return complex<long double>(c)/r;}
116 inline complex<long double>
operator/(
const long double& r,
const complex<double>& c){
return r/complex<long double>(c);}
118 inline complex<double>
operator+(
const complex<double>& c,
int r) {
return c+(double)r;}
119 inline complex<double>
operator+(
int r,
const complex<double>& c) {
return (
double)r+c;}
120 inline complex<double>
operator+(
const complex<double>& c,
const float& r) {
return c+(double)r;}
121 inline complex<double>
operator+(
const float& r,
const complex<double>& c) {
return (
double)r+c;}
122 inline complex<long double>
operator+(
const complex<double>& c,
const long double& r){
return complex<long double>(c)+r;}
123 inline complex<long double>
operator+(
const long double& r,
const complex<double>& c){
return r+complex<long double>(c);}
125 inline complex<double>
operator-(
const complex<double>& c,
int r) {
return c-(double)r;}
126 inline complex<double>
operator-(
int r,
const complex<double>& c) {
return (
double)r-c;}
127 inline complex<double>
operator-(
const complex<double>& c,
const float& r) {
return c-(double)r;}
128 inline complex<double>
operator-(
const float& r,
const complex<double>& c) {
return (
double)r-c;}
129 inline complex<long double>
operator-(
const complex<double>& c,
const long double& r){
return complex<long double>(c)-r;}
130 inline complex<long double>
operator-(
const long double& r,
const complex<double>& c){
return r-complex<long double>(c);}
133 inline complex<long double>
operator*(
const complex<long double>& c,
int r) {
return c*(
long double)r;}
134 inline complex<long double>
operator*(
int r,
const complex<long double>& c) {
return (
long double)r*c;}
135 inline complex<long double>
operator*(
const complex<long double>& c,
const float& r) {
return c*(
long double)r;}
136 inline complex<long double>
operator*(
const float& r,
const complex<long double>& c) {
return (
long double)r*c;}
137 inline complex<long double>
operator*(
const complex<long double>& c,
const double& r){
return c*(
long double)r;}
138 inline complex<long double>
operator*(
const double& r,
const complex<long double>& c){
return (
long double)r*c;}
140 inline complex<long double>
operator/(
const complex<long double>& c,
int r) {
return c/(
long double)r;}
141 inline complex<long double>
operator/(
int r,
const complex<long double>& c) {
return (
long double)r/c;}
142 inline complex<long double>
operator/(
const complex<long double>& c,
const float& r) {
return c/(
long double)r;}
143 inline complex<long double>
operator/(
const float& r,
const complex<long double>& c) {
return (
long double)r/c;}
144 inline complex<long double>
operator/(
const complex<long double>& c,
const double& r){
return c/(
long double)r;}
145 inline complex<long double>
operator/(
const double& r,
const complex<long double>& c){
return (
long double)r/c;}
147 inline complex<long double>
operator+(
const complex<long double>& c,
int r) {
return c+(
long double)r;}
148 inline complex<long double>
operator+(
int r,
const complex<long double>& c) {
return (
long double)r+c;}
149 inline complex<long double>
operator+(
const complex<long double>& c,
const float& r) {
return c+(
long double)r;}
150 inline complex<long double>
operator+(
const float& r,
const complex<long double>& c) {
return (
long double)r+c;}
151 inline complex<long double>
operator+(
const complex<long double>& c,
const double& r){
return c+(
long double)r;}
152 inline complex<long double>
operator+(
const double& r,
const complex<long double>& c){
return (
long double)r+c;}
154 inline complex<long double>
operator-(
const complex<long double>& c,
int r) {
return c-(
long double)r;}
155 inline complex<long double>
operator-(
int r,
const complex<long double>& c) {
return (
long double)r-c;}
156 inline complex<long double>
operator-(
const complex<long double>& c,
const float& r) {
return c-(
long double)r;}
157 inline complex<long double>
operator-(
const float& r,
const complex<long double>& c) {
return (
long double)r-c;}
158 inline complex<long double>
operator-(
const complex<long double>& c,
const double& r){
return c-(
long double)r;}
159 inline complex<long double>
operator-(
const double& r,
const complex<long double>& c){
return (
long double)r-c;}
165 template <
class R>
class conjugate;
166 template <>
class conjugate<float>;
167 template <>
class conjugate<double>;
168 template <>
class conjugate<long double>;
178 template <
class N>
class negator;
185 template <
class R1,
class R2>
struct Wider {};
186 template <>
struct Wider<float,float> {
191 template <>
struct Wider<float,double> {
196 template <>
struct Wider<double,float> {
201 template <>
struct Wider<double,double> {
206 template <>
struct Wider<float,long double> {
211 template <>
struct Wider<double,long double> {
216 template <>
struct Wider<long double,float> {
221 template <>
struct Wider<long double,double> {
226 template <>
struct Wider<long double,long double> {
259 re = negIm = std::numeric_limits<float>::quiet_NaN();
268 conjugate(
int r,
int i) { re = float(r); negIm = float(i); }
281 { re = float(rd); negIm = 0.f; }
283 { re = float(rl); negIm = 0.f; }
289 { re = x.real(); negIm = -x.imag(); }
291 { re = float(x.real()); negIm = float(-x.imag()); }
293 { re = float(x.real()); negIm = float(-x.imag()); }
297 operator complex<float>()
const
298 {
return complex<float>(re,-negIm); }
303 complex<float>
operator-()
const {
return complex<float>(-re,negIm); }
313 { re = r; negIm = 0.f;
return *
this; }
315 { re += r;
return *
this; }
317 { re -= r;
return *
this; }
319 { re *= r; negIm *= r;
return *
this; }
321 { re /= r; negIm /= r;
return *
this; }
324 { re += c.re; negIm += c.negIm;
return *
this; }
326 { re -= c.re; negIm -= c.negIm;
return *
this; }
329 { re = c.real(); negIm = -c.imag();
return *
this; }
331 { re += c.real(); negIm -= c.imag();
return *
this; }
333 { re -= c.real(); negIm += c.imag();
return *
this; }
342 const float r=(re*c.re - negIm*c.negIm);
343 negIm=(re*c.negIm + negIm*c.re); re=r;
return *
this;
346 const float r=(re*t.real() + negIm*t.imag());
347 negIm=(negIm*t.real() - re*t.imag()); re=r;
return *
this;
353 const complex<float> t =
conj()/d.
conj();
354 re = t.real(); negIm = t.imag();
359 re = t.real(); negIm = t.imag();
363 const float&
real()
const {
return re; }
369 const complex<float>&
conj()
const {
return reinterpret_cast<const complex<float>&
>(*this); }
370 complex<float>&
conj() {
return reinterpret_cast<complex<float>&
>(*this); }
373 const float&
negImag()
const {
return negIm; }
375 bool isReal()
const {
return negIm==0.f; }
393 re = negIm = std::numeric_limits<double>::quiet_NaN();
402 conjugate(
int r,
int i) { re = double(r); negIm = double(i); }
412 { re = double(cf.
real()); negIm = double(cf.
negImag()); }
414 { re = double(rf); negIm = 0.; }
419 { re = double(rl); negIm = 0.; }
425 { re = double(x.real()); negIm = double(-x.imag()); }
427 { re = x.real(); negIm = -x.imag(); }
429 { re = double(x.real()); negIm = double(-x.imag()); }
433 operator complex<double>()
const
434 {
return complex<double>(re,-negIm); }
439 complex<double>
operator-()
const {
return complex<double>(-re,negIm); }
449 { re = r; negIm = 0.;
return *
this; }
451 { re += r;
return *
this; }
453 { re -= r;
return *
this; }
455 { re *= r; negIm *= r;
return *
this; }
457 { re /= r; negIm /= r;
return *
this; }
460 { re = r; negIm = 0.;
return *
this; }
462 { re += r;
return *
this; }
464 { re -= r;
return *
this; }
466 { re *= r; negIm *= r;
return *
this; }
468 { re /= r; negIm /= r;
return *
this; }
471 conjugate& operator =(
int i) {*
this =(double)i;
return *
this;}
478 { re += c.re; negIm += c.negIm;
return *
this; }
480 { re -= c.re; negIm -= c.negIm;
return *
this; }
483 { re += c.
real(); negIm += c.
negImag();
return *
this; }
485 { re -= c.
real(); negIm -= c.
negImag();
return *
this; }
488 { re = c.real(); negIm = -c.imag();
return *
this; }
490 { re += c.real(); negIm -= c.imag();
return *
this; }
492 { re -= c.real(); negIm += c.imag();
return *
this; }
495 { re = c.real(); negIm = -c.imag();
return *
this; }
497 { re += c.real(); negIm -= c.imag();
return *
this; }
499 { re -= c.real(); negIm += c.imag();
return *
this; }
508 const double r=(re*c.re - negIm*c.negIm);
509 negIm=(re*c.negIm + negIm*c.re); re=r;
return *
this;
512 const double r=(re*t.real() + negIm*t.imag());
513 negIm=(negIm*t.real() - re*t.imag()); re=r;
return *
this;
522 const complex<double> t =
conj()/d.
conj();
523 re = t.real(); negIm = t.imag();
528 re = t.real(); negIm = t.imag();
535 const double&
real()
const {
return re; }
541 const complex<double>&
conj()
const {
return reinterpret_cast<const complex<double>&
>(*this); }
542 complex<double>&
conj() {
return reinterpret_cast<complex<double>&
>(*this); }
545 const double&
negImag()
const {
return negIm; }
547 bool isReal()
const {
return negIm==0.; }
564 re = negIm = std::numeric_limits<long double>::quiet_NaN();
573 conjugate(
int r,
int i) { re = (
long double)r; negIm = (
long double)i; }
582 { re = (
long double)cf.
real(); negIm = (
long double)cf.
negImag(); }
584 { re = (
long double)cd.
real(); negIm = (
long double)cd.
negImag(); }
587 { re = (
long double)rf; negIm = 0.L; }
589 { re = (
long double)rd; negIm = 0.L; }
596 { re = (
long double)x.real(); negIm = (
long double)(-x.imag()); }
598 { re = (
long double)x.real(); negIm = (
long double)(-x.imag()); }
600 { re = x.real(); negIm = -x.imag(); }
604 operator complex<long double>()
const
605 {
return complex<long double>(re,-negIm); }
611 {
return complex<long double>(-re,negIm); }
622 { re = r; negIm = 0.L;
return *
this; }
624 { re += r;
return *
this; }
626 { re -= r;
return *
this; }
628 { re *= r; negIm *= r;
return *
this; }
630 { re /= r; negIm /= r;
return *
this; }
633 { re = r; negIm = 0.L;
return *
this; }
635 { re += r;
return *
this; }
637 { re -= r;
return *
this; }
639 { re *= r; negIm *= r;
return *
this; }
641 { re /= r; negIm /= r;
return *
this; }
644 { re = r; negIm = 0.L;
return *
this; }
646 { re += r;
return *
this; }
648 { re -= r;
return *
this; }
650 { re *= r; negIm *= r;
return *
this; }
652 { re /= r; negIm /= r;
return *
this; }
655 conjugate& operator =(
int i) {*
this =(
long double)i;
return *
this;}
662 { re += c.re; negIm += c.negIm;
return *
this; }
664 { re -= c.re; negIm -= c.negIm;
return *
this; }
667 { re += c.
real(); negIm += c.
negImag();
return *
this; }
669 { re -= c.
real(); negIm -= c.
negImag();
return *
this; }
672 { re += c.
real(); negIm += c.
negImag();
return *
this; }
674 { re -= c.
real(); negIm -= c.
negImag();
return *
this; }
677 { re = c.real(); negIm = -c.imag();
return *
this; }
679 { re += c.real(); negIm -= c.imag();
return *
this; }
681 { re -= c.real(); negIm += c.imag();
return *
this; }
684 { re = c.real(); negIm = -c.imag();
return *
this; }
686 { re += c.real(); negIm -= c.imag();
return *
this; }
688 { re -= c.real(); negIm += c.imag();
return *
this; }
691 { re = c.real(); negIm = -c.imag();
return *
this; }
693 { re += c.real(); negIm -= c.imag();
return *
this; }
695 { re -= c.real(); negIm += c.imag();
return *
this; }
704 const long double r=(re*c.re - negIm*c.negIm);
705 negIm=(re*c.negIm + negIm*c.re); re=r;
return *
this;
708 const long double r=(re*t.real() + negIm*t.imag());
709 negIm=(negIm*t.real() - re*t.imag()); re=r;
return *
this;
720 const complex<long double> t =
conj()/d.
conj();
721 re = t.real(); negIm = t.imag();
726 re = t.real(); negIm = t.imag();
735 const long double&
real()
const {
return re; }
736 long double&
real() {
return re; }
741 const complex<long double>&
conj()
const {
return reinterpret_cast<const complex<long double>&
>(*this); }
742 complex<long double>&
conj() {
return reinterpret_cast<complex<long double>&
>(*this); }
745 const long double&
negImag()
const {
return negIm; }
747 bool isReal()
const {
return negIm==0.L; }
756 re = float(cd.
real()); negIm = float(cd.
negImag());
759 re = float(cl.
real()); negIm = float(cl.
negImag());
762 re = double(cl.
real()); negIm = double(cl.
negImag());
799 template <
class R,
class CHAR,
class TRAITS>
inline std::basic_istream<CHAR,TRAITS>&
801 complex<R> z; is >> z; c=z;
804 template <
class R,
class CHAR,
class TRAITS>
inline std::basic_ostream<CHAR,TRAITS>&
805 operator<<(std::basic_ostream<CHAR,TRAITS>& os,
const conjugate<R>& c) {
806 return os << complex<R>(c);
849 {
return a.isReal() && a.real()==b; }
851 {
return a.isReal() && a.real()==b; }
853 {
return a.isReal() && a.real()==b; }
879 {
return complex<R>(a-b.real(), -b.imag()); }
881 {
return complex<long double>(a-b.real(), -b.imag()); }
897 {
return (R)a/complex<R>(b); }
899 {
return a/complex<long double>(b); }
911 template <
class R,
class S>
inline typename Wider<R,S>::WConj
914 a.negImag()+r.negImag());
918 template <
class R,
class S>
inline typename Wider<R,S>::WCplx
921 r.imag()-a.negImag());
923 template <
class R,
class S>
inline typename Wider<R,S>::WCplx
927 template <
class R,
class S>
inline typename Wider<R,S>::WCplx
930 r.negImag()-a.negImag());
934 template <
class R,
class S>
inline negator<typename Wider<R,S>::WCplx>
938 a.negImag()+r.imag()));
942 template <
class R,
class S>
inline typename Wider<R,S>::WCplx
945 a.imag()+r.negImag());
954 template <
class R,
class S>
inline negator<typename Wider<R,S>::WCplx>
958 a.real()*r.negImag() + a.negImag()*r.real()));
962 template <
class R,
class S>
inline typename Wider<R,S>::WCplx
965 a.real()*r.imag() - a.negImag()*r.real());
968 template <
class R,
class S>
inline typename Wider<R,S>::WCplx
975 template <
class R,
class S>
inline typename Wider<R,S>::WCplx
977 {
return (-a)*(-r); }
978 template <
class R,
class S>
inline typename Wider<R,S>::WCplx
980 {
return (-a)*(-r); }
986 template <
class R,
class S>
inline typename Wider<R,S>::WCplx
991 template <
class R,
class S>
inline typename Wider<R,S>::WCplx
996 template <
class R,
class S>
inline typename Wider<R,S>::WCplx
1002 template <
class R,
class S>
inline bool
1004 return a.real() == r.real() && a.negImag() == r.negImag();
1007 template <
class R,
class S>
inline bool
1009 return a.real() == r.real() && -a.negImag() == r.imag();
1012 template <
class R,
class S>
inline bool
1015 template <
class R,
class S>
inline bool
1018 template <
class R,
class S>
inline bool
1021 template <
class R,
class S>
inline bool
1027 #endif //SimTK_SIMMATRIX_CONJUGATE_H_
conjugate & operator/=(const float &r)
Definition: conjugate.h:651
const conjugate & operator+() const
Definition: conjugate.h:306
const complex< float > & conj() const
Definition: conjugate.h:369
conjugate(const long double &real, const long double &imag)
Construction from reals. Note that the numeric result is (real-imag*i).
Definition: conjugate.h:570
Matrix_< E > operator/(const MatrixBase< E > &l, const typename CNT< E >::StdNumber &r)
Definition: BigMatrix.h:2693
conjugate & operator*=(const complex< float > &t)
Definition: conjugate.h:345
negator< long double > & imag()
Definition: conjugate.h:739
double & real()
Definition: conjugate.h:536
conjugate< double > WConj
Definition: conjugate.h:199
conjugate & operator=(const double &r)
Definition: conjugate.h:448
conjugate(const complex< long double > &x)
Definition: conjugate.h:292
long double WReal
Definition: conjugate.h:227
conjugate & operator/=(const complex< float > &c)
Definition: conjugate.h:733
conjugate & operator*=(const double &r)
Definition: conjugate.h:454
complex< float > operator-() const
Definition: conjugate.h:303
complex< long double > & conj()
Definition: conjugate.h:742
conjugate(const float &real)
Implicit conversion from float to conjugate<float>.
Definition: conjugate.h:271
conjugate & operator=(const float &r)
Definition: conjugate.h:643
conjugate(const double &real, int i)
Definition: conjugate.h:400
const conjugate & operator+() const
Definition: conjugate.h:442
conjugate & operator+=(const conjugate< float > &c)
Definition: conjugate.h:671
conjugate & operator-=(const conjugate< double > &c)
Definition: conjugate.h:479
conjugate & operator+=(int i)
Definition: conjugate.h:656
complex< float > & conj()
Definition: conjugate.h:370
conjugate< long double > WConj
Definition: conjugate.h:229
negator< float > & imag()
Definition: conjugate.h:367
conjugate< long double > WConj
Definition: conjugate.h:214
long double WReal
Definition: conjugate.h:217
const double & negImag() const
Definition: conjugate.h:545
const float & negImag() const
Definition: conjugate.h:373
conjugate & operator-=(const float &r)
Definition: conjugate.h:463
complex< long double > WCplx
Definition: conjugate.h:223
complex< long double > operator-() const
Definition: conjugate.h:610
negator< double > & imag()
Definition: conjugate.h:539
conjugate(int r)
Definition: conjugate.h:577
conjugate(const complex< float > &x)
Definition: conjugate.h:424
double WReal
Definition: conjugate.h:197
conjugate & operator-=(const double &r)
Definition: conjugate.h:452
conjugate & operator*=(const conjugate< double > &c)
Definition: conjugate.h:712
complex< double > & conj()
Definition: conjugate.h:542
conjugate & operator-=(const float &r)
Definition: conjugate.h:647
SimTK::conjugate<R> should be instantiated only for float, double, long double.
Definition: String.h:45
conjugate & operator*=(const float &r)
Definition: conjugate.h:465
conjugate & operator-=(const conjugate< double > &c)
Definition: conjugate.h:668
conjugate & operator*=(const complex< double > &c)
Definition: conjugate.h:713
const long double & real() const
Definition: conjugate.h:735
complex< double > operator-() const
Definition: conjugate.h:439
conjugate & operator+=(const double &r)
Definition: conjugate.h:450
const negator< float > & imag() const
Definition: conjugate.h:366
conjugate & operator-=(const long double &r)
Definition: conjugate.h:625
Definition: conjugate.h:560
conjugate & operator+=(const double &r)
Definition: conjugate.h:634
conjugate & operator+=(const conjugate< float > &c)
Definition: conjugate.h:482
Matrix_< typename CNT< E1 >::template Result< E2 >::Sub > operator-(const MatrixBase< E1 > &l, const MatrixBase< E2 > &r)
Definition: BigMatrix.h:2664
bool isReal() const
Definition: conjugate.h:375
const complex< long double > & conj(const conjugate< long double > &c)
Definition: conjugate.h:785
conjugate & operator-=(const complex< double > &c)
Definition: conjugate.h:687
float WReal
Definition: conjugate.h:187
Definition: conjugate.h:255
conjugate & operator*=(int i)
Definition: conjugate.h:474
Definition: conjugate.h:389
conjugate & operator=(const float &r)
Definition: conjugate.h:312
conjugate< double > WConj
Definition: conjugate.h:194
conjugate(const long double &rl)
Definition: conjugate.h:282
std::basic_istream< CHAR, TRAITS > & operator>>(std::basic_istream< CHAR, TRAITS > &is, conjugate< R > &c)
Definition: conjugate.h:800
complex< double > WCplx
Definition: conjugate.h:198
conjugate(int r, int i)
Definition: conjugate.h:402
negator<N>, where N is a number type (real, complex, conjugate), is represented in memory identically...
Definition: String.h:44
conjugate & operator/=(const conjugate< double > &d)
Definition: conjugate.h:521
conjugate & operator-=(const complex< float > &c)
Definition: conjugate.h:332
conjugate & operator+=(const complex< float > &c)
Definition: conjugate.h:692
conjugate(const float &rf)
Definition: conjugate.h:413
conjugate< float > WConj
Definition: conjugate.h:189
complex< float > WCplx
Definition: conjugate.h:188
float & real()
Definition: conjugate.h:364
bool operator==(const PhiMatrix &p1, const PhiMatrix &p2)
Definition: SpatialAlgebra.h:774
conjugate & operator+=(const complex< float > &c)
Definition: conjugate.h:330
double WReal
Definition: conjugate.h:202
conjugate(const complex< double > &x)
Definition: conjugate.h:426
conjugate & operator/=(const conjugate< double > &c)
Definition: conjugate.h:730
conjugate & operator+=(const conjugate< double > &c)
Definition: conjugate.h:666
const double & real() const
Definition: conjugate.h:535
conjugate & operator*=(const long double &r)
Definition: conjugate.h:627
conjugate & operator=(const float &r)
Definition: conjugate.h:459
conjugate & operator/=(const complex< long double > &d)
Definition: conjugate.h:724
conjugate & operator+=(const conjugate< float > &c)
Definition: conjugate.h:323
conjugate & operator-=(const complex< float > &c)
Definition: conjugate.h:694
conjugate & operator*=(const complex< long double > &t)
Definition: conjugate.h:707
conjugate & operator*=(const conjugate< float > &c)
Definition: conjugate.h:516
long double WReal
Definition: conjugate.h:212
conjugate & operator-=(const complex< long double > &c)
Definition: conjugate.h:680
conjugate & operator*=(const conjugate< double > &c)
Definition: conjugate.h:507
conjugate & operator=(const complex< long double > &c)
Definition: conjugate.h:676
conjugate(int r, const double &imag)
Definition: conjugate.h:401
conjugate & operator-=(int i)
Definition: conjugate.h:657
conjugate(const complex< long double > &x)
Definition: conjugate.h:599
conjugate(const conjugate< float > &cf)
Definition: conjugate.h:411
conjugate & operator+=(const long double &r)
Definition: conjugate.h:623
conjugate & operator/=(const complex< double > &d)
Definition: conjugate.h:526
complex< long double > WCplx
Definition: conjugate.h:218
conjugate(int r, const float &imag)
Definition: conjugate.h:267
long double WReal
Definition: conjugate.h:222
double & negImag()
Definition: conjugate.h:546
conjugate(const double &rd)
Definition: conjugate.h:588
conjugate(int r)
Definition: conjugate.h:406
Matrix_< E > operator*(const MatrixBase< E > &l, const typename CNT< E >::StdNumber &r)
Definition: BigMatrix.h:2685
conjugate< long double > WConj
Definition: conjugate.h:209
complex< double > WCplx
Definition: conjugate.h:203
Definition: conjugate.h:185
conjugate(int r, const long double &imag)
Definition: conjugate.h:572
conjugate & operator*=(const complex< double > &t)
Definition: conjugate.h:511
conjugate & operator*=(int i)
Definition: conjugate.h:658
conjugate(const complex< float > &x)
Definition: conjugate.h:288
conjugate()
Definition: conjugate.h:257
long double & real()
Definition: conjugate.h:736
complex< double > WCplx
Definition: conjugate.h:193
conjugate & operator+=(int i)
Definition: conjugate.h:472
conjugate & operator+=(const float &r)
Definition: conjugate.h:314
conjugate & operator*=(const conjugate< long double > &c)
Definition: conjugate.h:703
conjugate & operator-=(const complex< float > &c)
Definition: conjugate.h:498
conjugate(int r, int i)
Definition: conjugate.h:268
conjugate(int r)
Definition: conjugate.h:272
const conjugate & operator+() const
Definition: conjugate.h:614
conjugate & operator-=(const conjugate< float > &c)
Definition: conjugate.h:673
conjugate & operator-=(const double &r)
Definition: conjugate.h:636
conjugate(const float &real, const float &imag)
Construction from reals. Note that the numeric result is (real-imag*i).
Definition: conjugate.h:265
float norm(const conjugate< float > &c)
Definition: conjugate.h:775
conjugate & operator-=(const conjugate< float > &c)
Definition: conjugate.h:325
const complex< double > & conj() const
Definition: conjugate.h:541
conjugate & operator/=(const float &r)
Definition: conjugate.h:467
const float & real(const conjugate< float > &c)
Definition: conjugate.h:771
conjugate & operator=(const complex< float > &c)
Definition: conjugate.h:690
conjugate & operator*=(const complex< float > &c)
Definition: conjugate.h:715
long double WReal
Definition: conjugate.h:207
RowVectorBase< typename CNT< ELEM >::TAbs > abs(const RowVectorBase< ELEM > &v)
Definition: VectorMath.h:120
bool isReal() const
Definition: conjugate.h:747
bool operator!=(const conjugate< R > &a, const float &b)
Definition: conjugate.h:859
conjugate & operator/=(const double &r)
Definition: conjugate.h:640
conjugate & operator-=(const conjugate< long double > &c)
Definition: conjugate.h:663
double WReal
Definition: conjugate.h:192
long double & negImag()
Definition: conjugate.h:746
complex< long double > WCplx
Definition: conjugate.h:208
const long double & negImag() const
Definition: conjugate.h:745
conjugate & operator/=(const double &r)
Definition: conjugate.h:456
conjugate & operator=(const long double &r)
Definition: conjugate.h:621
conjugate & operator*=(const complex< float > &c)
Definition: conjugate.h:517
const negator< double > & imag() const
Definition: conjugate.h:538
const float & real() const
Definition: conjugate.h:363
conjugate(const float &rf)
Definition: conjugate.h:586
conjugate()
Definition: conjugate.h:562
conjugate(const double &real, const double &imag)
Construction from reals. Note that the numeric result is (real-imag*i).
Definition: conjugate.h:399
conjugate & operator*=(const float &r)
Definition: conjugate.h:649
conjugate & operator=(const complex< double > &c)
Definition: conjugate.h:487
conjugate(const complex< float > &x)
Definition: conjugate.h:595
conjugate(const conjugate< double > &cd)
Definition: conjugate.h:583
conjugate & operator/=(const complex< float > &c)
Definition: conjugate.h:533
conjugate(const complex< double > &x)
Definition: conjugate.h:597
conjugate(int r, int i)
Definition: conjugate.h:573
conjugate & operator+=(const complex< float > &c)
Definition: conjugate.h:496
conjugate & operator/=(const conjugate< float > &c)
Definition: conjugate.h:732
conjugate & operator/=(const complex< double > &c)
Definition: conjugate.h:731
conjugate & operator/=(const long double &r)
Definition: conjugate.h:629
conjugate & operator*=(const conjugate< float > &c)
Definition: conjugate.h:341
const complex< long double > & conj() const
Definition: conjugate.h:741
long double norm(const conjugate< long double > &c)
Definition: conjugate.h:787
complex< long double > WCplx
Definition: conjugate.h:228
conjugate(const double &rd)
Definition: conjugate.h:280
conjugate & operator/=(int i)
Definition: conjugate.h:475
conjugate & operator*=(const conjugate< float > &c)
Definition: conjugate.h:714
conjugate(const float &real, int i)
Definition: conjugate.h:266
conjugate()
Definition: conjugate.h:391
conjugate & operator=(const complex< float > &c)
Definition: conjugate.h:328
Matrix_< typename CNT< E1 >::template Result< E2 >::Add > operator+(const MatrixBase< E1 > &l, const MatrixBase< E2 > &r)
Definition: BigMatrix.h:2648
const negator< long double > & imag() const
Definition: conjugate.h:738
const negator< float > & imag(const conjugate< float > &c)
Definition: conjugate.h:772
conjugate(const double &real)
Implicit conversion from double to conjugate<double>.
Definition: conjugate.h:405
float & negImag()
Definition: conjugate.h:374
conjugate< long double > WConj
Definition: conjugate.h:219
conjugate & operator+=(const complex< long double > &c)
Definition: conjugate.h:678
conjugate & operator=(const complex< double > &c)
Definition: conjugate.h:683
conjugate(const long double &real, int i)
Definition: conjugate.h:571
conjugate(const complex< long double > &x)
Definition: conjugate.h:428
conjugate & operator*=(const double &r)
Definition: conjugate.h:638
conjugate< double > WConj
Definition: conjugate.h:204
conjugate & operator=(const double &r)
Definition: conjugate.h:632
conjugate(const conjugate< float > &cf)
Definition: conjugate.h:581
conjugate & operator-=(int i)
Definition: conjugate.h:473
const complex< float > & conj(const conjugate< float > &c)
Definition: conjugate.h:773
conjugate & operator/=(const conjugate< long double > &d)
Definition: conjugate.h:719
conjugate & operator-=(const complex< double > &c)
Definition: conjugate.h:491
conjugate & operator-=(const conjugate< float > &c)
Definition: conjugate.h:484
conjugate & operator/=(const conjugate< float > &c)
Definition: conjugate.h:532
conjugate< long double > WConj
Definition: conjugate.h:224
conjugate(const long double &rl)
Definition: conjugate.h:418
conjugate & operator/=(const float &r)
Definition: conjugate.h:320
conjugate & operator/=(int i)
Definition: conjugate.h:659
conjugate & operator+=(const float &r)
Definition: conjugate.h:645
conjugate & operator=(const complex< float > &c)
Definition: conjugate.h:494
conjugate & operator+=(const complex< double > &c)
Definition: conjugate.h:685
long double abs(const conjugate< long double > &c)
Definition: conjugate.h:786
conjugate(const long double &real)
Implicit conversion from long double to conjugate<long double>.
Definition: conjugate.h:576
conjugate & operator-=(const float &r)
Definition: conjugate.h:316
bool isReal() const
Definition: conjugate.h:547
conjugate & operator+=(const complex< double > &c)
Definition: conjugate.h:489
conjugate & operator/=(const conjugate< float > &d)
Definition: conjugate.h:352
conjugate(const complex< double > &x)
Definition: conjugate.h:290
conjugate & operator+=(const float &r)
Definition: conjugate.h:461
conjugate & operator/=(const complex< float > &d)
Definition: conjugate.h:357
conjugate & operator+=(const conjugate< double > &c)
Definition: conjugate.h:477
conjugate & operator*=(const float &r)
Definition: conjugate.h:318
complex< long double > WCplx
Definition: conjugate.h:213
conjugate & operator+=(const conjugate< long double > &c)
Definition: conjugate.h:661