20 #include <boost/assign/std/vector.hpp> 32 using namespace gtsam;
41 #define DOT(x)(dot(x,#x)) 66 static inline int one() {
69 static inline int add(
const int&
a,
const int&
b) {
72 static inline int mul(
const int&
a,
const int&
b) {
82 string A(
"A"),
B(
"B"),
C(
"C");
86 x00[
A] = 0, x00[
B] = 0;
87 x01[
A] = 0, x01[
B] = 1;
88 x10[
A] = 1, x10[
B] = 0;
89 x11[
A] = 1, x11[
B] = 1;
164 x101[
A] = 1, x101[
B] = 0, x101[
C] = 1;
190 string A(
"A"),
B(
"B");
199 boost::function<bool(const int&)> op =
convert;
200 BDT f2(f1, ordering, op);
206 x00[
X] = 0, x00[
Y] = 0;
207 x01[
X] = 0, x01[
Y] = 1;
208 x10[
X] = 1, x10[
Y] = 0;
209 x11[
X] = 1, x11[
Y] = 1;
221 string A(
"A"),
B(
"B"),
C(
"C");
227 vector<DT::LabelC>
keys;
229 DT f2(keys,
"0 2 1 3");
233 DT f3(keys,
"4 6 5 7");
239 DT f5(keys,
"0 4 2 6 1 5 3 7");
static int mul(const int &a, const int &b)
Concept check for values that can be used in unit tests.
static int runAllTests(TestResult &result)
signatures for conditional densities
static enum @843 ordering
DecisionTree< L, Y > apply(const DecisionTree< L, Y > &f, const typename DecisionTree< L, Y >::Unary &op)
DecisionTree choose(const L &label, size_t index) const
double f2(const Vector2 &x)
void dot(const T &f, const string &filename)
Matrix< SCALARB, Dynamic, Dynamic > B
DecisionTree< string, int > DT
bool convert(const int &y)
#define EXPECT(condition)
Point2(* f)(const Point3 &, OptionalJacobian< 2, 3 >)
Array< double, 1, 3 > e(1./3., 0.5, 2.)
Matrix< Scalar, Dynamic, Dynamic > C
#define LONGS_EQUAL(expected, actual)
bool assert_equal(const Matrix &expected, const Matrix &actual, double tol)
static int add(const int &a, const int &b)
Point2 f1(const Point3 &p, OptionalJacobian< 2, 3 > H)
double f4(double x, double y, double z)
double f3(double x1, double x2)
DecisionTree< string, Crazy > CrazyDecisionTree
std::pair< L, size_t > LabelC
DecisionTree< Label, bool > BDT