Vector.Range Method
Definition
Namespace: Numerics.NET
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 10.0.0
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 10.0.0
Overload List
| Range<T>(T, ArrayMutability) | Constructs a new vector with elements from 0 up to the specified value. |
| Range<T>(T, T, ArrayMutability) | Constructs a new vector with elements from the specified range. |
| Range<T>(T, T, Int32, ArrayMutability) | Constructs a new vector with elements from the specified range. |
| Range<T>(T, T, Int32, Boolean, ArrayMutability) | Constructs a new vector with elements from the specified range. |
Range<T>(T, ArrayMutability)
Constructs a new vector with elements from 0 up to the specified value.
public static DenseVector<T> Range<T>(
T stop,
ArrayMutability mutability = ArrayMutability.MutableValues
)
Parameters
- stop T
- The upper bound for the range.
- mutability ArrayMutability (Optional)
- Specifies how the vector's values may be changed. The default is mutable values.
Type Parameters
- T
Return Value
DenseVector<T>A DenseVector<T>.
Range<T>(T, T, ArrayMutability)
Constructs a new vector with elements from the specified range.
public static DenseVector<T> Range<T>(
T start,
T stop,
ArrayMutability mutability = ArrayMutability.MutableValues
)
Parameters
- start T
- The first value in the range.
- stop T
- The (inclusive) upper bound for the range.
- mutability ArrayMutability (Optional)
- Specifies how the vector's values may be changed. The default is mutable values.
Type Parameters
- T
Return Value
DenseVector<T>A DenseVector<T>.
Range<T>(T, T, Int32, ArrayMutability)
Constructs a new vector with elements from the specified range.
public static DenseVector<T> Range<T>(
T start,
T stop,
int steps,
ArrayMutability mutability = ArrayMutability.MutableValues
)
Parameters
- start T
- The first value in the range.
- stop T
- The (inclusive) upper bound for the range.
- steps Int32
- The number of values.
- mutability ArrayMutability (Optional)
- Specifies how the vector's values may be changed. The default is mutable values.
Type Parameters
- T
Return Value
DenseVector<T>A DenseVector<T>.
Exceptions
| Argument | steps is less than zero. |
Range<T>(T, T, Int32, Boolean, ArrayMutability)
Constructs a new vector with elements from the specified range.
public static DenseVector<T> Range<T>(
T start,
T stop,
int steps,
bool endPoint,
ArrayMutability mutability = ArrayMutability.MutableValues
)
Parameters
- start T
- The first value in the range.
- stop T
- The upper bound for the range.
- steps Int32
- The number of values.
- endPoint Boolean
- Indicates whether stop is included in the range.
- mutability ArrayMutability (Optional)
- Specifies how the vector's values may be changed. The default is mutable values.
Type Parameters
- T
Return Value
DenseVector<T>A DenseVector<T>.
Exceptions
| Argument | steps is less than zero. |