示例#1
0
 public BoundedInterval(T lower, T upper, string format = "[{0},{1}]")
 {
     if (lower.CompareTo(upper) > 0)
     {
         Util.Swap(ref lower, ref upper);
     }
     this.lower  = new GreaterThanInterval <T>(lower);
     this.upper  = new LessThanInterval <T>(upper);
     this.format = format;
 }
示例#2
0
 public BoundedInterval(GreaterThanInterval <T> lower, LessThanInterval <T> upper, string format = "[{0},{1}]")
 {
     this.lower  = lower;
     this.upper  = upper;
     this.format = format;
 }