Partager via


SparseVectorData.CreateSparseVectorData Method

Definition

Creates a new instance of the SparseVectorData class with the specified indices and values.

public static Microsoft.SemanticKernel.Connectors.Pinecone.SparseVectorData CreateSparseVectorData (System.Collections.Generic.List<long> indices, ReadOnlyMemory<float> values);
static member CreateSparseVectorData : System.Collections.Generic.List<int64> * ReadOnlyMemory<single> -> Microsoft.SemanticKernel.Connectors.Pinecone.SparseVectorData
Public Shared Function CreateSparseVectorData (indices As List(Of Long), values As ReadOnlyMemory(Of Single)) As SparseVectorData

Parameters

indices
List<Int64>

The indices of the sparse data.

values
ReadOnlyMemory<Single>

The corresponding values of the sparse data, which must be the same length as the indices.

Returns

A new instance of the SparseVectorData class.

Applies to