RangeNotation

public static class RangeNotation
Utility methods for creating numeric ranges.

Methods

CreateRange

#
public static NumericRange CreateRange(BigInteger from, BigInteger to)
Create a range of numbers.
from (BigInteger)First number in range.
to (BigInteger)Last number in range.
Range of values.

CreateRange

#
public static NumericRange CreateRange(double from, double to)
Create a range of numbers.
from (double)First number in range.
to (double)Last number in range.
Range of values.

CreateRange

#
public static NumericRange CreateRange(int from, int to)
Create a range of numbers.
from (int)First number in range.
to (int)Last number in range.
Range of values. Either an array of 32-bit integers, or an array of BigIntegers.

CreateRanges

#
public static NumericRange[] CreateRanges(BigInteger[] from, BigInteger[] to)
Create several ranges of numbers.
from (BigInteger[])Range start values.
to (BigInteger[])Range end values.
Ranges of values.

CreateRanges

#
public static NumericRange[] CreateRanges(double[] from, double[] to)
Create several ranges of numbers.
from (double[])Range start values.
to (double[])Range end values.
Ranges of values.

CreateRanges

#
public static NumericRange[] CreateRanges(int[] from, int[] to)
Create several ranges of numbers.
from (int[])Range start values.
to (int[])Range end values.
Ranges of values.

CreateRangesWithApproximateStepSize

#
public static NumericRange[] CreateRangesWithApproximateStepSize(double[] from, double[] to, double[] approximateStepSize)
Create several ranges of numbers.
from (double[])Range start values.
to (double[])Range end values.
approximateStepSize (double[])Approximate step sizes. Will be automatically negated if required.
Ranges of values.

CreateRangesWithStepCount

#
public static NumericRange[] CreateRangesWithStepCount(BigInteger[] from, BigInteger[] to, int[] stepCount)
Create several ranges of numbers.
from (BigInteger[])Range start values.
to (BigInteger[])Range end values.
stepCount (int[])Number of steps per range.
Ranges of values.

CreateRangesWithStepCount

#
public static NumericRange[] CreateRangesWithStepCount(BigInteger[] from, int[] stepCount)
Create several ranges of numbers.
from (BigInteger[])Range start values.
stepCount (int[])Number of steps per range.
Ranges of values.

CreateRangesWithStepCount

#
public static NumericRange[] CreateRangesWithStepCount(double[] from, double[] to, int[] stepCount)
Create several ranges of numbers.
from (double[])Range start values.
to (double[])Range end values.
stepCount (int[])Number of steps per range.
Ranges of values.

CreateRangesWithStepCount

#
public static NumericRange[] CreateRangesWithStepCount(double[] from, int[] stepCount)
Create several ranges of numbers.
from (double[])Range start values.
stepCount (int[])Number of steps per range.
Ranges of values.

CreateRangesWithStepCount

#
public static NumericRange[] CreateRangesWithStepCount(int[] from, int[] stepCount)
Create several ranges of numbers.
from (int[])Range start values.
stepCount (int[])Number of steps per range.
Ranges of values.

CreateRangesWithStepCount

#
public static NumericRange[] CreateRangesWithStepCount(int[] from, int[] to, int[] stepCount)
Create several ranges of numbers.
from (int[])Range start values.
to (int[])Range end values.
stepCount (int[])Number of steps per range.
Ranges of values.

CreateRangesWithStepCountAndStepSize

#
public static NumericRange[] CreateRangesWithStepCountAndStepSize(BigInteger[] from, int[] count, BigInteger[] stepSize)
Create several ranges of numbers.
from (BigInteger[])Range start values.
count (int[])Range end values.
stepSize (BigInteger[])Number of steps per range.
Ranges of values.

CreateRangesWithStepCountAndStepSize

#
public static NumericRange[] CreateRangesWithStepCountAndStepSize(double[] from, int[] count, double[] stepSize)
Create several ranges of numbers.
from (double[])Range start values.
count (int[])Range end values.
stepSize (double[])Number of steps per range.
Ranges of values.

CreateRangesWithStepCountAndStepSize

#
public static NumericRange[] CreateRangesWithStepCountAndStepSize(int[] from, int[] count, int[] stepSize)
Create several ranges of numbers.
from (int[])Range start values.
count (int[])Range end values.
stepSize (int[])Number of steps per range.
Ranges of values.

CreateRangesWithStepSize

#
public static NumericRange[] CreateRangesWithStepSize(BigInteger[] from, BigInteger[] to, BigInteger[] stepSize)
Create several ranges of numbers.
from (BigInteger[])Range start values.
to (BigInteger[])Range end values.
stepSize (BigInteger[])Step sizes for ranges.
Ranges of values.

CreateRangesWithStepSize

#
public static NumericRange[] CreateRangesWithStepSize(double[] from, double[] to, double[] stepSize)
Create several ranges of numbers.
from (double[])Range start values.
to (double[])Range end values.
stepSize (double[])Step sizes for ranges.
Ranges of values.

CreateRangesWithStepSize

#
public static NumericRange[] CreateRangesWithStepSize(int[] from, int[] to, int[] stepSize)
Create several ranges of numbers.
from (int[])Range start values.
to (int[])Range end values.
stepSize (int[])Step sizes for ranges.
Ranges of values.

CreateRangeWithApproximateStepSize

#
public static NumericRange CreateRangeWithApproximateStepSize(double from, double to, double approximateStepSize)
Create a range of numbers. The range is guaranteed to include the first and last value.
from (double)First number in range.
to (double)Last number in range.
approximateStepSize (double)Approximate step size. Will be automatically negated if required.
Range of values.

CreateRangeWithStepCount

#
public static NumericRange CreateRangeWithStepCount(BigInteger from, BigInteger to, int stepCount)
Create a range of numbers.
from (BigInteger)First number in range.
to (BigInteger)Last number in range.
stepCount (int)Number of steps to take.
Range of values.

CreateRangeWithStepCount

#
public static NumericRange CreateRangeWithStepCount(BigInteger from, int stepCount)
Create a range of numbers.
from (BigInteger)First number in range.
stepCount (int)Number of steps to take.
Range of values.

CreateRangeWithStepCount

#
public static NumericRange CreateRangeWithStepCount(double from, double to, int stepCount)
Create a range of numbers.
from (double)First number in range.
to (double)Last number in range.
stepCount (int)Number of steps to take.
Range of values.

CreateRangeWithStepCount

#
public static NumericRange CreateRangeWithStepCount(double from, int stepCount)
Create a range of numbers.
from (double)First number in range.
stepCount (int)Number of steps to take.
Range of values.

CreateRangeWithStepCount

#
public static NumericRange CreateRangeWithStepCount(int from, int stepCount)
Create a range of numbers.
from (int)First number in range.
stepCount (int)Number of steps to take.
Range of values. Either an array of 32-bit integers, or an array of BigIntegers.

CreateRangeWithStepCount

#
public static NumericRange CreateRangeWithStepCount(int from, int to, int stepCount)
Create a range of numbers.
from (int)First number in range.
to (int)Last number in range.
stepCount (int)Number of steps to take.
Range of values.

CreateRangeWithStepCountAndStepSize

#
public static NumericRange CreateRangeWithStepCountAndStepSize(BigInteger from, int stepCount, BigInteger stepSize)
Create a range of numbers.
from (BigInteger)First number in range.
stepCount (int)Number of steps to take. The range holds one value more than this, since it starts at from.
stepSize (BigInteger)Size of each step.
Range of values.

CreateRangeWithStepCountAndStepSize

#
public static NumericRange CreateRangeWithStepCountAndStepSize(double from, int stepCount, double stepSize)
Create a range of numbers.
from (double)First number in range.
stepCount (int)Number of steps to take. The range holds one value more than this, since it starts at from.
stepSize (double)Size of each step.
Range of values.

CreateRangeWithStepCountAndStepSize

#
public static NumericRange CreateRangeWithStepCountAndStepSize(int from, int stepCount, int stepSize)
Create a range of numbers.
from (int)First number in range.
stepCount (int)Number of steps to take. The range holds one value more than this, since it starts at from.
stepSize (int)Size of each step.
Range of values. Either an array of 32-bit integers, or an array of BigIntegers.

CreateRangeWithStepSize

#
public static NumericRange CreateRangeWithStepSize(BigInteger from, BigInteger to, BigInteger stepSize)
Create a range of numbers.
from (BigInteger)First number in range.
to (BigInteger)Last number in range.
stepSize (BigInteger)Step size. Will be automatically negated if required.
Range of values.

CreateRangeWithStepSize

#
public static NumericRange CreateRangeWithStepSize(double from, double to, double stepSize)
Create a range of numbers.
from (double)First number in range.
to (double)Last number in range.
stepSize (double)Step size. Will be automatically negated if required.
Range of values.

CreateRangeWithStepSize

#
public static NumericRange CreateRangeWithStepSize(int from, int to, int stepSize)
Create a range of numbers.
from (int)First number in range.
to (int)Last number in range.
stepSize (int)Step size. Will be automatically negated if required.
Range of values. Either an array of 32-bit integers, or an array of BigIntegers.

ParseRangeExpression

#
public static NumericRange[] ParseRangeExpression(string notation)
Parse a range expression create the described numeric range.
notation (string)Notation to parse.

ToTree

#Example
public static ITree ToTree(this NumericRange[] ranges)
Create a tree where each range becomes a twig.
ranges (NumericRange[])