public int StepFromCount(ValueRange <int> r, int count) { return((r.End - r.Begin) / count); }
public int GetCount(ValueRange <T> r) { return(0); }
public ValueRangeValidness Validate(ValueRange <T> r) { return(ValueRangeValidness.NotSupported); }
public decimal StepFromCount(ValueRange <decimal> r, int count) { return((r.End - r.Begin) / count); }
public T StepFromCount(ValueRange <T> r, int count) { return(default(T)); }
public double StepFromCount( ValueRange <double> r, int count) { return((r.End - r.Begin) / count); }
public int GetCount(ValueRange <long> r) { return((int)((r.End - r.Begin) / r.Step)); }
public long StepFromCount(ValueRange <long> r, int count) { return((r.End - r.Begin) / count); }
public int GetCount(ValueRange <int> r) { return((r.End - r.Begin) / r.Step); }
/// <summary> /// Allocates the array with length, that needed to tabulate /// some expression in the specified argument range.</summary> /// <param name="range">Argument range.</param> /// <typeparam name="T">Array elements type.</typeparam> /// <exception cref="InvalidRangeException"> /// <paramref name="range"/> is not valid /// for iteration over it.</exception> /// <returns>Allocated one-dimensional array.</returns> public static T[] Allocate <T>(ValueRange <T> range) { return(new T[range.ValidCount]); }