Go to the documentation of this file.
30 template <
class CONDITIONAL>
33 std::cout << (
s.empty() ?
"" :
s +
" ") << std::endl;
34 std::cout <<
"size: " << this->
size() << std::endl;
35 for (
size_t i = 0;
i < this->
size();
i++) {
36 const auto& conditional = this->at(
i);
38 ss <<
"conditional " <<
i <<
": ";
39 if (conditional) conditional->print(
ss.str(),
formatter);
44 template <
class CONDITIONAL>
60 const auto& conditional = *it;
61 auto frontals = conditional->frontals();
62 const Key me = frontals.front();
63 auto parents = conditional->parents();
64 for (
const Key&
p : parents) {
65 os <<
" var" <<
p <<
"->var" << me <<
"\n";
74 template <
class CONDITIONAL>
78 dot(
ss, keyFormatter, writer);
83 template <
class CONDITIONAL>
88 dot(of, keyFormatter, writer);
93 template <
class CONDITIONAL>
96 for (
const auto&
gc : *
this) {
97 if (
gc) sum +=
gc->logProbability(
x);
103 template <
class CONDITIONAL>
105 return exp(-logProbability(
x));
void drawVariable(Key key, const KeyFormatter &keyFormatter, const std::optional< Vector2 > &position, std::ostream *os) const
Create a variable dot fragment.
void print(const std::string &s="BayesNet", const KeyFormatter &formatter=DefaultKeyFormatter) const override
double evaluate(const HybridValues &c) const
Point3_ position(const NavState_ &X)
void digraphPreamble(std::ostream *os) const
Write out preamble for digraph, including size.
void dot(std::ostream &os, const KeyFormatter &keyFormatter=DefaultKeyFormatter, const DotWriter &writer=DotWriter()) const
Output to graphviz format, stream version.
set noclip points set clip one set noclip two set bar set border lt lw set xdata set ydata set zdata set x2data set y2data set boxwidth set dummy x
const KeyFormatter & formatter
const EIGEN_DEVICE_FUNC ExpReturnType exp() const
ofstream os("timeSchurFactors.csv")
std::optional< Vector2 > variablePos(Key key) const
Return variable position or none.
static std::stringstream ss
std::function< std::string(Key)> KeyFormatter
Typedef for a function to format a key, i.e. to convert it to a string.
double dot(const V1 &a, const V2 &b)
const gtsam::Symbol key('X', 0)
void saveGraph(const std::string &filename, const KeyFormatter &keyFormatter=DefaultKeyFormatter, const DotWriter &writer=DotWriter()) const
output to file with graphviz format.
double logProbability(const HybridValues &x) const
std::reverse_iterator< Iterator > make_reverse_iterator(Iterator i)
static const EIGEN_DEPRECATED end_t end
std::uint64_t Key
Integer nonlinear key type.
DotWriter is a helper class for writing graphviz .dot files.
gtsam
Author(s):
autogenerated on Sun Dec 22 2024 04:11:11