Skip to content

Commit 3edde4d

Browse files
committed
Address review comments
1 parent 3d97976 commit 3edde4d

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

gtsam/discrete/tests/testDecisionTree.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ GTSAM_CONCEPT_TESTABLE_INST(CrazyDecisionTree)
7676
/* ************************************************************************** */
7777

7878
// Create a decision stump one one variable 'a' with values 10 and 20.
79-
TEST(DecisionTree, constructor) {
79+
TEST(DecisionTree, Constructor) {
8080
DecisionTree<char, int> tree('a', 10, 20);
8181

8282
// Evaluate the tree on an assignment to the variable.
@@ -129,7 +129,7 @@ struct Ring {
129129

130130
/* ************************************************************************** */
131131
// Check that creating decision trees respects key order.
132-
TEST(DecisionTree, constructor_order) {
132+
TEST(DecisionTree, ConstructorOrder) {
133133
// Create labels
134134
string A("A"), B("B");
135135

@@ -159,7 +159,7 @@ TEST(DecisionTree, constructor_order) {
159159

160160
/* ************************************************************************** */
161161
// test DT
162-
TEST(DecisionTree, example) {
162+
TEST(DecisionTree, Example) {
163163
// Create labels
164164
string A("A"), B("B"), C("C");
165165

gtsam/discrete/tests/testDecisionTreeFactor.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ using namespace std;
2828
using namespace gtsam;
2929

3030
/* ************************************************************************* */
31-
TEST(DecisionTreeFactor, constructors_match) {
31+
TEST(DecisionTreeFactor, ConstructorsMatch) {
3232
// Declare two keys
3333
DiscreteKey X(0, 2), Y(1, 3);
3434

gtsam/inference/BayesTreeCliqueBase.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ namespace gtsam {
140140
/** Access the conditional */
141141
const sharedConditional& conditional() const { return conditional_; }
142142

143-
/// Is this the root of a Bayes tree?
143+
/// Return true if this clique is the root of a Bayes tree.
144144
inline bool isRoot() const { return parent_.expired(); }
145145

146146
/// Return the number of children.

python/gtsam/tests/test_DiscreteBayesTree.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
import gtsam
2121
from gtsam import (DiscreteBayesNet, DiscreteBayesTreeClique,
2222
DiscreteConditional, DiscreteFactorGraph,
23-
DiscreteKeys, DiscreteValues, Ordering)
23+
DiscreteValues, Ordering)
2424

2525

2626
class TestDiscreteBayesNet(GtsamTestCase):
@@ -32,7 +32,7 @@ def test_elimination(self):
3232
# Define DiscreteKey pairs.
3333
keys = [(j, 2) for j in range(15)]
3434

35-
# Create thin-tree Bayesnet.
35+
# Create thin-tree Bayes net.
3636
bayesNet = DiscreteBayesNet()
3737

3838
bayesNet.add(keys[0], [keys[8], keys[12]], "2/3 1/4 3/2 4/1")
@@ -121,7 +121,7 @@ def test_discrete_bayes_tree_lookup(self):
121121
graph.add([x2, a2, x3], table)
122122

123123
# Eliminate for MPE (maximum probable explanation).
124-
ordering = Ordering([A(2), X(3), X(1), A(1), X(2)])
124+
ordering = Ordering(keys=[A(2), X(3), X(1), A(1), X(2)])
125125
lookup = graph.eliminateMultifrontal(ordering, gtsam.EliminateForMPE)
126126

127127
# Check that the lookup table is correct

0 commit comments

Comments
 (0)