Classes | Namespaces | Macros | Typedefs | Functions | Variables
testAlgebraicDecisionTree.cpp File Reference
#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>
Include dependency graph for testAlgebraicDecisionTree.cpp:

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< KeyADT
 

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
 

Macro Definition Documentation

◆ DISABLE_DOT

#define DISABLE_DOT

Definition at line 44 of file testAlgebraicDecisionTree.cpp.

◆ DISABLE_TIMING

#define DISABLE_TIMING

Definition at line 26 of file testAlgebraicDecisionTree.cpp.

Typedef Documentation

◆ ADT

Definition at line 36 of file testAlgebraicDecisionTree.cpp.

Function Documentation

◆ add_()

double add_ ( const double &  a,
const double &  b 
)

Definition at line 92 of file testAlgebraicDecisionTree.cpp.

◆ create()

ADT create ( const Signature signature)

Convert Signature into CPT

Definition at line 130 of file testAlgebraicDecisionTree.cpp.

◆ dot()

template<typename T >
void dot ( const T f,
const string &  filename 
)

Definition at line 47 of file testAlgebraicDecisionTree.cpp.

◆ main()

int main ( void  )

Definition at line 578 of file testAlgebraicDecisionTree.cpp.

◆ mul()

double mul ( const double &  a,
const double &  b 
)

Definition at line 88 of file testAlgebraicDecisionTree.cpp.

◆ printCounts()

void printCounts ( const string &  s)

Definition at line 80 of file testAlgebraicDecisionTree.cpp.

◆ resetCounts()

void resetCounts ( )

Definition at line 76 of file testAlgebraicDecisionTree.cpp.

◆ TEST() [1/11]

TEST ( ADT  ,
example3   
)

Definition at line 99 of file testAlgebraicDecisionTree.cpp.

◆ TEST() [2/11]

TEST ( ADT  ,
joint   
)

Definition at line 143 of file testAlgebraicDecisionTree.cpp.

◆ TEST() [3/11]

TEST ( ADT  ,
inference   
)

Definition at line 204 of file testAlgebraicDecisionTree.cpp.

◆ TEST() [4/11]

TEST ( ADT  ,
factor_graph   
)

Definition at line 270 of file testAlgebraicDecisionTree.cpp.

◆ TEST() [5/11]

TEST ( ADT  ,
equality_noparser   
)

Definition at line 401 of file testAlgebraicDecisionTree.cpp.

◆ TEST() [6/11]

TEST ( ADT  ,
equality_parser   
)

Definition at line 420 of file testAlgebraicDecisionTree.cpp.

◆ TEST() [7/11]

TEST ( ADT  ,
constructor   
)

Definition at line 437 of file testAlgebraicDecisionTree.cpp.

◆ TEST() [8/11]

TEST ( ADT  ,
conversion   
)

Definition at line 479 of file testAlgebraicDecisionTree.cpp.

◆ TEST() [9/11]

TEST ( ADT  ,
elimination   
)

Definition at line 506 of file testAlgebraicDecisionTree.cpp.

◆ TEST() [10/11]

TEST ( ADT  ,
div   
)

Definition at line 544 of file testAlgebraicDecisionTree.cpp.

◆ TEST() [11/11]

TEST ( ADT  ,
zero   
)

Definition at line 558 of file testAlgebraicDecisionTree.cpp.

Variable Documentation

◆ adds

size_t adds = 0

Definition at line 74 of file testAlgebraicDecisionTree.cpp.

◆ elapsed

double elapsed

Definition at line 75 of file testAlgebraicDecisionTree.cpp.

◆ muls

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.



gtsam
Author(s):
autogenerated on Tue Jul 4 2023 02:40:55