Skip to content

Commit

Permalink
[examples] testing invert method
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonRohou committed Mar 16, 2021
1 parent 16a37e0 commit 98da275
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
3 changes: 2 additions & 1 deletion examples/basics/08_tube_paving/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@
message(STATUS "Found Codac version ${CODAC_VERSION}")

# Compilation


set(CMAKE_BUILD_TYPE Debug)
add_executable(${PROJECT_NAME} main.cpp)
target_compile_options(${PROJECT_NAME} PUBLIC ${CODAC_CXX_FLAGS})
target_include_directories(${PROJECT_NAME} SYSTEM PUBLIC ${CODAC_INCLUDE_DIRS} ${EIGEN3_INCLUDE_DIRS})
Expand Down
5 changes: 4 additions & 1 deletion examples/basics/08_tube_paving/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* ----------------------------------------------------------------------------
*
* \brief Tube paving
* \date 2021
* \author Simon Rohou
* \copyright Copyright 2021 Codac Team
Expand Down Expand Up @@ -32,7 +32,10 @@ class TemporalPaving : public Paving
const Interval& t = box()[0], &y = box()[1];

if(!x(t).intersects(y))
{
assert(!x.invert(y,t).intersects(y)); // used as a test of invert() method
return set_value(SetValue::OUT);
}

pair<Interval,Interval> p = x.eval(t);

Expand Down

0 comments on commit 98da275

Please sign in to comment.