File dump_graph.h

namespace sym

Functions

template<typename Scalar>
void DumpGraph(const std::string &name, const std::vector<Key> &keys, const std::vector<Factor<Scalar>> &factors, std::ostream &out)

Write the factor graph in .dot format to the given stream

The factor graph is represented as keys and factors. For example, these can be obtained from an Optimizer as optimizer.Keys() and optimizer.Factors().

Parameters:
  • name[in] The name of the graph (e.g. optimizer.GetName())

  • keys[in] The keys in the graph (e.g. optimizer.Keys())

  • factors[in] The factors in the graph (e.g. optimizer.Factors())

  • out[out] The stream to write the graph to

template void DumpGraph (const std::string &name, const std::vector< Key > &keys, const std::vector< Factor< double >> &factors, std::ostream &out)
template void DumpGraph (const std::string &name, const std::vector< Key > &keys, const std::vector< Factor< float >> &factors, std::ostream &out)