Skip to content
Snippets Groups Projects
Commit f281bf48 authored by Studer Gabriel's avatar Studer Gabriel
Browse files

export extension scheme

parent fa310159
No related branches found
No related tags found
No related merge requests found
......@@ -3,6 +3,7 @@ wrap_modelling.cc
export_model.cc
export_gap.cc
export_gap_extender.cc
export_extension_scheme.cc
)
set(MODELLING_PYMOD
......
#include <boost/python.hpp>
#include <boost/python/suite/indexing/vector_indexing_suite.hpp>
#include <promod3/modelling/extension_scheme.hh>
using namespace boost::python;
using namespace promod3::modelling;
namespace{
boost::python::tuple WrapShiftExtend(ShiftExtension& ext){
std::pair<int,int> e = ext.Extend();
boost::python::tuple tuple_e = boost::python::make_tuple(e.first,
e.second);
return tuple_e;
}
}
void export_extension_scheme()
{
class_<ShiftExtension>("ShiftExtension", init<int,int>())
.def("Extend", &WrapShiftExtend)
;
}
......@@ -3,10 +3,13 @@
void export_gap();
void export_model();
void export_gap_extender();
void export_extension_scheme();
BOOST_PYTHON_MODULE(_modelling)
{
export_gap();
export_model();
export_gap_extender();
export_extension_scheme();
}
......@@ -15,7 +15,7 @@ std::pair<int,int> ShiftExtension::Extend(){
current_n_ = start_n_ - current_extension_;
}
else{
//we shift towards n_ter
//we shift towards c_ter
++current_n_;
++current_c_;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment