Mercurial > hg > aimc
comparison carfac/carfac_output.cc @ 643:8b70f4cf00c7
Additional changes to C++ CARFAC on the basis of ronw's comments on r289. Moved CARFAC::Design to CARFAC::CARFAC and CARFAC::Reset(), moved carfac_common.h to common.h, CARFACDetect to carfac_util.h/cc, FloatArray and Float2dArray to ArrayX and ArrayXX, improved variable naming, made a start on improved commenting documentation.
author | alexbrandmeyer |
---|---|
date | Tue, 04 Jun 2013 18:30:22 +0000 |
parents | efc5b1b54f63 |
children | 3f01a136c537 |
comparison
equal
deleted
inserted
replaced
642:20f64146c2ce | 643:8b70f4cf00c7 |
---|---|
22 | 22 |
23 #include "carfac_output.h" | 23 #include "carfac_output.h" |
24 | 24 |
25 using std::vector; | 25 using std::vector; |
26 | 26 |
27 void CARFACOutput::Init(const int n_ears, const bool store_nap, | 27 CARFACOutput::CARFACOutput(const bool store_nap, const bool store_nap_decim, |
28 const bool store_nap_decim, const bool store_bm, | 28 const bool store_bm, const bool store_ohc, |
29 const bool store_ohc, const bool store_agc) { | 29 const bool store_agc) { |
30 n_ears_ = n_ears; | |
31 store_nap_ = store_nap; | 30 store_nap_ = store_nap; |
32 store_nap_decim_ = store_nap_decim; | 31 store_nap_decim_ = store_nap_decim; |
33 store_bm_ = store_bm; | 32 store_bm_ = store_bm; |
34 store_ohc_ = store_ohc; | 33 store_ohc_ = store_ohc; |
35 store_agc_ = store_agc; | 34 store_agc_ = store_agc; |
36 | 35 |
37 } | 36 } |
38 | 37 |
39 void CARFACOutput::StoreOutput(const vector<Ear>& ears) { | 38 void CARFACOutput::AppendOutput(const vector<Ear>& ears) { |
40 if (store_nap_) { | 39 if (store_nap_) { |
41 nap_.push_back(vector<FloatArray>()); | 40 nap_.push_back(vector<ArrayX>()); |
42 for (auto ear : ears) { | 41 for (auto ear : ears) { |
43 nap_.back().push_back(ear.ihc_out()); | 42 nap_.back().push_back(ear.ihc_out()); |
44 } | 43 } |
45 } | 44 } |
46 if (store_ohc_) { | 45 if (store_ohc_) { |
47 ohc_.push_back(vector<FloatArray>()); | 46 ohc_.push_back(vector<ArrayX>()); |
48 for (auto ear : ears) { | 47 for (auto ear : ears) { |
49 ohc_.back().push_back(ear.za_memory()); | 48 ohc_.back().push_back(ear.za_memory()); |
50 } | 49 } |
51 } | 50 } |
52 if (store_agc_) { | 51 if (store_agc_) { |
53 agc_.push_back(vector<FloatArray>()); | 52 agc_.push_back(vector<ArrayX>()); |
54 for (auto ear : ears) { | 53 for (auto ear : ears) { |
55 agc_.back().push_back(ear.zb_memory()); | 54 agc_.back().push_back(ear.zb_memory()); |
56 } | 55 } |
57 } | 56 } |
58 if (store_bm_) { | 57 if (store_bm_) { |
59 bm_.push_back(vector<FloatArray>()); | 58 bm_.push_back(vector<ArrayX>()); |
60 for (auto ear : ears) { | 59 for (auto ear : ears) { |
61 bm_.back().push_back(ear.zy_memory()); | 60 bm_.back().push_back(ear.zy_memory()); |
62 } | 61 } |
63 } | 62 } |
64 } | 63 } |