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