Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(45)

Unified Diff: src/uan/model/uan-prop-model.cc

Issue 14677043: UAN-WOSS framework
Patch Set: Bug fixes thanks to Randall and Raul, new features added as per WOSS 1.5.0 Created 7 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/uan/model/uan-prop-model.h ('k') | src/woss/doc/woss.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/uan/model/uan-prop-model.cc
===================================================================
--- a/src/uan/model/uan-prop-model.cc
+++ b/src/uan/model/uan-prop-model.cc
@@ -338,6 +338,25 @@
return pdp;
}
+UanPdp
+UanPdp::NormalizeToSumNc (void)
+{
+ double sumNc = 0.0;
+ std::vector<Tap> newTaps;
+
+ for (uint32_t i = 0; i < GetNTaps (); i++)
+ {
+ sumNc += std::abs (m_taps[i].GetAmp ());
+ }
+
+ for (uint32_t i = 0; i < GetNTaps (); i++)
+ {
+ newTaps.push_back ( Tap (m_taps[i].GetDelay (), (m_taps[i].GetAmp () / sumNc)));
+ }
+
+ return UanPdp (newTaps, m_resolution);
+}
+
NS_OBJECT_ENSURE_REGISTERED (UanPropModel);
TypeId UanPropModel::GetTypeId (void)
« no previous file with comments | « src/uan/model/uan-prop-model.h ('k') | src/woss/doc/woss.h » ('j') | no next file with comments »

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b