[aimc] r296 committed - More #include cleanups.

0 views
Skip to first unread message

ai...@googlecode.com

unread,
Jun 11, 2013, 5:33:04 PM6/11/13
to aimc...@googlegroups.com
Revision: 296
Author: ro...@google.com
Date: Tue Jun 11 14:32:50 2013
Log: More #include cleanups.

http://code.google.com/p/aimc/source/detail?r=296

Modified:
/trunk/carfac/carfac.cc
/trunk/carfac/carfac.h
/trunk/carfac/carfac_output.cc
/trunk/carfac/carfac_output.h
/trunk/carfac/carfac_test.cc
/trunk/carfac/common.h
/trunk/carfac/ear.cc
/trunk/carfac/ear.h
/trunk/carfac/sai.cc

=======================================
--- /trunk/carfac/carfac.cc Tue Jun 11 13:41:15 2013
+++ /trunk/carfac/carfac.cc Tue Jun 11 14:32:50 2013
@@ -20,9 +20,13 @@
// See the License for the specific language governing permissions and
// limitations under the License.

+#include "carfac.h"
+
#include <assert.h>

-#include "carfac.h"
+#include "carfac_output.h"
+#include "carfac_util.h"
+#include "ear.h"

using std::vector;

=======================================
--- /trunk/carfac/carfac.h Tue Jun 11 13:41:15 2013
+++ /trunk/carfac/carfac.h Tue Jun 11 14:32:50 2013
@@ -27,12 +27,12 @@

#include "agc.h"
#include "car.h"
-#include "carfac_output.h"
-#include "carfac_util.h"
#include "common.h"
-#include "ear.h"
#include "ihc.h"

+class CARFACOutput;
+class Ear;
+
// Top-level class implementing the CAR-FAC C++ model. See the chapter
entitled
// 'The CAR-FAC Digital Cochlear Model' in Lyon's book "Human and Machine
// Hearing" for an overview.
=======================================
--- /trunk/carfac/carfac_output.cc Tue Jun 11 13:41:15 2013
+++ /trunk/carfac/carfac_output.cc Tue Jun 11 14:32:50 2013
@@ -21,6 +21,7 @@
// limitations under the License.

#include "carfac_output.h"
+#include "ear.h"

using std::vector;

=======================================
--- /trunk/carfac/carfac_output.h Tue Jun 11 13:41:15 2013
+++ /trunk/carfac/carfac_output.h Tue Jun 11 14:32:50 2013
@@ -27,7 +27,8 @@
#include <vector>

#include "common.h"
-#include "ear.h"
+
+class Ear;

// Container for the different types of output from a CARFAC model. See
the
// private members below for details.
=======================================
--- /trunk/carfac/carfac_test.cc Tue Jun 11 13:41:15 2013
+++ /trunk/carfac/carfac_test.cc Tue Jun 11 14:32:50 2013
@@ -20,6 +20,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.

+#include "carfac.h"
+
#include <fstream>
#include <string>
#include <vector>
@@ -28,7 +30,7 @@

#include "agc.h"
#include "car.h"
-#include "carfac.h"
+#include "carfac_output.h"
#include "common.h"
#include "ihc.h"

=======================================
--- /trunk/carfac/common.h Tue Jun 11 10:59:08 2013
+++ /trunk/carfac/common.h Tue Jun 11 14:32:50 2013
@@ -23,15 +23,9 @@
#ifndef CARFAC_COMMON_H
#define CARFAC_COMMON_H

-// This macro disallows the copy constructor and operator= functions.
-// This should be used in the private: declarations for a class.
-#define DISALLOW_COPY_AND_ASSIGN(TypeName) \
- TypeName(const TypeName&); \
- void operator=(const TypeName&)
-
// The Eigen library is used extensively for floating point arrays.
// For more information, see: http://eigen.tuxfamily.org
-#include <Eigen/Dense>
+#include <Eigen/Core>

// The 'FPType' typedef is used to enable easy switching in precision
level.
// It's currently set to double for during the unit testing phase of the
@@ -42,7 +36,12 @@
typedef Eigen::Array<FPType, Eigen::Dynamic, 1> ArrayX;
typedef Eigen::Array<FPType, Eigen::Dynamic, Eigen::Dynamic> ArrayXX;

-// A fixed value of PI is defined throughout the project.
static const FPType kPi = 3.141592653589793238;

+// This macro disallows the copy constructor and operator= functions.
+// This should be used in the private: declarations for a class.
+#define DISALLOW_COPY_AND_ASSIGN(TypeName) \
+ TypeName(const TypeName&); \
+ void operator=(const TypeName&)
+
#endif // CARFAC_COMMON_H
=======================================
--- /trunk/carfac/ear.cc Tue Jun 11 13:41:15 2013
+++ /trunk/carfac/ear.cc Tue Jun 11 14:32:50 2013
@@ -20,9 +20,11 @@
// See the License for the specific language governing permissions and
// limitations under the License.

+#include "ear.h"
+
#include <assert.h>

-#include "ear.h"
+#include "carfac_util.h"

Ear::Ear(const int num_channels, const CARCoeffs& car_coeffs,
const IHCCoeffs& ihc_coeffs,
@@ -152,7 +154,7 @@
((ihc_state_.cap1_voltage - ihc_state_.cap2_voltage)
* ihc_coeffs_.in2_rate);
}
- // Here we smooth the output twice using a LPF.
+ // Smooth the output twice using an LPF.
ihc_state_.ihc_out *= ihc_coeffs_.output_gain;
ihc_state_.lpf1_state += ihc_coeffs_.lpf_coeff *
(ihc_state_.ihc_out - ihc_state_.lpf1_state);
=======================================
--- /trunk/carfac/ear.h Tue Jun 11 13:41:15 2013
+++ /trunk/carfac/ear.h Tue Jun 11 14:32:50 2013
@@ -27,7 +27,6 @@

#include "agc.h"
#include "car.h"
-#include "carfac_util.h"
#include "common.h"
#include "ihc.h"

=======================================
--- /trunk/carfac/sai.cc Tue Jun 4 11:30:22 2013
+++ /trunk/carfac/sai.cc Tue Jun 11 14:32:50 2013
@@ -17,10 +17,10 @@
// See the License for the specific language governing permissions and
// limitations under the License.

-#include <assert.h>
-
#include "sai.h"

+#include <assert.h>
+
SAI::SAI(const SAIParams& params) : params_(params) {
assert(params_.window_width > params_.width &&
"SAI window_width must be larger than width.");
Reply all
Reply to author
Forward
0 new messages