bindings/python/dionysus.cpp
author Dmitriy Morozov <dmitriy@mrzv.org>
Fri, 06 Nov 2009 14:19:08 -0800
branchdev
changeset 173 5fd3f43e6fbf
parent 147 d39a20acb253
child 181 1ee6edc17cb6
permissions -rw-r--r--
Added arbitrary coefficients in boundaries (to C++ and Python) + cleaned up CohomologyPersistence.add overloading in Python

#include <utilities/log.h>
#include <boost/python.hpp>

namespace bp = boost::python;

void export_simplex();
void export_filtration();
void export_static_persistence();
void export_chain();
void export_birthid();
void export_zigzag_persistence();
void export_cohomology_persistence();

void export_rips();
void export_pairwise_distances();

#ifndef NO_CGAL
void export_alphashapes2d();
void export_alphashapes3d();
#endif

#ifdef LOGGING
void            enable_log(std::string s)
{
    stdoutLog.subscribeTo(RLOG_CHANNEL(s.c_str()));
}
#endif

BOOST_PYTHON_MODULE(_dionysus)
{
    export_simplex();
    export_filtration();
    export_static_persistence();
    export_chain();

    export_birthid();
    export_zigzag_persistence();
    export_cohomology_persistence();

    export_rips();
    export_pairwise_distances();

#ifndef NO_CGAL
    export_alphashapes2d();
    export_alphashapes3d();
#endif

#ifdef LOGGING
    bp::def("enable_log",           &enable_log);
#endif
};