Mercurial > hg > aimc
diff carfac/ear_output.h @ 626:586b0677aae8
Fourth revision of Alex Brandmeyer's C++ implementation. Fixed more style issues, changed AGC structures to vectors, replaced FloatArray2d with vector<FloatArray>, implemented first tests using GTest to verify coefficients and monaural output against Matlab values (stored in aimc/carfac/test_data/). To run tests, change the path stored in carfac_test.h in TEST_SRC_DIR. Added CARFAC_GenerateTestData to the Matlab branch, fixed stage indexing in CARFAC_Cross_Couple.m to reflect changes in AGCCoeffs and AGCState structs.
author | alexbrandmeyer |
---|---|
date | Wed, 22 May 2013 21:30:02 +0000 |
parents | 0fbaf443ec82 |
children |
line wrap: on
line diff
--- a/carfac/ear_output.h Tue May 21 21:48:34 2013 +0000 +++ b/carfac/ear_output.h Wed May 22 21:30:02 2013 +0000 @@ -27,20 +27,20 @@ class EarOutput { public: - void InitOutput(int n_ch, int32_t n_tp); - void MergeOutput(EarOutput output, int32_t start, int32_t length); - void StoreNAPOutput(int32_t timepoint, int n_ch, FloatArray nap); - void StoreBMOutput(int32_t timepoint, int n_ch, FloatArray bm); - void StoreOHCOutput(int32_t timepoint, int n_ch, FloatArray ohc); - void StoreAGCOutput(int32_t timepoint, int n_ch, FloatArray agc); + void InitOutput(int n_ch, int32_t n_timepoints); + void StoreNAPOutput(const int32_t timepoint, const FloatArray& nap); + void StoreBMOutput(const int32_t timepoint, const FloatArray& bm); + void StoreOHCOutput(const int32_t timepoint, const FloatArray& ohc); + void StoreAGCOutput(const int32_t timepoint, const FloatArray& agc); + private: int n_ch_; int32_t n_timepoints_; - FloatArray2d nap_; - FloatArray2d nap_decim_; - FloatArray2d ohc_; - FloatArray2d agc_; - FloatArray2d bm_; + std::vector<FloatArray> nap_; + std::vector<FloatArray> nap_decim_; // TODO (alexbrandmeyer): store nap_decim output. + std::vector<FloatArray> ohc_; + std::vector<FloatArray> agc_; + std::vector<FloatArray> bm_; }; #endif \ No newline at end of file