示例#1
0
 protected bool GreaterOrEqualTo(IntervalPoint <T> other)
 {
     if (this.IsInfinity() || other.IsInfinity())
     {
         return(InfinityGreaterThanComparisons(other));
     }
     return(this.Point.CompareTo(other.Point) > 0 || (!this.IsOpen && !other.IsOpen && this.Point.CompareTo(other.Point) == 0));
 }
示例#2
0
 private bool InfinityLessThanComparisons(IntervalPoint <T> other)
 {
     if (!this.IsInfinity() && !other.IsInfinity())
     {
         throw new ArgumentOutOfRangeException("At least one value must be infinity");
     }
     return(!(this.IsPositiveInfinity() || other.IsNegativeInfinity()));
 }
示例#3
0
 protected bool GreaterThan(IntervalPoint <T> other)
 {
     if (this.IsInfinity() || other.IsInfinity())
     {
         return(InfinityGreaterThanComparisons(other));
     }
     return(this.Point.CompareTo(other.Point) > 0);
 }