VBufferEditor.Create<T> Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Creates a VBufferEditor<T> using
destination
's values and indices buffers.
public static Microsoft.ML.Data.VBufferEditor<T> Create<T> (scoped ref Microsoft.ML.Data.VBuffer<T> destination, int newLogicalLength, int? valuesCount = default, int? maxValuesCapacity = default, bool keepOldOnResize = false, bool requireIndicesOnDense = false);
public static Microsoft.ML.Data.VBufferEditor<T> Create<T> (ref Microsoft.ML.Data.VBuffer<T> destination, int newLogicalLength, int? valuesCount = default, int? maxValuesCapacity = default, bool keepOldOnResize = false, bool requireIndicesOnDense = false);
static member Create : VBuffer * int * Nullable<int> * Nullable<int> * bool * bool -> Microsoft.ML.Data.VBufferEditor<'T>
Public Shared Function Create(Of T) (ByRef destination As VBuffer(Of T), newLogicalLength As Integer, Optional valuesCount As Nullable(Of Integer) = Nothing, Optional maxValuesCapacity As Nullable(Of Integer) = Nothing, Optional keepOldOnResize As Boolean = false, Optional requireIndicesOnDense As Boolean = false) As VBufferEditor(Of T)
Type Parameters
- T
Parameters
- destination
- VBuffer<T>
The destination buffer. Note that the resulting VBufferEditor<T> is assumed to take ownership of this passed in object, and so whatever VBuffer<T> was passed in as this parameter should not be used again, since its underlying buffers are being potentially reused.
- newLogicalLength
- Int32
The logical length of the new buffer being edited.
The optional number of physical values to be represented in the buffer.
The buffer will be dense if valuesCount
is omitted.
The optional number of maximum physical values to represent in the buffer. The buffer won't grow beyond this maximum size.
- keepOldOnResize
- Boolean
True means that the old buffer values and indices are preserved, if possible (Array.Resize is called). False means that a new array will be allocated, if necessary.
- requireIndicesOnDense
- Boolean
True means to ensure the Indices buffer is available, even if the buffer will be dense.