コード例 #1
0
 internal static VBufferEditor <T> Create <T>(
     ref VBuffer <T> destination,
     int newLogicalLength,
     int valuesCount,
     int maxValuesCapacity)
 {
     return(destination.GetEditor(
                newLogicalLength,
                valuesCount,
                maxValuesCapacity));
 }
コード例 #2
0
 /// <summary>
 /// Creates a <see cref="VBufferEditor{T}"/> using
 /// <paramref name="destination"/>'s values and indices buffers.
 /// </summary>
 /// <param name="destination">
 /// The destination buffer.
 /// </param>
 /// <param name="newLogicalLength">
 /// The logical length of the new buffer being edited.
 /// </param>
 /// <param name="valuesCount">
 /// The optional number of physical values to be represented in the buffer.
 /// The buffer will be dense if <paramref name="valuesCount"/> is omitted.
 /// </param>
 /// <param name="keepOldOnResize">
 /// 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.
 /// </param>
 /// <param name="requireIndicesOnDense">
 /// True means to ensure the Indices buffer is available, even if the buffer will be dense.
 /// </param>
 public static VBufferEditor <T> Create <T>(
     ref VBuffer <T> destination,
     int newLogicalLength,
     int?valuesCount            = null,
     bool keepOldOnResize       = false,
     bool requireIndicesOnDense = false)
 {
     return(destination.GetEditor(
                newLogicalLength,
                valuesCount,
                keepOldOnResize: keepOldOnResize,
                requireIndicesOnDense: requireIndicesOnDense));
 }
コード例 #3
0
 /// <summary>
 /// Creates a <see cref="VBufferEditor{T}"/> with the same shape
 /// (length and density) as the <paramref name="destination"/>.
 /// </summary>
 public static VBufferEditor <T> CreateFromBuffer <T>(
     ref VBuffer <T> destination)
 {
     return(destination.GetEditor());
 }