Example #1
0
        static TotalOrder()
        {
            var defaultBound = IntervalBound.Open(default(A)).ToOption();
            var noBound      = Option.Empty <IntervalBound <A> >();

            emptyInterval    = new Interval <A>(defaultBound, defaultBound, isEmpty: true);
            unbounedInterval = new Interval <A>(noBound, noBound, isEmpty: false);
            emptyIntervalSet = new IntervalSet <A>(Enumerable.Empty <Interval <A> >());
        }
Example #2
0
 /// <summary>
 /// Creates an unbounded interval with open upper bound.
 /// </summary>
 public Interval <A> UnboundedOpenInterval(A upperBound)
 {
     return(Interval(upperBound: IntervalBound.Open(upperBound)));
 }
Example #3
0
 /// <summary>
 /// Creates an unbounded interval with open lower bound.
 /// </summary>
 public Interval <A> OpenUnboundedInterval(A lowerBound)
 {
     return(Interval(lowerBound: IntervalBound.Open(lowerBound)));
 }
Example #4
0
 /// <summary>
 /// Creates an interval with open lower bound and closed upper bound.
 /// </summary>
 public Interval <A> OpenClosedInterval(A lowerBound, A upperBound)
 {
     return(Interval(IntervalBound.Open(lowerBound), IntervalBound.Closed(upperBound)));
 }