-
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.
[ctc] added CtcEmpty and CtcIdentity + binding.
- Loading branch information
1 parent
255d94b
commit 60a397e
Showing
10 changed files
with
173 additions
and
1 deletion.
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
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
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,35 @@ | ||
/** | ||
* Codac binding (core) | ||
* ---------------------------------------------------------------------------- | ||
* \date 2024 | ||
* \author Simon Rohou | ||
* \copyright Copyright 2024 Codac Team | ||
* \license GNU Lesser General Public License (LGPL) | ||
*/ | ||
|
||
#include <pybind11/pybind11.h> | ||
#include <pybind11/operators.h> | ||
#include <pybind11/stl.h> | ||
#include <codac2_CtcEmpty.h> | ||
#include "codac2_py_Ctc.h" | ||
#include "codac2_py_CtcEmpty_docs.h" // Generated file from Doxygen XML (doxygen2docstring.py): | ||
|
||
using namespace std; | ||
using namespace codac2; | ||
namespace py = pybind11; | ||
using namespace pybind11::literals; | ||
|
||
void export_CtcEmpty(py::module& m, py::class_<CtcBase<IntervalVector>,pyCtcIntervalVector>& pyctc) | ||
{ | ||
py::class_<CtcEmpty> exported(m, "CtcEmpty", pyctc, CTCEMPTY_MAIN); | ||
exported | ||
|
||
.def(py::init<size_t>(), | ||
CTCEMPTY_CTCEMPTY_SIZET | ||
"n"_a) | ||
|
||
.def(CONTRACT_BOX_METHOD(CtcEmpty, | ||
VOID_CTCEMPTY_CONTRACT_INTERVALVECTOR_REF_CONST)) | ||
|
||
; | ||
} |
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,35 @@ | ||
/** | ||
* Codac binding (core) | ||
* ---------------------------------------------------------------------------- | ||
* \date 2024 | ||
* \author Simon Rohou | ||
* \copyright Copyright 2024 Codac Team | ||
* \license GNU Lesser General Public License (LGPL) | ||
*/ | ||
|
||
#include <pybind11/pybind11.h> | ||
#include <pybind11/operators.h> | ||
#include <pybind11/stl.h> | ||
#include <codac2_CtcIdentity.h> | ||
#include "codac2_py_Ctc.h" | ||
#include "codac2_py_CtcIdentity_docs.h" // Generated file from Doxygen XML (doxygen2docstring.py): | ||
|
||
using namespace std; | ||
using namespace codac2; | ||
namespace py = pybind11; | ||
using namespace pybind11::literals; | ||
|
||
void export_CtcIdentity(py::module& m, py::class_<CtcBase<IntervalVector>,pyCtcIntervalVector>& pyctc) | ||
{ | ||
py::class_<CtcIdentity> exported(m, "CtcIdentity", pyctc, CTCIDENTITY_MAIN); | ||
exported | ||
|
||
.def(py::init<size_t>(), | ||
CTCIDENTITY_CTCIDENTITY_SIZET | ||
"n"_a) | ||
|
||
.def(CONTRACT_BOX_METHOD(CtcIdentity, | ||
VOID_CTCIDENTITY_CONTRACT_INTERVALVECTOR_REF_CONST)) | ||
|
||
; | ||
} |
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
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,22 @@ | ||
/** | ||
* codac2_CtcEmpty.cp | ||
* ---------------------------------------------------------------------------- | ||
* \date 2024 | ||
* \author Simon Rohou | ||
* \copyright Copyright 2024 Codac Team | ||
* \license GNU Lesser General Public License (LGPL) | ||
*/ | ||
|
||
#include "codac2_CtcEmpty.h" | ||
|
||
using namespace std; | ||
using namespace codac2; | ||
|
||
CtcEmpty::CtcEmpty(size_t n) | ||
: Ctc<CtcEmpty,IntervalVector>(n) | ||
{ } | ||
|
||
void CtcEmpty::contract(IntervalVector& x) const | ||
{ | ||
x.set_empty(); | ||
} |
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,25 @@ | ||
/** | ||
* \file codac2_CtcEmpty.h | ||
* ---------------------------------------------------------------------------- | ||
* \date 2024 | ||
* \author Simon Rohou | ||
* \copyright Copyright 2024 Codac Team | ||
* \license GNU Lesser General Public License (LGPL) | ||
*/ | ||
|
||
#pragma once | ||
|
||
#include "codac2_CtcWrapper.h" | ||
#include "codac2_IntervalVector.h" | ||
|
||
namespace codac2 | ||
{ | ||
class CtcEmpty : public Ctc<CtcEmpty,IntervalVector> | ||
{ | ||
public: | ||
|
||
CtcEmpty(size_t n); | ||
|
||
void contract(IntervalVector& x) const; | ||
}; | ||
} |
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
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,20 @@ | ||
/** | ||
* codac2_CtcIdentity.cp | ||
* ---------------------------------------------------------------------------- | ||
* \date 2024 | ||
* \author Simon Rohou | ||
* \copyright Copyright 2024 Codac Team | ||
* \license GNU Lesser General Public License (LGPL) | ||
*/ | ||
|
||
#include "codac2_CtcIdentity.h" | ||
|
||
using namespace std; | ||
using namespace codac2; | ||
|
||
CtcIdentity::CtcIdentity(size_t n) | ||
: Ctc<CtcIdentity,IntervalVector>(n) | ||
{ } | ||
|
||
void CtcIdentity::contract(IntervalVector& x) const | ||
{ } |
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,25 @@ | ||
/** | ||
* \file codac2_CtcIdentity.h | ||
* ---------------------------------------------------------------------------- | ||
* \date 2024 | ||
* \author Simon Rohou | ||
* \copyright Copyright 2024 Codac Team | ||
* \license GNU Lesser General Public License (LGPL) | ||
*/ | ||
|
||
#pragma once | ||
|
||
#include "codac2_CtcWrapper.h" | ||
#include "codac2_IntervalVector.h" | ||
|
||
namespace codac2 | ||
{ | ||
class CtcIdentity : public Ctc<CtcIdentity,IntervalVector> | ||
{ | ||
public: | ||
|
||
CtcIdentity(size_t n); | ||
|
||
void contract(IntervalVector& x) const; | ||
}; | ||
} |