Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Streamlined dot methods #971

Merged
merged 11 commits into from
Dec 21, 2021
Merged

Streamlined dot methods #971

merged 11 commits into from
Dec 21, 2021

Conversation

dellaert
Copy link
Member

Driven by tests in discrete and nonlinear, and two notebooks, I refactored dot methods:

inference

  • added dot/dot/saveGraph pattern in factor graph, bayes net, bayes tree
  • added DotWriter class

discrete

  • added dot for DecisionTree and DiscreteConditional
  • added tests for dot functionality
  • added two notebooks that "show" the graphs

nonlinear

  • inherit methods from inference
  • extra dot/dot/saveGraph in NonlinearFactorGraph
  • deprecated saveGraph(ostream) method
  • moved GraphvizFormatting separate file
  • inherit GraphvizFormatting from DotWriter
  • added tests for dot functionality

TODO: Gaussian still needs to conform. It's a bit tricky as GaussianBayesNet has to be made a derived class of BayesNet (again?)

Example output from DiscreteSwitching.ipynb:
bn.svg.pdf
fg.svg.pdf
bt.svg.pdf

@dellaert dellaert self-assigned this Dec 20, 2021
Copy link
Collaborator

@varunagrawal varunagrawal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is great stuff! I have a few comments, but they can be addressed now or later. 🙂

gtsam/discrete/DecisionTree-inl.h Show resolved Hide resolved
gtsam/inference/BayesTree-inst.h Show resolved Hide resolved
@dellaert dellaert merged commit 168a67d into develop Dec 21, 2021
@dellaert dellaert deleted the feature/notebook_dot branch December 21, 2021 03:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants