solve is now const
parent
4911fbd6ff
commit
af6d98253f
|
@ -335,6 +335,14 @@
|
|||
<useDefaultCommand>true</useDefaultCommand>
|
||||
<runAllBuilders>true</runAllBuilders>
|
||||
</target>
|
||||
<target name="testConditionalGaussian.run" path="cpp" targetID="org.eclipse.cdt.build.MakeTargetBuilder">
|
||||
<buildCommand>make</buildCommand>
|
||||
<buildArguments></buildArguments>
|
||||
<buildTarget>testConditionalGaussian.run</buildTarget>
|
||||
<stopOnError>true</stopOnError>
|
||||
<useDefaultCommand>true</useDefaultCommand>
|
||||
<runAllBuilders>true</runAllBuilders>
|
||||
</target>
|
||||
<target name="install" path="" targetID="org.eclipse.cdt.build.MakeTargetBuilder">
|
||||
<buildCommand>make</buildCommand>
|
||||
<buildArguments></buildArguments>
|
||||
|
|
|
@ -54,18 +54,16 @@ void ConditionalGaussian::print(const string &s) const
|
|||
}
|
||||
|
||||
/* ************************************************************************* */
|
||||
Vector ConditionalGaussian::solve(const FGConfig& x)
|
||||
{
|
||||
Vector rhs = d_;
|
||||
for(map<string, Matrix>::const_iterator it = parents_.begin() ; it != parents_.end() ; it++ ) {
|
||||
const string& j = it->first;
|
||||
const Matrix& Aj = it->second;
|
||||
rhs -= Aj*x[j];
|
||||
|
||||
}
|
||||
Vector result = backsubstitution(R_, rhs);
|
||||
return result;
|
||||
|
||||
Vector ConditionalGaussian::solve(const FGConfig& x) const {
|
||||
Vector rhs = d_;
|
||||
for (map<string, Matrix>::const_iterator it = parents_.begin(); it
|
||||
!= parents_.end(); it++) {
|
||||
const string& j = it->first;
|
||||
const Matrix& Aj = it->second;
|
||||
rhs -= Aj * x[j];
|
||||
}
|
||||
Vector result = backsubstitution(R_, rhs);
|
||||
return result;
|
||||
}
|
||||
|
||||
/* ************************************************************************* */
|
||||
|
|
|
@ -107,7 +107,7 @@ namespace gtsam {
|
|||
* @param x configuration in which the parents values (y,z,...) are known
|
||||
* @return solution x = R \ (d - Sy - Tz - ...)
|
||||
*/
|
||||
Vector solve(const FGConfig& x);
|
||||
Vector solve(const FGConfig& x) const;
|
||||
|
||||
/**
|
||||
* adds a parent
|
||||
|
|
Loading…
Reference in New Issue