PCL
Complex.h
Go to the documentation of this file.
1 // ____ ______ __
2 // / __ \ / ____// /
3 // / /_/ // / / /
4 // / ____// /___ / /___ PixInsight Class Library
5 // /_/ \____//_____/ PCL 2.7.0
6 // ----------------------------------------------------------------------------
7 // pcl/Complex.h - Released 2024-06-18T15:48:54Z
8 // ----------------------------------------------------------------------------
9 // This file is part of the PixInsight Class Library (PCL).
10 // PCL is a multiplatform C++ framework for development of PixInsight modules.
11 //
12 // Copyright (c) 2003-2024 Pleiades Astrophoto S.L. All Rights Reserved.
13 //
14 // Redistribution and use in both source and binary forms, with or without
15 // modification, is permitted provided that the following conditions are met:
16 //
17 // 1. All redistributions of source code must retain the above copyright
18 // notice, this list of conditions and the following disclaimer.
19 //
20 // 2. All redistributions in binary form must reproduce the above copyright
21 // notice, this list of conditions and the following disclaimer in the
22 // documentation and/or other materials provided with the distribution.
23 //
24 // 3. Neither the names "PixInsight" and "Pleiades Astrophoto", nor the names
25 // of their contributors, may be used to endorse or promote products derived
26 // from this software without specific prior written permission. For written
27 // permission, please contact info@pixinsight.com.
28 //
29 // 4. All products derived from this software, in any form whatsoever, must
30 // reproduce the following acknowledgment in the end-user documentation
31 // and/or other materials provided with the product:
32 //
33 // "This product is based on software from the PixInsight project, developed
34 // by Pleiades Astrophoto and its contributors (https://pixinsight.com/)."
35 //
36 // Alternatively, if that is where third-party acknowledgments normally
37 // appear, this acknowledgment must be reproduced in the product itself.
38 //
39 // THIS SOFTWARE IS PROVIDED BY PLEIADES ASTROPHOTO AND ITS CONTRIBUTORS
40 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
41 // TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
42 // PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL PLEIADES ASTROPHOTO OR ITS
43 // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
44 // EXEMPLARY OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, BUSINESS
45 // INTERRUPTION; PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; AND LOSS OF USE,
46 // DATA OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
47 // CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
48 // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
49 // POSSIBILITY OF SUCH DAMAGE.
50 // ----------------------------------------------------------------------------
51 
52 #ifndef __PCL_Complex_h
53 #define __PCL_Complex_h
54 
56 
57 #include <pcl/Defs.h>
58 #include <pcl/Diagnostics.h>
59 
60 #include <pcl/Constants.h>
61 #include <pcl/Math.h>
62 #include <pcl/Relational.h>
63 
64 namespace pcl
65 {
66 
67 // ----------------------------------------------------------------------------
68 
69 #define real C[0]
70 #define imag C[1]
71 
82 template <typename T>
83 class PCL_CLASS Complex
84 {
85 public:
86 
90  using component = T;
91 
96  Complex() = default;
97 
101  Complex( T r, T i = 0 ) noexcept
102  {
103  real = r;
104  imag = i;
105  }
106 
110  template <typename T1>
111  Complex( const Complex<T1>& c ) noexcept
112  {
113  real = T( c.Real() );
114  imag = T( c.Imag() );
115  }
116 
120  constexpr T Real() const noexcept
121  {
122  return real;
123  }
124 
128  T& Real() noexcept
129  {
130  return real;
131  }
132 
136  constexpr T Imag() const noexcept
137  {
138  return imag;
139  }
140 
144  T& Imag() noexcept
145  {
146  return imag;
147  }
148 
152  constexpr bool IsReal() const noexcept
153  {
154  return imag == 0;
155  }
156 
160  template <typename T1>
161  Complex<T>& operator =( const Complex<T1>& c ) noexcept
162  {
163  real = T( c.Real() ), imag = T( c.Imag() );
164  return *this;
165  }
166 
171  template <typename T1>
172  Complex<T>& operator +=( const Complex<T1>& c ) noexcept
173  {
174  real += c.Real(), imag += c.Imag();
175  return *this;
176  }
177 
182  template <typename T1>
183  Complex<T>& operator -=( const Complex<T1>& c ) noexcept
184  {
185  real -= c.Real(), imag -= c.Imag();
186  return *this;
187  }
188 
193  template <typename T1>
194  Complex<T>& operator *=( const Complex<T1>& c ) noexcept
195  {
196  T t = T( real*c.Real() - imag*c.Imag() );
197  imag = T( imag*c.Real() + real*c.Imag() );
198  real = t;
199  return *this;
200  }
201 
206  template <typename T1>
207  Complex<T>& operator /=( const Complex<T1>& c ) noexcept
208  {
209  T r, d, t;
210  if ( pcl::Abs( c.Real() ) >= pcl::Abs( c.Imag() ) )
211  {
212  PCL_PRECONDITION( c.Real() != 0 )
213  r = T( c.Imag()/c.Real() );
214  d = T( c.Real() + r*c.Imag() );
215  t = T( (real + r*imag)/d );
216  imag = (imag - r*real)/d;
217  }
218  else
219  {
220  PCL_PRECONDITION( c.Imag() != 0 )
221  r = T( c.Real()/c.Imag() );
222  d = T( c.Imag() + r*c.Real() );
223  t = T( (real*r + imag)/d );
224  imag = (imag*r - real)/d;
225  }
226  real = t;
227  return *this;
228  }
229 
235  template <typename T1>
236  Complex<T>& operator =( T1 x ) noexcept
237  {
238  real = x, imag = 0;
239  return *this;
240  }
241 
246  template <typename T1>
247  Complex<T>& operator +=( T1 x ) noexcept
248  {
249  real += x;
250  return *this;
251  }
252 
258  template <typename T1>
259  Complex<T>& operator -=( T1 x ) noexcept
260  {
261  real -= x;
262  return *this;
263  }
264 
270  template <typename T1>
271  Complex<T>& operator *=( T1 x ) noexcept
272  {
273  real *= x, imag *= x;
274  return *this;
275  }
276 
282  template <typename T1>
283  Complex<T>& operator /=( T1 x ) noexcept
284  {
285  PCL_PRECONDITION( x != 0 )
286  real /= x, imag /= x;
287  return *this;
288  }
289 
293  Complex<T> operator +() const noexcept
294  {
295  return *this;
296  }
297 
304  Complex<T> operator -() const noexcept
305  {
306  return Complex<T>( -real, -imag );
307  }
308 
313  Complex<T> Conj() const noexcept
314  {
315  return Complex<T>( real, -imag );
316  }
317 
321  Complex<T> operator ~() const noexcept
322  {
323  return Conj();
324  }
325 
330  void SetConj() noexcept
331  {
332  imag = -imag;
333  }
334 
341  T Mag() const noexcept
342  {
343  T r = pcl::Abs( real );
344  T i = pcl::Abs( imag );
345  T m;
346  if ( r == 0 )
347  m = i;
348  else if ( i == 0 )
349  m = r;
350  else
351  {
352  bool q = r < i;
353  m = q ? r/i : i/r;
354  m = (q ? i : r) * pcl::Sqrt( 1 + m*m );
355  }
356  return m;
357  }
358 
365  explicit operator double() const noexcept
366  {
367  return double( Mag() );
368  }
369 
374  constexpr T Norm() const noexcept
375  {
376  return real*real + imag*imag;
377  }
378 
384  constexpr T Arg() const noexcept
385  {
386  // Degenerate cases (real=0) are correctly handled by real ArcTan(). For
387  // the undefined case real=imag=0, we silently return zero. Should we
388  // throw an exception instead?
389  return (real != 0 || imag != 0) ? pcl::ArcTan( imag, real ) : 0;
390  }
391 
392 private:
393 
394  /*
395  * C99 binary-compatible complex components.
396  */
397  T C[ 2 ]; // C[0] = real, C[1] = imaginary
398 };
399 
400 #undef real
401 #undef imag
402 
403 /*
404  * ### N.B.: Template class Complex<T> cannot have virtual member functions.
405  * This is because sizeof( Complex<T> ) _must_ be equal to 2*sizeof( T ).
406  */
407 template <typename T>
408 struct PCL_AssertComplexSize
409 {
410  static_assert( sizeof( Complex<T> ) == 2*sizeof( T ), "Invalid sizeof( Complex<> )" );
411 };
412 
413 // ----------------------------------------------------------------------------
414 
428 template <typename T> inline
429 T Abs( const Complex<T>& c ) noexcept
430 {
431  return c.Mag();
432 }
433 
440 template <typename T> inline
441 Complex<T> Polar( T r, T stheta, T ctheta ) noexcept
442 {
443  return Complex<T>( r*ctheta, r*stheta );
444 }
445 
451 template <typename T> inline
452 Complex<T> Polar( T r, T theta ) noexcept
453 {
454  return Polar( r, pcl::Sin( theta ), pcl::Cos( theta ) );
455 }
456 
457 // ----------------------------------------------------------------------------
458 
463 template <typename T1, class T2> inline
464 Complex<T1> operator +( const Complex<T1>& c1, const Complex<T2>& c2 ) noexcept
465 {
466  return Complex<T1>( T1( c1.Real() + c2.Real() ),
467  T1( c1.Imag() + c2.Imag() ) );
468 }
469 
478 template <typename T1, class T2> inline
479 Complex<T1> operator +( const Complex<T1>& c, T2 x ) noexcept
480 {
481  return Complex<T1>( T1( c.Real()+x ), c.Imag() );
482 }
483 
492 template <typename T1, class T2> inline
493 Complex<T2> operator +( T1 x, const Complex<T2>& c ) noexcept
494 {
495  return c + x;
496 }
497 
503 template <typename T1, class T2> inline
504 Complex<T1> operator -( const Complex<T1>& c1, const Complex<T2>& c2 ) noexcept
505 {
506  return Complex<T1>( T1( c1.Real() - c2.Real() ),
507  T1( c1.Imag() - c2.Imag() ) );
508 }
509 
520 template <typename T1, class T2> inline
521 Complex<T1> operator -( const Complex<T1>& c, T2 x ) noexcept
522 {
523  return Complex<T1>( T1( c.Real()-x ), c.Imag() );
524 }
525 
536 template <typename T1, class T2> inline
537 Complex<T2> operator -( T1 x, const Complex<T2>& c ) noexcept
538 {
539  return Complex<T2>( T2( x-c.Real() ), -c.Imag() );
540 }
541 
547 template <typename T1, class T2> inline
548 Complex<T1> operator *( const Complex<T1>& c1, const Complex<T2>& c2 ) noexcept
549 {
550  return Complex<T1>( T1( c1.Real()*c2.Real() - c1.Imag()*c2.Imag() ),
551  T1( c1.Imag()*c2.Real() + c1.Real()*c2.Imag() ) );
552 }
553 
564 template <typename T1, class T2> inline
565 Complex<T1> operator *( const Complex<T1>& c, T2 x ) noexcept
566 {
567  return Complex<T1>( T1( c.Real()*x ), c.Imag()*x );
568 }
569 
580 template <typename T1, class T2> inline
581 Complex<T2> operator *( T1 x, const Complex<T2>& c ) noexcept
582 {
583  return c * x;
584 }
585 
591 template <typename T1, class T2> inline
592 Complex<T1> operator /( const Complex<T1>& c1, const Complex<T2>& c2 ) noexcept
593 {
594  Complex<T1> c;
595  T2 r, d;
596  if ( pcl::Abs( c2.Real() ) >= pcl::Abs( c2.Imag() ) )
597  {
598  PCL_PRECONDITION( c2.Real() != 0 )
599  r = c2.Imag() / c2.Real();
600  d = c2.Real() + r*c2.Imag();
601  c.Real() = T1( (c1.Real() + r*c1.Imag())/d );
602  c.Imag() = T1( (c1.Imag() - r*c1.Real())/d );
603  }
604  else
605  {
606  PCL_PRECONDITION( c2.Imag() != 0 )
607  r = c2.Real() / c2.Imag();
608  d = c2.Imag() + r*c2.Real();
609  c.Real() = T1( (c1.Real()*r + c1.Imag())/d );
610  c.Imag() = T1( (c1.Imag()*r - c1.Real())/d );
611  }
612  return c;
613 }
614 
625 template <typename T1, class T2> inline
626 Complex<T1> operator /( const Complex<T1>& c, T2 x ) noexcept
627 {
628  PCL_PRECONDITION( x != 0 )
629  return Complex<T1>( T1( c.Real()/x ), T1( c.Imag()/x ) );
630 }
631 
642 template <typename T1, class T2> inline
643 Complex<T2> operator /( T1 x, const Complex<T2>& c ) noexcept
644 {
645  // return Complex( x, 0 )/c;
646  Complex<T2> c3;
647  T2 r, d;
648  if ( pcl::Abs( c.Real() ) >= pcl::Abs( c.Imag() ) )
649  {
650  PCL_PRECONDITION( c.Real() != 0 )
651  r = c.Imag()/c.Real();
652  d = c.Real() + r*c.Imag();
653  c3.Real() = T2( x/d );
654  c3.Imag() = T2( -((r*x)/d) );
655  }
656  else
657  {
658  PCL_PRECONDITION( c.Imag() != 0 )
659  r = c.Real()/c.Imag();
660  d = c.Imag() + r*c.Real();
661  c3.Real() = T2( (r*x)/d );
662  c3.Imag() = T2( -(x/d) );
663  }
664  return c3;
665 }
666 
667 // ----------------------------------------------------------------------------
668 
673 template <typename T> inline
674 Complex<T> Sqrt( const Complex<T>& c ) noexcept
675 {
676  if ( c.Real() == 0 && c.Imag() == 0 )
677  return Complex<T>( 0 );
678 
679  Complex<T> c1;
680  T m, r = pcl::Abs( c.Real() ), i = pcl::Abs( c.Imag() );
681 
682  if ( r >= i )
683  {
684  PCL_PRECONDITION( r != 0 )
685  T t = i/r;
686  m = pcl::Sqrt( r ) * pcl::Sqrt( (1 + pcl::Sqrt( 1 + t*t ))/2 );
687  }
688  else
689  {
690  PCL_PRECONDITION( i != 0 )
691  T t = r/i;
692  m = pcl::Sqrt( i ) * pcl::Sqrt( (t + pcl::Sqrt( 1 + t*t ))/2 );
693  }
694 
695  if ( c.Real() >= 0 )
696  {
697  c1.Real() = m;
698  c1.Imag() = c.Imag()/(m+m);
699  }
700  else
701  {
702  c1.Imag() = (c.Imag() >= 0) ? m : -m;
703  c1.Real() = c.Imag()/(c1.Imag()+c1.Imag());
704  }
705 
706  return c1;
707 }
708 
713 template <typename T> inline
714 Complex<T> Exp( const Complex<T>& c ) noexcept
715 {
716  T x = pcl::Exp( c.Real() );
717  return Complex<T>( x*pcl::Cos( c.Imag() ), x*pcl::Sin( c.Imag() ) );
718 }
719 
724 template <typename T> inline
725 Complex<T> Ln( const Complex<T>& c ) noexcept
726 {
727  return Complex<T>( pcl::Ln( c.Mag() ), c.Arg() );
728 }
729 
734 template <typename T> inline
735 Complex<T> Log( const Complex<T>& c ) noexcept
736 {
737  return pcl::Const<T>::log10e() * pcl::Ln( c );
738 }
739 
740 // ----------------------------------------------------------------------------
741 
746 template <typename T1, class T2> inline
747 Complex<T1> Pow( const Complex<T1>& c, T2 x ) noexcept
748 {
749  if ( c.Imag() == 0 )
750  return Complex<T1>( pcl::Pow( c.Real(), T1( x ) ) );
751  else
752  return pcl::Exp( T1( x )*pcl::Ln( c ) );
753 }
754 
759 template <typename T1, class T2> inline
760 Complex<T2> Pow( T1 x, const Complex<T2>& c ) noexcept
761 {
762  if ( c.Imag() == 0 )
763  return Complex<T2>( pcl::Pow( T2( x ), c.Real() ) );
764  else
765  return pcl::Exp( c*pcl::Ln( T2( x ) ) );
766 }
767 
773 template <typename T> inline
774 Complex<T> Pow( const Complex<T>& c1, const Complex<T>& c2 ) noexcept
775 {
776  if ( c2.Imag() == 0 )
777  return pcl::Pow( c1, c2.Real() );
778  else if ( c1.Imag() == 0 )
779  return Complex<T>( pcl::Pow( c1.Real(), c2 ) );
780  else
781  return pcl::Exp( c2*pcl::Ln( c1 ) );
782 }
783 
784 // ----------------------------------------------------------------------------
785 
794 template <typename T> inline
795 Complex<T> Sin( const Complex<T>& c ) noexcept
796 {
797  return Complex<T>( pcl::Sin( c.Real() )*pcl::Cosh( c.Imag() ),
798  pcl::Cos( c.Real() )*pcl::Sinh( c.Imag() ) );
799 }
800 
805 template <typename T> inline
806 Complex<T> Cos( const Complex<T>& c ) noexcept
807 {
808  return Complex<T>( pcl::Cos( c.Real() )*pcl::Cosh( c.Imag() ),
809  -pcl::Sin( c.Real() )*pcl::Sinh( c.Imag() ) );
810 }
811 
816 template <typename T> inline
817 Complex<T> Tan( const Complex<T>& c ) noexcept
818 {
819  return pcl::Sin( c )/pcl::Cos( c );
820 }
821 
826 template <typename T> inline
827 Complex<T> Sinh( const Complex<T>& c ) noexcept
828 {
829  return Complex<T>( pcl::Sinh( c.Real() )*pcl::Cos( c.Imag() ),
830  pcl::Cosh( c.Real() )*pcl::Sin( c.Imag() ) );
831 }
832 
837 template <typename T> inline
838 Complex<T> Cosh( const Complex<T>& c ) noexcept
839 {
840  return Complex<T>( pcl::Cosh( c.Real() )*pcl::Cos( c.Imag() ),
841  pcl::Sinh( c.Real() )*pcl::Sin( c.Imag() ) );
842 }
843 
848 template <typename T> inline
849 Complex<T> Tanh( const Complex<T>& c ) noexcept
850 {
851  return pcl::Sinh( c )/pcl::Cosh( c );
852 }
853 
854 // ----------------------------------------------------------------------------
855 
870 template <typename T1, class T2> inline
871 bool operator ==( const Complex<T1>& c1, const Complex<T2>& c2 ) noexcept
872 {
873  return c1.Real() == c2.Real() && c1.Imag() == c2.Imag();
874 }
875 
880 template <typename T1, class T2> inline
881 bool operator ==( const Complex<T1>& c, T2 x ) noexcept
882 {
883  return c.Real() == x && c.Imag() == T1( 0 );
884 }
885 
890 template <typename T1, class T2> inline
891 bool operator ==( T1 x, const Complex<T2>& c ) noexcept
892 {
893  return c == x;
894 }
895 
900 template <typename T1, class T2> inline
901 bool operator <( const Complex<T1>& c1, const Complex<T2>& c2 ) noexcept
902 {
903  return c1.Mag() < c2.Mag();
904 }
905 
910 template <typename T1, class T2> inline
911 bool operator <( const Complex<T1>& c, T2 x ) noexcept
912 {
913  return c.Mag() < pcl::Abs( x );
914 }
915 
920 template <typename T1, class T2> inline
921 bool operator <( T1 x, const Complex<T2>& c ) noexcept
922 {
923  return pcl::Abs( x ) < c.Mag();
924 }
925 
926 // ----------------------------------------------------------------------------
927 
937 template <typename T> inline
938 Complex<T> Round( const Complex<T>& c ) noexcept
939 {
940  return Complex<T>( pcl::Round( c.Real() ), pcl::Round( c.Imag() ) );
941 }
942 
949 template <typename T> inline
950 Complex<T> Round( const Complex<T>& c, int n ) noexcept
951 {
952  PCL_PRECONDITION( n >= 0 )
953  return Complex<T>( pcl::Round( c.Real(), n ), pcl::Round( c.Imag(), n ) );
954 }
955 
956 // ----------------------------------------------------------------------------
957 
982 template <typename T> inline
983 void PhaseCorrelationMatrix( Complex<T>* __restrict__ i, const Complex<T>* __restrict__ j,
984  const Complex<T>* __restrict__ a, const Complex<T>* __restrict__ b ) noexcept
985 {
986  const T tiny = T( 1.0e-20 );
987  for ( ; i < j; ++i, ++a, ++b )
988  {
989  Complex<T> n = *a * ~*b;
990  *i = n/Max( tiny, Abs( n ) );
991  }
992 }
993 
1014 template <typename T> inline
1015 void CrossPowerSpectrumMatrix( Complex<T>* __restrict__ i, const Complex<T>* __restrict__ j,
1016  const Complex<T>* __restrict__ a, const Complex<T>* __restrict__ b ) noexcept
1017 {
1018  const T tiny = T( 1.0e-20 );
1019  for ( ; i < j; ++i, ++a, ++b )
1020  *i = (*b * ~*a)/Max( tiny, Abs( *a ) * Abs( *b ) );
1021 }
1022 
1023 //
1024 // Stream extraction/insertion.
1025 //
1026 /* ### PCL 2.x: Add these along with pcl::DataStream, etc...
1027 template <class S, typename T> inline
1028 S& operator >>( S& s, Complex<T>& c )
1029 {
1030  return s >> c.Real() >> c.Imag();
1031 }
1032 
1033 template <class S, typename T> inline
1034 S& operator <<( S& s, const Complex<T>& c )
1035 {
1036  return s << c.Real() << c.Imag();
1037 }
1038  */
1039 
1040 // ----------------------------------------------------------------------------
1041 
1042 #ifndef __PCL_NO_COMPLEX_INSTANTIATE
1043 
1056 using Complex32 = Complex<float>;
1057 
1067 using fcomplex = Complex32;
1068 
1077 using Complex64 = Complex<double>;
1078 
1088 using dcomplex = Complex64;
1089 
1099 using complex = dcomplex;
1100 
1101 #endif // __PCL_NO_COMPLEX_INSTANTIATE
1102 
1103 // ----------------------------------------------------------------------------
1104 
1105 } // pcl
1106 
1107 #endif // __PCL_Complex_h
1108 
1109 // ----------------------------------------------------------------------------
1110 // EOF pcl/Complex.h - Released 2024-06-18T15:48:54Z
A complex number whose components are 32-bit floating point real numbers.
A complex number whose components are 64-bit floating point real numbers.
Generic complex number.
Definition: Complex.h:84
constexpr T Imag() const noexcept
Definition: Complex.h:136
void SetConj() noexcept
Definition: Complex.h:330
constexpr bool IsReal() const noexcept
Definition: Complex.h:152
Complex(T r, T i=0) noexcept
Definition: Complex.h:101
constexpr T Real() const noexcept
Definition: Complex.h:120
Complex()=default
Complex(const Complex< T1 > &c) noexcept
Definition: Complex.h:111
Complex< T > Conj() const noexcept
Definition: Complex.h:313
static constexpr T log10e()
Definition: Constants.h:159
A complex number whose components are 64-bit floating point real numbers.
A complex number whose components are 64-bit floating point real numbers.
A complex number whose components are 32-bit floating point real numbers.
bool operator==(const Array< T, A > &x1, const Array< T, A > &x2) noexcept
Definition: Array.h:2267
bool operator<(const Array< T, A > &x1, const Array< T, A > &x2) noexcept
Definition: Array.h:2278
Complex< T1 > operator-(const Complex< T1 > &c1, const Complex< T2 > &c2) noexcept
Definition: Complex.h:504
Complex< T1 > operator*(const Complex< T1 > &c1, const Complex< T2 > &c2) noexcept
Definition: Complex.h:548
Complex< T1 > operator+(const Complex< T1 > &c1, const Complex< T2 > &c2) noexcept
Definition: Complex.h:464
Complex< T1 > operator/(const Complex< T1 > &c1, const Complex< T2 > &c2) noexcept
Definition: Complex.h:592
Complex< T1 > Pow(const Complex< T1 > &c, T2 x) noexcept
Definition: Complex.h:747
Complex< T > Sqrt(const Complex< T > &c) noexcept
Definition: Complex.h:674
Complex< T > Exp(const Complex< T > &c) noexcept
Definition: Complex.h:714
Complex< T > Log(const Complex< T > &c) noexcept
Definition: Complex.h:735
Complex< T > Ln(const Complex< T > &c) noexcept
Definition: Complex.h:725
Complex< T > Polar(T r, T stheta, T ctheta) noexcept
Definition: Complex.h:441
T Abs(const Complex< T > &c) noexcept
Definition: Complex.h:429
Complex< T > Round(const Complex< T > &c) noexcept
Definition: Complex.h:938
Complex< T > Sinh(const Complex< T > &c) noexcept
Definition: Complex.h:827
Complex< T > Tanh(const Complex< T > &c) noexcept
Definition: Complex.h:849
Complex< T > Sin(const Complex< T > &c) noexcept
Definition: Complex.h:795
Complex< T > Cosh(const Complex< T > &c) noexcept
Definition: Complex.h:838
Complex< T > Cos(const Complex< T > &c) noexcept
Definition: Complex.h:806
Complex< T > Tan(const Complex< T > &c) noexcept
Definition: Complex.h:817
constexpr T ArcTan(T x) noexcept
Definition: Math.h:526
T Norm(const T *i, const T *j, const P &p) noexcept
Definition: Math.h:2135
void PhaseCorrelationMatrix(Complex< T > *__restrict__ i, const Complex< T > *__restrict__ j, const Complex< T > *__restrict__ a, const Complex< T > *__restrict__ b) noexcept
Definition: Complex.h:983
void CrossPowerSpectrumMatrix(Complex< T > *__restrict__ i, const Complex< T > *__restrict__ j, const Complex< T > *__restrict__ a, const Complex< T > *__restrict__ b) noexcept
Definition: Complex.h:1015
constexpr const T & Max(const T &a, const T &b) noexcept
Definition: Utility.h:119
PCL root namespace.
Definition: AbstractImage.h:77