Ejemplo n.º 1
0
        public StepSearcher(double[] pillars)
        {
            if (pillars.Length == 0)
            {
                throw new Exception("StepSearcher : pillars array should contain at least one element");
            }

            if (!EnumerableUtils.IsSorted(pillars))
            {
                throw new Exception("StepSearcher : pillars array is assumed to be sorted");
            }

            this.pillars = pillars;
        }
Ejemplo n.º 2
0
 public static T[] Constant <T>(int size, T value)
 {
     return(EnumerableUtils.For(0, size, i => value));
 }