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:
Diffstat (limited to 'mert/MiraWeightVector.cpp')
-rw-r--r--mert/MiraWeightVector.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/mert/MiraWeightVector.cpp b/mert/MiraWeightVector.cpp
index c8a1ca774..eba9617c8 100644
--- a/mert/MiraWeightVector.cpp
+++ b/mert/MiraWeightVector.cpp
@@ -93,7 +93,8 @@ void MiraWeightVector::update(size_t index, ValType delta)
m_lastUpdated[index] = m_numUpdates;
}
-void MiraWeightVector::ToSparse(SparseVector* sparse) const {
+void MiraWeightVector::ToSparse(SparseVector* sparse) const
+{
for (size_t i = 0; i < m_weights.size(); ++i) {
if(abs(m_weights[i])>1e-8) {
sparse->set(i,m_weights[i]);
@@ -171,7 +172,8 @@ size_t AvgWeightVector::size() const
return m_wv.m_weights.size();
}
-void AvgWeightVector::ToSparse(SparseVector* sparse) const {
+void AvgWeightVector::ToSparse(SparseVector* sparse) const
+{
for (size_t i = 0; i < size(); ++i) {
ValType w = weight(i);
if(abs(w)>1e-8) {