-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c2dbb7c
commit d4d4b67
Showing
1 changed file
with
42 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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()) | ||
; | ||
} |