commit-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Commit-gnuradio] r11590 - gnuradio/branches/developers/n4hy/pfb_iir2/gn


From: n4hy
Subject: [Commit-gnuradio] r11590 - gnuradio/branches/developers/n4hy/pfb_iir2/gnuradio-core/src/lib/general
Date: Thu, 13 Aug 2009 16:11:27 -0600 (MDT)

Author: n4hy
Date: 2009-08-13 16:11:27 -0600 (Thu, 13 Aug 2009)
New Revision: 11590

Modified:
   
gnuradio/branches/developers/n4hy/pfb_iir2/gnuradio-core/src/lib/general/gr_iirdes.cc
   
gnuradio/branches/developers/n4hy/pfb_iir2/gnuradio-core/src/lib/general/gr_iirdes.h
Log:
that's more like it.  Force yourself to understand std::vector

Modified: 
gnuradio/branches/developers/n4hy/pfb_iir2/gnuradio-core/src/lib/general/gr_iirdes.cc
===================================================================
--- 
gnuradio/branches/developers/n4hy/pfb_iir2/gnuradio-core/src/lib/general/gr_iirdes.cc
       2009-08-13 20:16:03 UTC (rev 11589)
+++ 
gnuradio/branches/developers/n4hy/pfb_iir2/gnuradio-core/src/lib/general/gr_iirdes.cc
       2009-08-13 22:11:27 UTC (rev 11590)
@@ -303,13 +303,12 @@
   gsl_poly_complex_workspace *w;
   double *a,*b,*z;
   gr_iirdes::zpk rtn;
-
+  rtn.z.reserve(size);
+  rtn.p.reserve(size);
   
   if (size < 2) throw std::invalid_argument
                  ("transfer function to pole, zero, gain calculation requires 
order 2 or greater");
-  rtn.order = size;
-  rtn.z = new gr_complexd(size);
-  rtn.p = new gr_complexd(size);
+
   w = gsl_poly_complex_workspace_alloc(size);
   z = new double(size);
   a = new double(size);

Modified: 
gnuradio/branches/developers/n4hy/pfb_iir2/gnuradio-core/src/lib/general/gr_iirdes.h
===================================================================
--- 
gnuradio/branches/developers/n4hy/pfb_iir2/gnuradio-core/src/lib/general/gr_iirdes.h
        2009-08-13 20:16:03 UTC (rev 11589)
+++ 
gnuradio/branches/developers/n4hy/pfb_iir2/gnuradio-core/src/lib/general/gr_iirdes.h
        2009-08-13 22:11:27 UTC (rev 11590)
@@ -60,8 +60,8 @@
   } transfer_function;
 
   typedef struct _zpk {
-    gr_complexd *z;
-    gr_complexd *p;
+    std::vector<gr_complexd> z;
+    std::vector<gr_complexd> p;
     int order;
     double k;
   } zpk;





reply via email to

[Prev in Thread] Current Thread [Next in Thread]