Skip to content

Commit

Permalink
Corrections in union and inter for MATLAB compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
lebarsfa committed Oct 14, 2023
1 parent 1c90377 commit a450062
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
12 changes: 6 additions & 6 deletions python/src/core/domains/tube/codac_py_Tube.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -531,13 +531,13 @@ void export_Tube(py::module& m)

.def("__ror__", [](const Tube& y, double x) { return x|y; })
// For MATLAB compatibility.
.def("union", [](const Tube& y, double x) { return x|y; })
.def("union", [](double x, const Tube& y) { return x|y; })
.def("__ror__", [](const Tube& y, const Interval& x) { return x|y; })
// For MATLAB compatibility.
.def("union", [](const Tube& y, const Interval& x) { return x|y; })
.def("union", [](const Interval& x, const Tube& y) { return x|y; })
.def("__ror__", [](const Tube& y, const Trajectory& x) { return x|y; })
// For MATLAB compatibility.
.def("union", [](const Tube& y, const Trajectory& x) { return x|y; })
.def("union", [](const Trajectory& x, const Tube& y) { return x|y; })

.def("__and__", [](const Tube& x, const Tube& y) { return x&y; })
// For MATLAB compatibility.
Expand All @@ -554,12 +554,12 @@ void export_Tube(py::module& m)

.def("__rand__", [](const Tube& y, double x) { return x&y; })
// For MATLAB compatibility.
.def("inter", [](const Tube& y, double x) { return x&y; })
.def("inter", [](double x, const Tube& y) { return x&y; })
.def("__rand__", [](const Tube& y, const Interval& x) { return x&y; })
// For MATLAB compatibility.
.def("inter", [](const Tube& y, const Interval& x) { return x&y; })
.def("inter", [](const Interval& x, const Tube& y) { return x&y; })
.def("__rand__", [](const Tube& y, const Trajectory& x) { return x&y; })
// For MATLAB compatibility.
.def("inter", [](const Tube& y, const Trajectory& x) { return x&y; })
.def("inter", [](const Trajectory& x, const Tube& y) { return x&y; })
;
}
8 changes: 4 additions & 4 deletions python/src/core/domains/tube/codac_py_TubeVector.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -603,10 +603,10 @@ void export_TubeVector(py::module& m)

.def("__ror__", [](const TubeVector& y, const IntervalVector& x) { return x|y; })
// For MATLAB compatibility.
.def("union", [](const TubeVector& y, const IntervalVector& x) { return x|y; })
.def("union", [](const IntervalVector& x, const TubeVector& y) { return x|y; })
.def("__ror__", [](const TubeVector& y, const TrajectoryVector& x) { return x|y; })
// For MATLAB compatibility.
.def("union", [](const TubeVector& y, const TrajectoryVector& x) { return x|y; })
.def("union", [](const TrajectoryVector& x, const TubeVector& y) { return x|y; })

.def("__and__", [](const TubeVector& x, const TubeVector& y) { return x&y; })
// For MATLAB compatibility.
Expand All @@ -620,9 +620,9 @@ void export_TubeVector(py::module& m)

.def("__rand__", [](const TubeVector& y, const IntervalVector& x) { return x&y; })
// For MATLAB compatibility.
.def("inter", [](const TubeVector& y, const IntervalVector& x) { return x&y; })
.def("inter", [](const IntervalVector& x, const TubeVector& y) { return x&y; })
.def("__rand__", [](const TubeVector& y, const TrajectoryVector& x) { return x&y; })
// For MATLAB compatibility.
.def("inter", [](const TubeVector& y, const TrajectoryVector& x) { return x&y; })
.def("inter", [](const TrajectoryVector& x, const TubeVector& y) { return x&y; })
;
}

0 comments on commit a450062

Please sign in to comment.