ArrayFunctions<T>.Round Method

Definition

Namespace: Numerics.NET.LinearAlgebra.Implementation
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.0.0

Overload List

Round(Int32, ReadOnlySpanSlice<T>, SpanSlice<T>) Rounds each element of a span to the nearest integer.
Round(Int32, ReadOnlySpanSlice<T>, Int32, SpanSlice<T>) Rounds each element of a span to the specified number of digits.
Round(Int32, ReadOnlySpan<T>, Int32, Span<T>, Int32) Rounds each element of a span to the nearest integer.
Round(Int32, ReadOnlySpan<T>, Int32, Int32, Span<T>, Int32) Rounds each element of a span to the specified number of digits.
Round<TStorage>(Int32, TStorage, TStorage) Rounds each element of an array to the nearest integer.
Round<TStorage>(Int32, TStorage, Int32, TStorage) Rounds each element of an array to the specified number of digits.

Round(Int32, ReadOnlySpanSlice<T>, SpanSlice<T>)

Rounds each element of a span to the nearest integer.
C#
public void Round(
	int length,
	ReadOnlySpanSlice<T> values,
	SpanSlice<T> result
)

Parameters

length  Int32
The number of elements in the span.
values  ReadOnlySpanSlice<T>
The span that holds the operands.
result  SpanSlice<T>
The span that holds the results.

Round<TStorage>(Int32, TStorage, TStorage)

Rounds each element of an array to the nearest integer.
C#
public void Round<TStorage>(
	int length,
	TStorage values,
	TStorage result
)
where TStorage : Object, IStorageSlice<T>

Parameters

length  Int32
The number of elements in the array.
values  TStorage
The span that holds the operands.
result  TStorage
The span that holds the results.

Type Parameters

TStorage

Round(Int32, ReadOnlySpanSlice<T>, Int32, SpanSlice<T>)

Rounds each element of a span to the specified number of digits.
C#
public void Round(
	int length,
	ReadOnlySpanSlice<T> values,
	int decimals,
	SpanSlice<T> result
)

Parameters

length  Int32
The number of elements in the span.
values  ReadOnlySpanSlice<T>
The span that holds the operands.
decimals  Int32
The number of decimals to round to.
result  SpanSlice<T>
The span that holds the results.

Round<TStorage>(Int32, TStorage, Int32, TStorage)

Rounds each element of an array to the specified number of digits.
C#
public void Round<TStorage>(
	int length,
	TStorage values,
	int decimals,
	TStorage result
)
where TStorage : Object, IStorageSlice<T>

Parameters

length  Int32
The number of elements in the array.
values  TStorage
The span that holds the operands.
decimals  Int32
The number of decimals to round to.
result  TStorage
The span that holds the results.

Type Parameters

TStorage

Round(Int32, ReadOnlySpan<T>, Int32, Span<T>, Int32)

Rounds each element of a span to the nearest integer.
C#
public void Round(
	int length,
	ReadOnlySpan<T> values,
	int stride,
	Span<T> result,
	int resultStride
)

Parameters

length  Int32
The number of elements in the span.
values  ReadOnlySpan<T>
The span that holds the operands.
stride  Int32
The distance between elements in values.
result  Span<T>
The span that holds the results.
resultStride  Int32
The distance between elements in result.

Round(Int32, ReadOnlySpan<T>, Int32, Int32, Span<T>, Int32)

Rounds each element of a span to the specified number of digits.
C#
public abstract void Round(
	int length,
	ReadOnlySpan<T> values,
	int stride,
	int decimals,
	Span<T> result,
	int resultStride
)

Parameters

length  Int32
The number of elements in the span.
values  ReadOnlySpan<T>
The span that holds the operands.
stride  Int32
The distance between elements in values.
decimals  Int32
The number of decimals to round to.
result  Span<T>
The span that holds the results.
resultStride  Int32
The distance between elements in result.

See Also