Exemplo n.º 1
0
        // 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);
        }
Exemplo n.º 2
0
        // 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();
        }
Exemplo n.º 3
0
 /// <summary>
 ///
 /// </summary>
 /// <returns></returns>
 public IDirectedCollectionValue <KeyValuePair <K, V> > RangeAll()
 {
     return(sortedpairs.RangeAll());
 }
Exemplo n.º 4
0
 /// <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());
 }