Go to the documentation of this file.
32 for (
size_t i = 1;
i <
row.size();
i++)
os <<
" " <<
row[
i];
43 : key_(
key), parents_(parents) {
48 const std::string& spec)
49 : key_(
key), parents_(parents) {
64 js.push_back(
key_.first);
72 const size_t nrStates =
table_->at(0).size();
73 for (
size_t j = 0;
j < nrStates;
j++) {
75 assert(
row.size() == nrStates);
90 for (
size_t i = 0;
i <
row.size();
i++) sum +=
row[
i];
91 for (
size_t i = 0;
i <
row.size();
i++)
row[
i] /= sum;
113 if (
s.parents_.empty()) {
116 os <<
" | " <<
s.parents_[0].first;
117 for (
size_t i = 1;
i <
s.parents_.size();
i++)
118 os <<
" && " <<
s.parents_[
i].first;
121 os << (
s.spec_ ? *
s.spec_ :
"no spec") << endl;
125 os <<
"spec could not be parsed" << endl;
std::vector< double > cpt() const
const DiscreteKey & key() const
std::ostream & operator<<(std::ostream &os, const Dih6 &m)
std::optional< Table > table_
Parser for conditional distribution signatures.
Signature operator%(const DiscreteKey &key, const string &parent)
std::optional< std::string > spec_
Signature(const DiscreteKey &key, const DiscreteKeys &parents, const Table &table)
std::vector< double > Row
DiscreteKeys is a set of keys that can be assembled using the & operator.
ofstream os("timeSchurFactors.csv")
FastVector< Key > KeyVector
Define collection type once and for all - also used in wrappers.
KeyVector indices() const
static void normalize(Signature::Row &row)
const MATRIX::ConstRowXpr row(const MATRIX &A, size_t j)
signatures for conditional densities
const gtsam::Symbol key('X', 0)
Signature & operator,(const DiscreteKey &parent)
Signature operator|(const DiscreteKey &key, const DiscreteKey &parent)
std::pair< Key, size_t > DiscreteKey
Signature & operator=(const std::string &spec)
DiscreteKeys discreteKeys() const
static std::optional< Table > Parse(const std::string &str)
const std::optional< Table > & table() const
gtsam
Author(s):
autogenerated on Sat Nov 16 2024 04:04:12