public struct VBuffer<T>
type VBuffer<'T> = struct
Public Structure VBuffer(Of T)
The type of the vector. There are no compile-time restrictions on what this could be, but this code and practically all code that uses VBuffer<T> makes the assumption that an assignment of a value is sufficient to make a completely independent copy of it. So, for example, this means that a buffer of buffers is not possible. But, things like Int32, Single, and ReadOnlyMemory<T>, are totally fine.
|VBuffer<T>(Int32, Int32, T, Int32)||
Construct a possibly sparse vector representation.
|VBuffer<T>(Int32, T, Int32)||
Construct a dense representation. The
The logical length of the buffer.
Gets a value indicating whether every logical element is explicitly represented in the buffer.
|Copy(T, Int32, VBuffer<T>, Int32)||
Copy from a section of a source array to the given destination.
Copy from this buffer to the given destination span. This "densifies."
|CopyTo(Span<T>, Int32, T)||
Copy from this buffer to the given destination span, starting at the specified index. This "densifies."
Copy from this buffer to the given destination.
|CopyTo(VBuffer<T>, Int32, Int32)||
Copy a range of values from this buffer to the given destination.
Copy from this buffer to the given destination, forcing a dense representation.
Returns an enumerable with Length items, representing the values.
The indices. For a dense representation, this array is not used, and will return the default "empty" span.
For a sparse representation it is parallel to that returned from GetValues() and specifies the
logical indices for the corresponding values, in increasing order, between 0 inclusive and
Length exclusive, corresponding to all explicitly defined values. All values at unspecified
indices should be treated as being implicitly defined with the default value of
A variant of GetItemOrDefault(Int32, T) that returns the value instead of passing it back using a reference parameter.
Gets the item stored in this structure. In the case of a dense vector this is a simple lookup.
In the case of a sparse vector, it will try to find the entry with that index, and set
Returns the joint list of all index/value pairs.