diff --git a/gtsam/discrete/tests/testDecisionTree.cpp b/gtsam/discrete/tests/testDecisionTree.cpp index fbcecb5ab..8876cc437 100644 --- a/gtsam/discrete/tests/testDecisionTree.cpp +++ b/gtsam/discrete/tests/testDecisionTree.cpp @@ -76,7 +76,7 @@ GTSAM_CONCEPT_TESTABLE_INST(CrazyDecisionTree) /* ************************************************************************** */ // Create a decision stump one one variable 'a' with values 10 and 20. -TEST(DecisionTree, constructor) { +TEST(DecisionTree, Constructor) { DecisionTree tree('a', 10, 20); // Evaluate the tree on an assignment to the variable. @@ -129,7 +129,7 @@ struct Ring { /* ************************************************************************** */ // Check that creating decision trees respects key order. -TEST(DecisionTree, constructor_order) { +TEST(DecisionTree, ConstructorOrder) { // Create labels string A("A"), B("B"); @@ -159,7 +159,7 @@ TEST(DecisionTree, constructor_order) { /* ************************************************************************** */ // test DT -TEST(DecisionTree, example) { +TEST(DecisionTree, Example) { // Create labels string A("A"), B("B"), C("C"); diff --git a/gtsam/discrete/tests/testDecisionTreeFactor.cpp b/gtsam/discrete/tests/testDecisionTreeFactor.cpp index 8e203c56a..4b86fcbe3 100644 --- a/gtsam/discrete/tests/testDecisionTreeFactor.cpp +++ b/gtsam/discrete/tests/testDecisionTreeFactor.cpp @@ -28,7 +28,7 @@ using namespace std; using namespace gtsam; /* ************************************************************************* */ -TEST(DecisionTreeFactor, constructors_match) { +TEST(DecisionTreeFactor, ConstructorsMatch) { // Declare two keys DiscreteKey X(0, 2), Y(1, 3); diff --git a/gtsam/inference/BayesTreeCliqueBase.h b/gtsam/inference/BayesTreeCliqueBase.h index c60d6a8c8..0881be1a2 100644 --- a/gtsam/inference/BayesTreeCliqueBase.h +++ b/gtsam/inference/BayesTreeCliqueBase.h @@ -140,7 +140,7 @@ namespace gtsam { /** Access the conditional */ const sharedConditional& conditional() const { return conditional_; } - /// Is this the root of a Bayes tree? + /// Return true if this clique is the root of a Bayes tree. inline bool isRoot() const { return parent_.expired(); } /// Return the number of children. diff --git a/python/gtsam/tests/test_DiscreteBayesTree.py b/python/gtsam/tests/test_DiscreteBayesTree.py index 09fb5a865..c8a93e63b 100644 --- a/python/gtsam/tests/test_DiscreteBayesTree.py +++ b/python/gtsam/tests/test_DiscreteBayesTree.py @@ -20,7 +20,7 @@ from gtsam.utils.test_case import GtsamTestCase import gtsam from gtsam import (DiscreteBayesNet, DiscreteBayesTreeClique, DiscreteConditional, DiscreteFactorGraph, - DiscreteKeys, DiscreteValues, Ordering) + DiscreteValues, Ordering) class TestDiscreteBayesNet(GtsamTestCase): @@ -32,7 +32,7 @@ class TestDiscreteBayesNet(GtsamTestCase): # Define DiscreteKey pairs. keys = [(j, 2) for j in range(15)] - # Create thin-tree Bayesnet. + # Create thin-tree Bayes net. bayesNet = DiscreteBayesNet() bayesNet.add(keys[0], [keys[8], keys[12]], "2/3 1/4 3/2 4/1") @@ -121,7 +121,7 @@ class TestDiscreteBayesNet(GtsamTestCase): graph.add([x2, a2, x3], table) # Eliminate for MPE (maximum probable explanation). - ordering = Ordering([A(2), X(3), X(1), A(1), X(2)]) + ordering = Ordering(keys=[A(2), X(3), X(1), A(1), X(2)]) lookup = graph.eliminateMultifrontal(ordering, gtsam.EliminateForMPE) # Check that the lookup table is correct