Share via


VBuffer<T>.CopyTo Method

Definition

Overloads

CopyTo(VBuffer<T>)

Copy from this buffer to the given destination.

CopyTo(Span<T>)

Copy from this buffer to the given destination span. This "densifies."

CopyTo(VBuffer<T>, Int32, Int32)

Copy a range of values from this buffer to the given destination.

CopyTo(Span<T>, Int32, T)

Copy from this buffer to the given destination span, starting at the specified index. This "densifies."

CopyTo(VBuffer<T>)

Copy from this buffer to the given destination.

public void CopyTo (ref Microsoft.ML.Data.VBuffer<T> destination);
member this.CopyTo : VBuffer -> unit
Public Sub CopyTo (ByRef destination As VBuffer(Of T))

Parameters

destination
VBuffer<T>

The destination buffer. After the copy, this will have Length of Length.

Applies to

CopyTo(Span<T>)

Copy from this buffer to the given destination span. This "densifies."

public void CopyTo (Span<T> destination);
member this.CopyTo : Span<'T> -> unit
Public Sub CopyTo (destination As Span(Of T))

Parameters

destination
Span<T>

The destination buffer. This Length must have least Length.

Applies to

CopyTo(VBuffer<T>, Int32, Int32)

Copy a range of values from this buffer to the given destination.

public void CopyTo (ref Microsoft.ML.Data.VBuffer<T> destination, int sourceIndex, int length);
member this.CopyTo : VBuffer * int * int -> unit
Public Sub CopyTo (ByRef destination As VBuffer(Of T), sourceIndex As Integer, length As Integer)

Parameters

destination
VBuffer<T>

The destination buffer. After the copy, this will have Length of length.

sourceIndex
Int32

The minimum inclusive index to start copying from this vector.

length
Int32

The logical number of values to copy from this vector into destination.

Applies to

CopyTo(Span<T>, Int32, T)

Copy from this buffer to the given destination span, starting at the specified index. This "densifies."

public void CopyTo (Span<T> destination, int destinationIndex, T defaultValue = default);
member this.CopyTo : Span<'T> * int * 'T -> unit
Public Sub CopyTo (destination As Span(Of T), destinationIndex As Integer, Optional defaultValue As T = Nothing)

Parameters

destination
Span<T>

The destination buffer. This Length must be at least Length plus destinationIndex.

destinationIndex
Int32

The starting index of destination at which to start copying.

defaultValue
T

The value to fill in for the implicit sparse entries. This is a potential exception to general expectation of sparse VBuffer<T> that the implicit sparse entries have the default value of T.

Applies to