Skip to content

Commit

Permalink
refactor some api in intervalValue
Browse files Browse the repository at this point in the history
  • Loading branch information
bjjwwang committed May 20, 2024
1 parent 3b0674a commit 588e958
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions svf/include/AE/Core/IntervalValue.h
Original file line number Diff line number Diff line change
Expand Up @@ -298,8 +298,10 @@ class IntervalValue
this->_ub = plus_infinity();
}

/// Check current IntervalValue is smaller than or equal to the other
/// this: [2,3], other: [1, 4], return true
/// Determines if the current IntervalValue is fully contained within another IntervalValue.
/// Example: this: [2, 3], other: [1, 4] -> returns true
/// Note: If the current interval is 'bottom', it is considered contained within any interval.
/// If the other interval is 'bottom', it cannot contain any interval.
bool containedWithin(const IntervalValue &other) const
{
if (this->isBottom())
Expand All @@ -317,8 +319,10 @@ class IntervalValue

}

/// Check current IntervalValue is greater than or equal to the other
/// this: [1,4], other: [2,3], return true
/// Determines if the current IntervalValue fully contains another IntervalValue.
/// Example: this: [1, 4], other: [2, 3] -> returns true
/// Note: If the current interval is 'bottom', it is considered to contain any interval.
/// If the other interval is 'bottom', it cannot be contained by any interval.
bool contain(const IntervalValue &other) const
{
if (this->isBottom())
Expand Down

0 comments on commit 588e958

Please sign in to comment.