Fixed dot to have right arguments
							parent
							
								
									db3cb4d9ac
								
							
						
					
					
						commit
						5c4038c7c0
					
				| 
						 | 
					@ -153,6 +153,31 @@ namespace gtsam {
 | 
				
			||||||
    return result;
 | 
					    return result;
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  /* ************************************************************************* */
 | 
				
			||||||
 | 
					  static std::string valueFormatter(const double& v) {
 | 
				
			||||||
 | 
					    return (boost::format("%4.2g") % v).str();
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  /** output to graphviz format, stream version */
 | 
				
			||||||
 | 
					  void DecisionTreeFactor::dot(std::ostream& os,
 | 
				
			||||||
 | 
					                               const KeyFormatter& keyFormatter,
 | 
				
			||||||
 | 
					                               bool showZero) const {
 | 
				
			||||||
 | 
					    Potentials::dot(os, keyFormatter, valueFormatter, showZero);
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  /** output to graphviz format, open a file */
 | 
				
			||||||
 | 
					  void DecisionTreeFactor::dot(const std::string& name,
 | 
				
			||||||
 | 
					                               const KeyFormatter& keyFormatter,
 | 
				
			||||||
 | 
					                               bool showZero) const {
 | 
				
			||||||
 | 
					    Potentials::dot(name, keyFormatter, valueFormatter, showZero);
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  /** output to graphviz format string */
 | 
				
			||||||
 | 
					  std::string DecisionTreeFactor::dot(const KeyFormatter& keyFormatter,
 | 
				
			||||||
 | 
					                                      bool showZero) const {
 | 
				
			||||||
 | 
					    return Potentials::dot(keyFormatter, valueFormatter, showZero);
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  /* ************************************************************************* */
 | 
					  /* ************************************************************************* */
 | 
				
			||||||
  std::string DecisionTreeFactor::markdown(
 | 
					  std::string DecisionTreeFactor::markdown(
 | 
				
			||||||
      const KeyFormatter& keyFormatter) const {
 | 
					      const KeyFormatter& keyFormatter) const {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -178,6 +178,20 @@ namespace gtsam {
 | 
				
			||||||
    /// @name Wrapper support
 | 
					    /// @name Wrapper support
 | 
				
			||||||
    /// @{
 | 
					    /// @{
 | 
				
			||||||
    
 | 
					    
 | 
				
			||||||
 | 
					    /** output to graphviz format, stream version */
 | 
				
			||||||
 | 
					    void dot(std::ostream& os,
 | 
				
			||||||
 | 
					             const KeyFormatter& keyFormatter = DefaultKeyFormatter,
 | 
				
			||||||
 | 
					             bool showZero = true) const;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    /** output to graphviz format, open a file */
 | 
				
			||||||
 | 
					    void dot(const std::string& name,
 | 
				
			||||||
 | 
					             const KeyFormatter& keyFormatter = DefaultKeyFormatter,
 | 
				
			||||||
 | 
					             bool showZero = true) const;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    /** output to graphviz format string */
 | 
				
			||||||
 | 
					    std::string dot(const KeyFormatter& keyFormatter = DefaultKeyFormatter,
 | 
				
			||||||
 | 
					                    bool showZero = true) const;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    /// Render as markdown table.
 | 
					    /// Render as markdown table.
 | 
				
			||||||
    std::string markdown(
 | 
					    std::string markdown(
 | 
				
			||||||
        const KeyFormatter& keyFormatter = DefaultKeyFormatter) const override;
 | 
					        const KeyFormatter& keyFormatter = DefaultKeyFormatter) const override;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -46,7 +46,9 @@ virtual class DecisionTreeFactor : gtsam::DiscreteFactor {
 | 
				
			||||||
             const gtsam::KeyFormatter& keyFormatter =
 | 
					             const gtsam::KeyFormatter& keyFormatter =
 | 
				
			||||||
                 gtsam::DefaultKeyFormatter) const;
 | 
					                 gtsam::DefaultKeyFormatter) const;
 | 
				
			||||||
  bool equals(const gtsam::DecisionTreeFactor& other, double tol = 1e-9) const;
 | 
					  bool equals(const gtsam::DecisionTreeFactor& other, double tol = 1e-9) const;
 | 
				
			||||||
  string dot(bool showZero = false) const;
 | 
					  string dot(
 | 
				
			||||||
 | 
					      const gtsam::KeyFormatter& keyFormatter = gtsam::DefaultKeyFormatter,
 | 
				
			||||||
 | 
					      bool showZero = false) const;
 | 
				
			||||||
  std::vector<std::pair<DiscreteValues, double>> enumerate() const;
 | 
					  std::vector<std::pair<DiscreteValues, double>> enumerate() const;
 | 
				
			||||||
  string markdown(const gtsam::KeyFormatter& keyFormatter =
 | 
					  string markdown(const gtsam::KeyFormatter& keyFormatter =
 | 
				
			||||||
                      gtsam::DefaultKeyFormatter) const;
 | 
					                      gtsam::DefaultKeyFormatter) const;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue