Class SparseVector (0.1.0)

public final class SparseVector extends GeneratedMessageV3 implements SparseVectorOrBuilder

A sparse vector.

Protobuf type google.cloud.vectorsearch.v1beta.SparseVector

Static Fields

INDICES_FIELD_NUMBER

public static final int INDICES_FIELD_NUMBER
Field Value
Type Description
int

VALUES_FIELD_NUMBER

public static final int VALUES_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

public static SparseVector getDefaultInstance()
Returns
Type Description
SparseVector

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

newBuilder()

public static SparseVector.Builder newBuilder()
Returns
Type Description
SparseVector.Builder

newBuilder(SparseVector prototype)

public static SparseVector.Builder newBuilder(SparseVector prototype)
Parameter
Name Description
prototype SparseVector
Returns
Type Description
SparseVector.Builder

parseDelimitedFrom(InputStream input)

public static SparseVector parseDelimitedFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
SparseVector
Exceptions
Type Description
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static SparseVector parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
SparseVector
Exceptions
Type Description
IOException

parseFrom(byte[] data)

public static SparseVector parseFrom(byte[] data)
Parameter
Name Description
data byte[]
Returns
Type Description
SparseVector
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static SparseVector parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data byte[]
extensionRegistry ExtensionRegistryLite
Returns
Type Description
SparseVector
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data)

public static SparseVector parseFrom(ByteString data)
Parameter
Name Description
data ByteString
Returns
Type Description
SparseVector
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static SparseVector parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteString
extensionRegistry ExtensionRegistryLite
Returns
Type Description
SparseVector
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static SparseVector parseFrom(CodedInputStream input)
Parameter
Name Description
input CodedInputStream
Returns
Type Description
SparseVector
Exceptions
Type Description
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static SparseVector parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
SparseVector
Exceptions
Type Description
IOException

parseFrom(InputStream input)

public static SparseVector parseFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
SparseVector
Exceptions
Type Description
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static SparseVector parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
SparseVector
Exceptions
Type Description
IOException

parseFrom(ByteBuffer data)

public static SparseVector parseFrom(ByteBuffer data)
Parameter
Name Description
data ByteBuffer
Returns
Type Description
SparseVector
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static SparseVector parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteBuffer
extensionRegistry ExtensionRegistryLite
Returns
Type Description
SparseVector
Exceptions
Type Description
InvalidProtocolBufferException

parser()

public static Parser<SparseVector> parser()
Returns
Type Description
Parser<SparseVector>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
Name Description
obj Object
Returns
Type Description
boolean
Overrides

getDefaultInstanceForType()

public SparseVector getDefaultInstanceForType()
Returns
Type Description
SparseVector

getIndices(int index)

public int getIndices(int index)

Required. The corresponding indices for the values.

repeated int32 indices = 2 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
index int

The index of the element to return.

Returns
Type Description
int

The indices at the given index.

getIndicesCount()

public int getIndicesCount()

Required. The corresponding indices for the values.

repeated int32 indices = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
int

The count of indices.

getIndicesList()

public List<Integer> getIndicesList()

Required. The corresponding indices for the values.

repeated int32 indices = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
List<Integer>

A list containing the indices.

getParserForType()

public Parser<SparseVector> getParserForType()
Returns
Type Description
Parser<SparseVector>
Overrides

getSerializedSize()

public int getSerializedSize()
Returns
Type Description
int
Overrides

getValues(int index)

public float getValues(int index)

Required. The values of the vector.

repeated float values = 1 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
index int

The index of the element to return.

Returns
Type Description
float

The values at the given index.

getValuesCount()

public int getValuesCount()

Required. The values of the vector.

repeated float values = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
int

The count of values.

getValuesList()

public List<Float> getValuesList()

Required. The values of the vector.

repeated float values = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
List<Float>

A list containing the values.

hashCode()

public int hashCode()
Returns
Type Description
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

newBuilderForType()

public SparseVector.Builder newBuilderForType()
Returns
Type Description
SparseVector.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected SparseVector.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
Name Description
parent BuilderParent
Returns
Type Description
SparseVector.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
Name Description
unused UnusedPrivateParameter
Returns
Type Description
Object
Overrides

toBuilder()

public SparseVector.Builder toBuilder()
Returns
Type Description
SparseVector.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
Name Description
output CodedOutputStream
Overrides
Exceptions
Type Description
IOException