Mercurial > hg > match-vamp
changeset 78:9be9182d4321 refactors
Remove more friend-classes
author | Chris Cannam |
---|---|
date | Wed, 19 Nov 2014 14:14:52 +0000 |
parents | b9aa663a607b |
children | e8ab30f90e53 |
files | src/MatchFeatureFeeder.cpp src/Matcher.h |
diffstat | 2 files changed, 15 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/src/MatchFeatureFeeder.cpp Wed Nov 19 11:59:03 2014 +0000 +++ b/src/MatchFeatureFeeder.cpp Wed Nov 19 14:14:52 2014 +0000 @@ -66,16 +66,16 @@ feed2(); } else if (m_q2.empty()) { // ended feed1(); - } else if (m_pm1->m_frameCount < m_pm1->m_blockSize) { // fill initial block + } else if (m_pm1->getFrameCount() < m_pm1->getBlockSize()) { // fill initial block feed1(); feed2(); - } else if (m_pm1->m_runCount >= m_pm1->m_params.maxRunCount) { // slope constraints + } else if (m_pm1->isOverrunning()) { // slope constraints feed2(); - } else if (m_pm2->m_runCount >= m_pm2->m_params.maxRunCount) { + } else if (m_pm2->isOverrunning()) { feed1(); } else { switch (m_finder->getExpandDirection - (m_pm1->m_frameCount-1, m_pm2->m_frameCount-1)) { + (m_pm1->getFrameCount()-1, m_pm2->getFrameCount()-1)) { case Matcher::AdvanceThis: feed1(); break;
--- a/src/Matcher.h Wed Nov 19 11:59:03 2014 +0000 +++ b/src/Matcher.h Wed Nov 19 14:14:52 2014 +0000 @@ -102,6 +102,8 @@ */ Matcher(Parameters parameters, Matcher *p, int featureSize); + /** Destructor for Matcher. + */ ~Matcher(); /** Adds a link to the Matcher object representing the performance @@ -113,6 +115,14 @@ m_otherMatcher = p; } + int getBlockSize() { + return m_blockSize; + } + + bool isOverrunning() { + return m_runCount >= m_params.maxRunCount; + } + int getFrameCount() { return m_frameCount; } @@ -290,10 +300,6 @@ bool m_initialised; DistanceMetric m_metric; - - friend class MatchFeeder; - friend class MatchFeatureFeeder; - -}; // class Matcher +}; #endif