Skip to content
Commit b478b2c5 authored by Christoph Schwering's avatar Christoph Schwering
Browse files

Literal::Set considers sign 2nd prio in comparator; ranges for loops.

* Atom, Literal comparators now use lexicographic comparators instead
  of std::tie.
* The sign of a literal is now second priority; before, it was fourth
  (and last). This allows to iterate over all predicates with given
  symbol and sign, which is a common usecase for subsumption test and
  resolution. Before, we iterated over all predicates of the given
  predicate symbol and skipped the loop statement for the unwanted
  signed ones.
* Added a range() method to Literal::Set which allows a compact way to
  iterate over all predicates with given sign and predicate like
  for (const Literal& ll : ls.range(l.sign(), l.pred()) { ... }
  (Why is there no such thing for std::set::equal_range(), by the way?)
parent 85274e64
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment