Google Cloud Vector Search V1 Client - Class SparseVector (0.2.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 array

Required. The values of the vector.

↳ indices array

Required. The corresponding indices for the values.

getValues

Required. The values of the vector.

Returns
Type Description
Google\Protobuf\Internal\RepeatedField

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\Internal\RepeatedField

setIndices

Required. The corresponding indices for the values.

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