scale is const !
parent
c57501eddd
commit
299fcf1e04
|
@ -27,12 +27,11 @@ void check_size(const string& key, const Vector & vj, const Vector & dj) {
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ************************************************************************* */
|
/* ************************************************************************* */
|
||||||
VectorConfig VectorConfig::scale(double gain) {
|
VectorConfig VectorConfig::scale(double gain) const {
|
||||||
VectorConfig scaled;
|
VectorConfig scaled;
|
||||||
string key; Vector val;
|
string key; Vector val;
|
||||||
FOREACH_PAIR(key, val, values) {
|
FOREACH_PAIR(key, val, values)
|
||||||
scaled.insert(key, gain*val);
|
scaled.insert(key, gain*val);
|
||||||
}
|
|
||||||
return scaled;
|
return scaled;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -60,7 +60,7 @@ namespace gtsam {
|
||||||
VectorConfig exmap(const VectorConfig & delta) const;
|
VectorConfig exmap(const VectorConfig & delta) const;
|
||||||
|
|
||||||
/** Scales the configuration by a gain */
|
/** Scales the configuration by a gain */
|
||||||
VectorConfig scale(double gain);
|
VectorConfig scale(double gain) const;
|
||||||
|
|
||||||
const_iterator begin() const {return values.begin();}
|
const_iterator begin() const {return values.begin();}
|
||||||
const_iterator end() const {return values.end();}
|
const_iterator end() const {return values.end();}
|
||||||
|
|
Loading…
Reference in New Issue