2 writes to _count
Microsoft.ML.DataView (2)
21 references to _count
Microsoft.ML.DataView (21)
VBuffer.cs (21)
65public ReadOnlySpan<T> GetValues() => _values.AsSpan(0, _count);
80public ReadOnlySpan<int> GetIndices() => IsDense ? default : _indices.AsSpan(0, _count);
89Debug.Assert(_count <= Length);
90return _count == Length;
195var editor = VBufferEditor.Create(ref destination, Length, _count);
207if (_count > 0)
209_values.AsSpan(0, _count).CopyTo(editor.Values);
210_indices.AsSpan(0, _count).CopyTo(editor.Indices);
241if (_count > 0)
243int copyMin = ArrayUtils.FindIndexSorted(_indices, 0, _count, sourceIndex);
244int copyLim = ArrayUtils.FindIndexSorted(_indices, copyMin, _count, sourceIndex + length);
298if (_count == 0)
305for (int islot = 0; islot < _count; islot++)
344return Items(_values, _indices, Length, _count, all);
352return DenseValues(_values, _indices, Length, _count);
380else if (_count > 0 && ArrayUtils.TryFindIndexSorted(_indices, 0, _count, index, out int bufferIndex))
399if (_count > 0 && ArrayUtils.TryFindIndexSorted(_indices, 0, _count, index, out int bufferIndex))
405=> IsDense ? $"Dense vector of size {Length}" : $"Sparse vector of size {Length}, {_count} explicit values";
417return GetEditor(Length, _count);