Added code to expose the persistence_diagram class, the bottleneck_distance function and the point class to python.
Most of the commonly used methods for each class have been exported.
The constructor for point now requires that a data argument be provided along with x and y coord. This needs to be made optional.
The constructor for persistence_diagram could possibly be rewritten as well.
#include <boost/python.hpp>
namespace bp = boost::python;
#include "distances.h"
namespace dp = dionysus::python;
boost::shared_ptr<dp::ListPointPairwiseDistances> init_from_list(bp::list lst)
{
boost::shared_ptr<dp::ListPointPairwiseDistances> p(new dp::ListPointPairwiseDistances(lst));
return p;
}
void export_pairwise_distances()
{
bp::class_<dp::ListPointPairwiseDistances>("PairwiseDistances", bp::no_init)
.def("__init__", bp::make_constructor(&init_from_list))
.def("__len__", &dp::ListPointPairwiseDistances::size)
.def("__call__", &dp::ListPointPairwiseDistances::operator())
;
}