Vector.CreateRange Method

Definition

Namespace: Extreme.Mathematics
Assembly: Extreme.Numerics (in Extreme.Numerics.dll) Version: 8.1.23

Overload List

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

Vector.CreateRange<T>(T, ArrayMutability)

Constructs a new vector with elements from 0 up to the specified value.
C#
public static DenseVector<T> CreateRange<T>(
	T stop,
	ArrayMutability mutability = ArrayMutability.Immutable
)

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>.

Vector.CreateRange<T>(T, T, ArrayMutability)

Constructs a new vector with elements from the specified range..
C#
public static DenseVector<T> CreateRange<T>(
	T start,
	T stop,
	ArrayMutability mutability = ArrayMutability.Immutable
)

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>.

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

Constructs a new vector with elements from the specified range..
C#
public static DenseVector<T> CreateRange<T>(
	T start,
	T stop,
	int steps,
	ArrayMutability mutability = ArrayMutability.Immutable
)

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

ArgumentOutOfRangeExceptionsteps is less than zero.

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

Constructs a new vector with elements from the specified range..
C#
public static DenseVector<T> CreateRange<T>(
	T start,
	T stop,
	int steps,
	bool endPoint,
	ArrayMutability mutability = ArrayMutability.Immutable
)

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

ArgumentOutOfRangeExceptionsteps is less than zero.

See Also