Skip to content

Commit

Permalink
Distinguish writer from formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
dellaert committed Jan 27, 2022
1 parent 828abe2 commit 34e9299
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions gtsam/nonlinear/nonlinear.i
Original file line number Diff line number Diff line change
Expand Up @@ -98,11 +98,11 @@ class NonlinearFactorGraph {
string dot(
const gtsam::Values& values,
const gtsam::KeyFormatter& keyFormatter = gtsam::DefaultKeyFormatter,
const GraphvizFormatting& writer = GraphvizFormatting());
const GraphvizFormatting& formatting = GraphvizFormatting());
void saveGraph(
const string& s, const gtsam::Values& values,
const gtsam::KeyFormatter& keyFormatter = gtsam::DefaultKeyFormatter,
const GraphvizFormatting& writer = GraphvizFormatting()) const;
const GraphvizFormatting& formatting = GraphvizFormatting()) const;

// enabling serialization functionality
void serialize() const;
Expand Down
6 changes: 3 additions & 3 deletions python/gtsam/tests/test_GraphvizFormatting.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ def test_swapped_axes(self):
graphviz_formatting.paperHorizontalAxis = gtsam.GraphvizFormatting.Axis.X
graphviz_formatting.paperVerticalAxis = gtsam.GraphvizFormatting.Axis.Y
self.assertEqual(self.graph.dot(self.values,
writer=graphviz_formatting),
formatting=graphviz_formatting),
textwrap.dedent(expected_result))

def test_factor_points(self):
Expand All @@ -100,7 +100,7 @@ def test_factor_points(self):
graphviz_formatting.plotFactorPoints = False

self.assertEqual(self.graph.dot(self.values,
writer=graphviz_formatting),
formatting=graphviz_formatting),
textwrap.dedent(expected_result))

def test_width_height(self):
Expand All @@ -127,7 +127,7 @@ def test_width_height(self):
graphviz_formatting.figureHeightInches = 10

self.assertEqual(self.graph.dot(self.values,
writer=graphviz_formatting),
formatting=graphviz_formatting),
textwrap.dedent(expected_result))


Expand Down

0 comments on commit 34e9299

Please sign in to comment.