diff options
author | Hieu Hoang <hieuhoang@gmail.com> | 2015-11-02 17:35:16 +0300 |
---|---|---|
committer | Hieu Hoang <hieuhoang@gmail.com> | 2015-11-02 17:35:16 +0300 |
commit | 273ad667c29780aac8b79836f99e25f7654abc7e (patch) | |
tree | e46f1d0bf628cfa0ed67b2873e4977d6dda7ab24 /moses/SquareMatrix.cpp | |
parent | f38976aba07e0dbca74f9b824b28add486889b2a (diff) |
Move square matrix init into class
Diffstat (limited to 'moses/SquareMatrix.cpp')
-rw-r--r-- | moses/SquareMatrix.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/moses/SquareMatrix.cpp b/moses/SquareMatrix.cpp index 7b6e55319..ed4a644cc 100644 --- a/moses/SquareMatrix.cpp +++ b/moses/SquareMatrix.cpp @@ -30,9 +30,17 @@ using namespace std; namespace Moses { +void SquareMatrix::InitTriangle(float val) +{ + for(size_t row=0; row < m_size; row++) { + for(size_t col=row; col<m_size; col++) { + SetScore(row, col, -numeric_limits<float>::infinity()); + } + } +} /** - * Calculare future score estimate for a given coverage bitmap + * Calculate future score estimate for a given coverage bitmap * * /param bitmap coverage bitmap */ |