Skip to content

Commit

Permalink
[py] binding for CtcCN (with file)
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonRohou committed Oct 17, 2023
1 parent c2dbb7c commit d4d4b67
Showing 1 changed file with 42 additions and 0 deletions.
42 changes: 42 additions & 0 deletions python/src/core/contractors/static/codac_py_CtcCN.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
/**
* \file
* CtcCN Python binding
* ----------------------------------------------------------------------------
* \date 2020
* \author Simon Rohou, Benoît Desrochers
* \copyright Copyright 2021 Codac Team
* \license This program is distributed under the terms of
* the GNU Lesser General Public License (LGPL).
*/

#include <pybind11/pybind11.h>
#include <pybind11/stl.h>
#include <pybind11/operators.h>
#include <pybind11/functional.h>
#include "codac_type_caster.h"

#include "codac_py_Ctc.h"
#include "codac_CtcCN.h"
// Generated file from Doxygen XML (doxygen2docstring.py):
#include "codac_py_CtcCN_docs.h"

using namespace std;
using namespace codac;
namespace py = pybind11;
using namespace pybind11::literals;


void export_CtcCN(py::module& m, py::class_<Ctc, pyCtc>& ctc)
{
py::class_<CtcCN> ctc_cn(m, "CtcCN", ctc, CTCCN_MAIN);
ctc_cn

.def(py::init<ContractorNetwork&,IntervalVectorVar&>(),
CTCCN_CTCCN_CONTRACTORNETWORK_INTERVALVECTORVAR,
"cn"_a.noconvert(), "box"_a.noconvert())

.def("contract", &CtcCN::contract,
CTCCN_VOID_CONTRACT_INTERVALVECTOR,
"x"_a.noconvert())
;
}

0 comments on commit d4d4b67

Please sign in to comment.