bindings/python/chain.cpp
author Christos Mantoulidis <cmad@stanford.edu>
Mon, 13 Jul 2009 19:44:04 -0700
branchdev
changeset 151 104ea146b9bc
parent 130 580eaa850c4f
child 181 1ee6edc17cb6
permissions -rw-r--r--
Updated weighted rips libraries to make use of OOP--now WeightedRips inherits from Rips. It is possible that logging for WeightedRips does not work.

#include <boost/python.hpp>
#include <boost/python/iterator.hpp>
namespace bp = boost::python;

#include "chain.h"
namespace dp = dionysus::python;


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