27 using namespace gtsam;
46 Tree tree({{
"A", 2}}, std::vector<int>{1, 2});
48 using namespace serializationTestHelpers;
51 Tree outputObj = create<Tree>();
52 roundtrip<Tree>(
tree, outputObj);
56 Tree outputXml = create<Tree>();
57 roundtripXML<Tree>(
tree, outputXml);
61 Tree outputBinary = create<Tree>();
62 roundtripBinary<Tree>(
tree, outputBinary);
69 using namespace serializationTestHelpers;
74 EXPECT(equalsObj<DecisionTreeFactor::ADT>(
tree));
75 EXPECT(equalsXML<DecisionTreeFactor::ADT>(
tree));
76 EXPECT(equalsBinary<DecisionTreeFactor::ADT>(
tree));
79 EXPECT(equalsObj<DecisionTreeFactor>(
f));
80 EXPECT(equalsXML<DecisionTreeFactor>(
f));
81 EXPECT(equalsBinary<DecisionTreeFactor>(
f));
87 using namespace serializationTestHelpers;
92 EXPECT(equalsObj<TableFactor>(tf));
93 EXPECT(equalsXML<TableFactor>(tf));
94 EXPECT(equalsBinary<TableFactor>(tf));
100 using namespace serializationTestHelpers;
105 EXPECT(equalsObj<DiscreteConditional>(conditional));
106 EXPECT(equalsXML<DiscreteConditional>(conditional));
107 EXPECT(equalsBinary<DiscreteConditional>(conditional));
110 EXPECT(equalsObj<DiscreteDistribution>(
P));
111 EXPECT(equalsXML<DiscreteDistribution>(
P));
112 EXPECT(equalsBinary<DiscreteDistribution>(
P));