bindings/python/chain.cpp
author Dmitriy Morozov <dmitriy@mrzv.org>
Tue, 14 Apr 2009 14:38:08 -0700
branchdev
changeset 129 95454ea3f9c0
parent 128 a5fd0c2a1c88
child 130 580eaa850c4f
permissions -rw-r--r--
Cleaned up Python bindings to restore functionality: * StaticPersistence is iterable, its nodes are usable (sign, pair, cycle) * StaticPersistence knows how to map its nodes into Filtration indices * moved PythonCmp into utils.h * minor cosmetic changes

#include <boost/python.hpp>
#include <boost/python/iterator.hpp>

namespace bp = boost::python;

#include "chain.h"


void export_chain()
{
    bp::class_<VChain>("Chain")
        .def("__iter__",    bp::iterator<VChain>())
        .def("__len__",     &VChain::size)
    ;
}