// Iterate over [...x2] public static void IterBeginInc <T>(ISorted <T> coll, T x2) where T : IComparable <T> { var x2HasSucc = Successor(coll, x2, out var x2Succ); IDirectedEnumerable <T> range = x2HasSucc ? coll.RangeTo(x2Succ) : coll.RangeAll(); Print(range); }
// Iterate over [...x2] public static void IterBeginInc <T>(ISorted <T> coll, T x2) where T : IComparable <T> { bool x2HasSucc = Successor(coll, x2, out T x2Succ); IDirectedEnumerable <T> range = x2HasSucc ? coll.RangeTo(x2Succ) : coll.RangeAll(); foreach (T x in range) { Console.Write("{0} ", x); } Console.WriteLine(); }
/// <summary> /// /// </summary> /// <returns></returns> public IDirectedCollectionValue <KeyValuePair <K, V> > RangeAll() { return(sortedpairs.RangeAll()); }
/// <summary> /// Get the specified range from the wrapped collection. /// (The current implementation erroneously does not wrap the result.) /// </summary> /// <returns></returns> public IDirectedCollectionValue <T> RangeAll() { return(sorted.RangeAll()); }