File lssa-complex-real-imag.patch of Package octave-forge-lssa

Index: lssa/src/fastlscomplex.cc
===================================================================
--- lssa.orig/src/fastlscomplex.cc
+++ lssa/src/fastlscomplex.cc
@@ -372,8 +372,10 @@ bool flscomplex (const RowVector & tvec,
 
                             --tpra;
                             h = *tpra * *exp_ptr;
-                            record_current->power_series[p].real() -= h.imag();
-                            record_current->power_series[p].imag() += h.real();
+                            record_current->power_series[p].real ( 
+                              record_current->power_series[p].real() - h.imag());
+                            record_current->power_series[p].imag (
+                              record_current->power_series[p].imag() + h.real());
 
                             if (++exp_ptr >= exp_pse_ptr )
                               break;
@@ -386,8 +388,10 @@ bool flscomplex (const RowVector & tvec,
 
                             --tpra;
                             h = -*tpra * *exp_ptr;
-                            record_current->power_series[p].real() -= h.imag();
-                            record_current->power_series[p].imag() += h.real();
+                            record_current->power_series[p].real ( 
+                              record_current->power_series[p].real() - h.imag());
+                            record_current->power_series[p].imag (
+                              record_current->power_series[p].imag() + h.real());
 
                             if (++exp_ptr >= exp_pse_ptr)
                               break;
@@ -422,8 +426,10 @@ bool flscomplex (const RowVector & tvec,
 
                                   tprb -= 2;
                                   h = *tprb * *exp_ptr;
-                                  record_current->power_series[p].real() -= h.imag();
-                                  record_current->power_series[p].imag() += h.real();
+                                  record_current->power_series[p].real ( 
+                                    record_current->power_series[p].real() - h.imag());
+                                  record_current->power_series[p].imag (
+                                    record_current->power_series[p].imag() + h.real());
 
                                   if ( ++exp_ptr >= exp_pse_ptr )
                                     break;
@@ -436,8 +442,10 @@ bool flscomplex (const RowVector & tvec,
 
                                   tprb -= 2;
                                   h = - *tprb * *exp_ptr;
-                                  record_current->power_series[p].real() -= h.imag();
-                                  record_current->power_series[p].imag() += h.real();
+                                  record_current->power_series[p].real ( 
+                                    record_current->power_series[p].real() - h.imag());
+                                  record_current->power_series[p].imag (
+                                    record_current->power_series[p].imag() + h.real());
 
                                   if (++exp_ptr >= exp_pse_ptr)
                                     break;
@@ -467,8 +475,10 @@ bool flscomplex (const RowVector & tvec,
 
                                   --tpra;
                                   h = *tpra * *exp_ptr;
-                                  record_next->power_series[q].real() -= h.imag();
-                                  record_next->power_series[q].imag() += h.real();
+                                  record_next->power_series[q].real ( 
+                                    record_next->power_series[q].real() - h.imag());
+                                  record_next->power_series[q].imag (
+                                    record_next->power_series[q].imag() + h.real());
 
                                   if (++exp_ptr >= exp_pse_ptr)
                                     break;
@@ -481,8 +491,10 @@ bool flscomplex (const RowVector & tvec,
 
                                   --tpra;
                                   h = -*tpra * *exp_ptr;
-                                  record_next->power_series[q].real() -= h.imag();
-                                  record_next->power_series[q].imag() += h.real();
+                                  record_next->power_series[q].real ( 
+                                    record_next->power_series[q].real() - h.imag());
+                                  record_next->power_series[q].imag (
+                                    record_next->power_series[q].imag() + h.real());
 
                                   if (++exp_ptr >= exp_pse_ptr)
                                     break;
openSUSE Build Service is sponsored by