Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/moses-smt/mosesdecoder.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHieu Hoang <hieuhoang@gmail.com>2015-11-09 16:40:31 +0300
committerHieu Hoang <hieuhoang@gmail.com>2015-11-09 16:40:31 +0300
commit32e29d6b8ad7134e514f849213be9d817033bb73 (patch)
tree3131bb045e9167fb3ad0370c9a4bd8e024fd9c10 /moses/SquareMatrix.cpp
parentd0be56f8abcb6842a37daaf696ef4e84d25db9ea (diff)
Consistent naming: m_futureScore --> m_estimatedScore
Diffstat (limited to 'moses/SquareMatrix.cpp')
-rw-r--r--moses/SquareMatrix.cpp22
1 files changed, 11 insertions, 11 deletions
diff --git a/moses/SquareMatrix.cpp b/moses/SquareMatrix.cpp
index 81b9f4b06..470ac52d2 100644
--- a/moses/SquareMatrix.cpp
+++ b/moses/SquareMatrix.cpp
@@ -45,11 +45,11 @@ void SquareMatrix::InitTriangle(float val)
* /param bitmap coverage bitmap
*/
-float SquareMatrix::CalcFutureScore( Bitmap const &bitmap ) const
+float SquareMatrix::CalcEstimatedScore( Bitmap const &bitmap ) const
{
const size_t notInGap= numeric_limits<size_t>::max();
size_t startGap = notInGap;
- float futureScore = 0.0f;
+ float estimatedScore = 0.0f;
for(size_t currPos = 0 ; currPos < bitmap.GetSize() ; currPos++) {
// start of a new gap?
if(bitmap.GetValue(currPos) == false && startGap == notInGap) {
@@ -57,16 +57,16 @@ float SquareMatrix::CalcFutureScore( Bitmap const &bitmap ) const
}
// end of a gap?
else if(bitmap.GetValue(currPos) == true && startGap != notInGap) {
- futureScore += GetScore(startGap, currPos - 1);
+ estimatedScore += GetScore(startGap, currPos - 1);
startGap = notInGap;
}
}
// coverage ending with gap?
if (startGap != notInGap) {
- futureScore += GetScore(startGap, bitmap.GetSize() - 1);
+ estimatedScore += GetScore(startGap, bitmap.GetSize() - 1);
}
- return futureScore;
+ return estimatedScore;
}
/**
@@ -84,12 +84,12 @@ float SquareMatrix::CalcFutureScore( Bitmap const &bitmap ) const
* /param endPos end of the span that is added to the coverage
*/
-float SquareMatrix::CalcFutureScore2( Bitmap const &bitmap, size_t startPos, size_t endPos ) const
+float SquareMatrix::CalcEstimatedScore( Bitmap const &bitmap, size_t startPos, size_t endPos ) const
{
const size_t notInGap= numeric_limits<size_t>::max();
- float futureScore = 0.0f;
+ float estimatedScore = 0.0f;
size_t startGap = bitmap.GetFirstGapPos();
- if (startGap == NOT_FOUND) return futureScore; // everything filled
+ if (startGap == NOT_FOUND) return estimatedScore; // everything filled
// start loop at first gap
size_t startLoop = startGap+1;
@@ -108,16 +108,16 @@ float SquareMatrix::CalcFutureScore2( Bitmap const &bitmap, size_t startPos, siz
}
// end of a gap?
else if(startGap != notInGap && (bitmap.GetValue(currPos) == true || (startPos <= currPos && currPos <= endPos))) {
- futureScore += GetScore(startGap, currPos - 1);
+ estimatedScore += GetScore(startGap, currPos - 1);
startGap = notInGap;
}
}
// coverage ending with gap?
if (lastCovered != bitmap.GetSize() - 1) {
- futureScore += GetScore(lastCovered+1, bitmap.GetSize() - 1);
+ estimatedScore += GetScore(lastCovered+1, bitmap.GetSize() - 1);
}
- return futureScore;
+ return estimatedScore;
}
TO_STRING_BODY(SquareMatrix);