efficient moving average filters, should speed up OFDM significantly
[debian/gnuradio] / gnuradio-core / src / lib / general / gr_firdes.cc
index 994424edf01f15346fa8a74b90c8ca593bbf7c38..06730b7f8d1fcaf1a039168555aeb73268be2fa4 100644 (file)
@@ -1,12 +1,12 @@
 /* -*- c++ -*- */
 /*
- * Copyright 2002 Free Software Foundation, Inc.
+ * Copyright 2002,2007 Free Software Foundation, Inc.
  * 
  * This file is part of GNU Radio
  * 
  * GNU Radio is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
+ * the Free Software Foundation; either version 3, or (at your option)
  * any later version.
  * 
  * GNU Radio is distributed in the hope that it will be useful,
@@ -272,7 +272,7 @@ gr_firdes::band_reject (double gain,
 
   for (int n = -M; n <= M; n++){
     if (n == 0)
-      taps[n + M] = (1.0 + (fwT0 - fwT1)) / M_PI * w[n + M];
+      taps[n + M] = 1.0 + ((fwT0 - fwT1) / M_PI * w[n + M]);
     else {
       taps[n + M] =  (sin (n * fwT0) - sin (n * fwT1)) / (n * M_PI) * w[n + M];
     }
@@ -518,7 +518,7 @@ gr_firdes::window (win_type type, int ntaps, double beta)
 
 #endif
   default:
-    throw std::runtime_error ("not_implemented");
+    throw std::out_of_range ("gr_firdes:window: type out of range");
   }
 
   return taps;