Fix to const &
parent
d537867981
commit
356b89a165
|
@ -46,7 +46,8 @@ namespace gtsam {
|
||||||
return optimize(solution);
|
return optimize(solution);
|
||||||
}
|
}
|
||||||
|
|
||||||
VectorValues GaussianBayesNet::optimize(VectorValues solution) const {
|
VectorValues GaussianBayesNet::optimize(const VectorValues& given) const {
|
||||||
|
VectorValues solution = given;
|
||||||
// (R*x)./sigmas = y by solving x=inv(R)*(y.*sigmas)
|
// (R*x)./sigmas = y by solving x=inv(R)*(y.*sigmas)
|
||||||
// solve each node in reverse topological sort order (parents first)
|
// solve each node in reverse topological sort order (parents first)
|
||||||
for (auto cg : boost::adaptors::reverse(*this)) {
|
for (auto cg : boost::adaptors::reverse(*this)) {
|
||||||
|
|
|
@ -113,7 +113,7 @@ namespace gtsam {
|
||||||
VectorValues optimize() const;
|
VectorValues optimize() const;
|
||||||
|
|
||||||
/// Version of optimize for incomplete BayesNet, given missing variables
|
/// Version of optimize for incomplete BayesNet, given missing variables
|
||||||
VectorValues optimize(const VectorValues given) const;
|
VectorValues optimize(const VectorValues& given) const;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sample using ancestral sampling
|
* Sample using ancestral sampling
|
||||||
|
|
Loading…
Reference in New Issue