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; }
public static T[] Constant <T>(int size, T value) { return(EnumerableUtils.For(0, size, i => value)); }