Vector.CreateRange Method

Definition

Namespace: Numerics.NET
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 10.1.0

Overload List

CreateRange<T>(T, ArrayMutability) Constructs a new vector with elements from 0 up to the specified value.
Obsolete
CreateRange<T>(T, T, ArrayMutability) Constructs a new vector with elements from the specified range.
Obsolete
CreateRange<T>(T, T, Int32, ArrayMutability) Constructs a new vector with elements from the specified range.
Obsolete
CreateRange<T>(T, T, Int32, Boolean, ArrayMutability) Constructs a new vector with elements from the specified range.
Obsolete

CreateRange<T>(T, ArrayMutability)

Note: This API is now obsolete.
Constructs a new vector with elements from 0 up to the specified value.
C#
[ObsoleteAttribute("Use Vector.Range(stop, mutability) instead.")]
public static DenseVector<T> CreateRange<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>.

CreateRange<T>(T, T, ArrayMutability)

Note: This API is now obsolete.
Constructs a new vector with elements from the specified range.
C#
[ObsoleteAttribute("Use Vector.Range(start, stop, mutability) instead.")]
public static DenseVector<T> CreateRange<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>.

CreateRange<T>(T, T, Int32, ArrayMutability)

Note: This API is now obsolete.
Constructs a new vector with elements from the specified range.
C#
[ObsoleteAttribute("Use Vector.Range(start, stop, steps, mutability) instead.")]
public static DenseVector<T> CreateRange<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

ArgumentOutOfRangeException

steps is less than zero.

CreateRange<T>(T, T, Int32, Boolean, ArrayMutability)

Note: This API is now obsolete.
Constructs a new vector with elements from the specified range.
C#
[ObsoleteAttribute("Use Vector.Range(start, stop, steps, endPoint, mutability) instead.")]
public static DenseVector<T> CreateRange<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

ArgumentOutOfRangeException

steps is less than zero.

See Also