Ejemplo n.º 1
0
 public int StepFromCount(ValueRange <int> r, int count)
 {
     return((r.End - r.Begin) / count);
 }
Ejemplo n.º 2
0
 public int GetCount(ValueRange <T> r)
 {
     return(0);
 }
Ejemplo n.º 3
0
 public ValueRangeValidness Validate(ValueRange <T> r)
 {
     return(ValueRangeValidness.NotSupported);
 }
Ejemplo n.º 4
0
 public decimal StepFromCount(ValueRange <decimal> r, int count)
 {
     return((r.End - r.Begin) / count);
 }
Ejemplo n.º 5
0
 public T StepFromCount(ValueRange <T> r, int count)
 {
     return(default(T));
 }
Ejemplo n.º 6
0
 public double StepFromCount(
     ValueRange <double> r, int count)
 {
     return((r.End - r.Begin) / count);
 }
Ejemplo n.º 7
0
 public int GetCount(ValueRange <long> r)
 {
     return((int)((r.End - r.Begin) / r.Step));
 }
Ejemplo n.º 8
0
 public long StepFromCount(ValueRange <long> r, int count)
 {
     return((r.End - r.Begin) / count);
 }
Ejemplo n.º 9
0
 public int GetCount(ValueRange <int> r)
 {
     return((r.End - r.Begin) / r.Step);
 }
Ejemplo n.º 10
0
 /// <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]);
 }