Google Cloud Vector Search V1 Client - Class SparseVector (0.3.0)

Reference documentation and code samples for the Google Cloud Vector Search V1 Client class SparseVector.

A sparse vector.

Generated from protobuf message google.cloud.vectorsearch.v1.SparseVector

Namespace

Google \ Cloud \ VectorSearch \ V1

Methods

__construct

Constructor.

Parameters
Name Description
data array

Optional. Data for populating the Message object.

↳ values float[]

Required. The values of the vector.

↳ indices int[]

Required. The corresponding indices for the values.

getValues

Required. The values of the vector.

Returns
Type Description
Google\Protobuf\RepeatedField<float>

setValues

Required. The values of the vector.

Parameter
Name Description
var float[]
Returns
Type Description
$this

getIndices

Required. The corresponding indices for the values.

Returns
Type Description
Google\Protobuf\RepeatedField<int>

setIndices

Required. The corresponding indices for the values.

Parameter
Name Description
var int[]
Returns
Type Description
$this