Skip to content

Commit

Permalink
Re-add isEmpty method for future MultiDimInter implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
Lucio Trincheri committed Dec 13, 2024
1 parent 12b5071 commit 174eaf3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
3 changes: 3 additions & 0 deletions sbg/dto/interval_dto.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ IntervalDTO::IntervalDTO(const NAT &begin, const NAT &step, const NAT &end)
{
}

// Set functions ---------------------------------------------------------------
bool IntervalDTO::isEmpty() const { return end_ < begin_; }

// Operators -------------------------------------------------------------------
std::ostream &operator<<(std::ostream &out, const IntervalDTO &i)
{
Expand Down
5 changes: 5 additions & 0 deletions sbg/dto/interval_dto.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,11 @@ struct IntervalDTO {
IntervalDTO(const NAT &x);
IntervalDTO(const NAT &begin, const NAT &step, const NAT &end);

/**
* @brief Traditional set operations.
*/
bool isEmpty() const;

private:
NAT begin_;
NAT step_;
Expand Down

0 comments on commit 174eaf3

Please sign in to comment.