Skip to content

Commit

Permalink
Add UNDEFINED_COST constant.
Browse files Browse the repository at this point in the history
  • Loading branch information
jendrikseipp committed Oct 3, 2023
1 parent 381f517 commit 1756b0a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/search/cartesian_abstractions/flaw.cc
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
using namespace std;

namespace cartesian_abstractions {
const FlawedState FlawedState::no_state = FlawedState(-1, -1u, {});
const FlawedState FlawedState::no_state = FlawedState(-1, UNDEFINED_COST, {});

bool FlawedStates::is_consistent() const {
return flawed_states_queue.size() == static_cast<int>(flawed_states.size());
Expand Down Expand Up @@ -53,7 +53,7 @@ FlawedState FlawedStates::pop_random_flawed_state_and_clear(utils::RandomNumberG
vector<StateID> conc_states = move(random_bucket->second);
clear();
assert(is_consistent());
return FlawedState(abstract_state_id, -1u, move(conc_states));
return FlawedState(abstract_state_id, UNDEFINED_COST, move(conc_states));
}

int FlawedStates::num_abstract_states() const {
Expand Down
4 changes: 2 additions & 2 deletions src/search/cartesian_abstractions/types.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@ using Loops = std::vector<int>;
using Solution = std::deque<Transition>;
using Transitions = std::vector<Transition>;

const int UNDEFINED = -1;

// Positive infinity. The name "INFINITY" is taken by an ISO C99 macro.
const int INF = std::numeric_limits<int>::max();
const int UNDEFINED = -1;
const Cost INF_COSTS = std::numeric_limits<Cost>::max();
const Cost UNDEFINED_COST = std::numeric_limits<Cost>::max() - 1;
}

#endif

0 comments on commit 1756b0a

Please sign in to comment.