Ejemplo n.º 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> >());
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Creates an unbounded interval with open upper bound.
 /// </summary>
 public Interval <A> UnboundedOpenInterval(A upperBound)
 {
     return(Interval(upperBound: IntervalBound.Open(upperBound)));
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Creates an unbounded interval with open lower bound.
 /// </summary>
 public Interval <A> OpenUnboundedInterval(A lowerBound)
 {
     return(Interval(lowerBound: IntervalBound.Open(lowerBound)));
 }
Ejemplo n.º 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)));
 }