bindings/python/chain.cpp
author Dmitriy Morozov <dmitriy@mrzv.org>
Thu, 09 Apr 2009 12:58:10 -0700
branchdev
changeset 120 3c830b15d694
parent 104 2cc1db3b98c6
child 126 3c3e77ac43d2
permissions -rw-r--r--
Fixed distance to diagonal calculation + added stand-alone bottleneck distance tool

#include <topology/chain.h>
#include "python-static-persistence.h"
#include <boost/python.hpp>

using namespace boost::python;

typedef     SPersistence::OrderDescriptor::Chains::Chain        VChain;


VChain::const_iterator      begin(const VChain& c)              { return c.begin(); }
VChain::const_iterator      end(const VChain& c)                { return c.end(); }

void export_chain()
{
    class_<VChain>("Chain")
        .def("__iter__",    range(&begin, &end))
    ;
}