mirror of
https://github.com/moses-smt/mosesdecoder.git
synced 2024-10-26 19:37:58 +03:00
beautify
This commit is contained in:
parent
d9bd7dc818
commit
65d2d68bc5
@ -36,11 +36,11 @@ FactorMask::FactorMask(const vector<FactorType> &factors)
|
|||||||
bool FactorMask::IsUseable(const FactorMask &other) const
|
bool FactorMask::IsUseable(const FactorMask &other) const
|
||||||
{
|
{
|
||||||
for (size_t i = 0; i < other.size(); ++i) {
|
for (size_t i = 0; i < other.size(); ++i) {
|
||||||
if (other[i]) {
|
if (other[i]) {
|
||||||
if (!this->operator[](i) ) {
|
if (!this->operator[](i) ) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
@ -819,9 +819,9 @@ void FVector::merge(const FVector &other)
|
|||||||
// sparse
|
// sparse
|
||||||
FNVmap::const_iterator iter;
|
FNVmap::const_iterator iter;
|
||||||
for (iter = other.m_features.begin(); iter != other.m_features.end(); ++iter) {
|
for (iter = other.m_features.begin(); iter != other.m_features.end(); ++iter) {
|
||||||
const FName &otherKey = iter->first;
|
const FName &otherKey = iter->first;
|
||||||
const FValue otherVal = iter->second;
|
const FValue otherVal = iter->second;
|
||||||
m_features[otherKey] = otherVal;
|
m_features[otherKey] = otherVal;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -92,8 +92,9 @@ public:
|
|||||||
return m_filePath;
|
return m_filePath;
|
||||||
}
|
}
|
||||||
|
|
||||||
const std::vector<FeatureFunction*> &GetFeaturesToApply() const
|
const std::vector<FeatureFunction*> &GetFeaturesToApply() const {
|
||||||
{ return m_featuresToApply; }
|
return m_featuresToApply;
|
||||||
|
}
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
size_t m_tableLimit;
|
size_t m_tableLimit;
|
||||||
|
Loading…
Reference in New Issue
Block a user