#include <gtsam/base/Testable.h>
#include <gtsam/discrete/DiscreteKey.h>
#include <gtsam/discrete/DiscreteValues.h>
#include <gtsam/discrete/AlgebraicDecisionTree.h>
#include <gtsam/discrete/DecisionTree-inl.h>
#include <CppUnitLite/TestHarness.h>
#include <gtsam/base/timing.h>
#include <gtsam/discrete/Signature.h>
Go to the source code of this file.
Classes | |
struct | gtsam::traits< ADT > |
Namespaces | |
gtsam | |
traits | |
Macros | |
#define | DISABLE_DOT |
#define | DISABLE_TIMING |
Typedefs | |
typedef AlgebraicDecisionTree< Key > | ADT |
Functions | |
double | add_ (const double &a, const double &b) |
ADT | create (const Signature &signature) |
template<typename T > | |
void | dot (const T &f, const string &filename) |
int | main () |
double | mul (const double &a, const double &b) |
void | printCounts (const string &s) |
void | resetCounts () |
TEST (ADT, example3) | |
TEST (ADT, joint) | |
TEST (ADT, inference) | |
TEST (ADT, factor_graph) | |
TEST (ADT, equality_noparser) | |
TEST (ADT, equality_parser) | |
TEST (ADT, constructor) | |
TEST (ADT, conversion) | |
TEST (ADT, elimination) | |
TEST (ADT, div) | |
TEST (ADT, zero) | |
Variables | |
size_t | adds = 0 |
double | elapsed |
size_t | muls = 0 |
#define DISABLE_DOT |
Definition at line 44 of file testAlgebraicDecisionTree.cpp.
#define DISABLE_TIMING |
Definition at line 26 of file testAlgebraicDecisionTree.cpp.
typedef AlgebraicDecisionTree<Key> ADT |
Definition at line 36 of file testAlgebraicDecisionTree.cpp.
double add_ | ( | const double & | a, |
const double & | b | ||
) |
Definition at line 92 of file testAlgebraicDecisionTree.cpp.
Convert Signature into CPT
Definition at line 130 of file testAlgebraicDecisionTree.cpp.
void dot | ( | const T & | f, |
const string & | filename | ||
) |
Definition at line 47 of file testAlgebraicDecisionTree.cpp.
int main | ( | void | ) |
Definition at line 578 of file testAlgebraicDecisionTree.cpp.
double mul | ( | const double & | a, |
const double & | b | ||
) |
Definition at line 88 of file testAlgebraicDecisionTree.cpp.
void printCounts | ( | const string & | s | ) |
Definition at line 80 of file testAlgebraicDecisionTree.cpp.
void resetCounts | ( | ) |
Definition at line 76 of file testAlgebraicDecisionTree.cpp.
TEST | ( | ADT | , |
example3 | |||
) |
Definition at line 99 of file testAlgebraicDecisionTree.cpp.
TEST | ( | ADT | , |
joint | |||
) |
Definition at line 143 of file testAlgebraicDecisionTree.cpp.
TEST | ( | ADT | , |
inference | |||
) |
Definition at line 204 of file testAlgebraicDecisionTree.cpp.
TEST | ( | ADT | , |
factor_graph | |||
) |
Definition at line 270 of file testAlgebraicDecisionTree.cpp.
TEST | ( | ADT | , |
equality_noparser | |||
) |
Definition at line 401 of file testAlgebraicDecisionTree.cpp.
TEST | ( | ADT | , |
equality_parser | |||
) |
Definition at line 420 of file testAlgebraicDecisionTree.cpp.
TEST | ( | ADT | , |
constructor | |||
) |
Definition at line 437 of file testAlgebraicDecisionTree.cpp.
TEST | ( | ADT | , |
conversion | |||
) |
Definition at line 479 of file testAlgebraicDecisionTree.cpp.
TEST | ( | ADT | , |
elimination | |||
) |
Definition at line 506 of file testAlgebraicDecisionTree.cpp.
TEST | ( | ADT | , |
div | |||
) |
Definition at line 544 of file testAlgebraicDecisionTree.cpp.
Definition at line 558 of file testAlgebraicDecisionTree.cpp.
size_t adds = 0 |
Definition at line 74 of file testAlgebraicDecisionTree.cpp.
double elapsed |
Definition at line 75 of file testAlgebraicDecisionTree.cpp.
size_t muls = 0 |
I can't get this to work ! class Mul: std::function<double(const double&, const double&)> { inline double operator()(const double& a, const double& b) { return a * b; } };
If second argument of binary op is Leaf template<typename L> typename DecisionTree<L, double>::Node::Ptr DecisionTree<L, double>::Choice::apply_fC_op_gL( Cache& cache, const Leaf& gL, Mul op) const { Ptr h(new Choice(label(), cardinality())); for(const NodePtr& branch: branches_) h->push_back(branch->apply_f_op_g(cache, gL, op)); return Unique(cache, h); }
Definition at line 74 of file testAlgebraicDecisionTree.cpp.