Send feedback
Class SparseVector (0.1.0)
Stay organized with collections
Save and categorize content based on your preferences.
public final class SparseVector extends GeneratedMessageV3 implements SparseVectorOrBuilder
A sparse vector.
Protobuf type google.cloud.vectorsearch.v1beta.SparseVector
Inherited Members
com.google.protobuf.GeneratedMessageV3.<ListT>makeMutableCopy(ListT)
com.google.protobuf.GeneratedMessageV3.<ListT>makeMutableCopy(ListT,int)
com.google.protobuf.GeneratedMessageV3.<T>emptyList(java.lang.Class<T>)
com.google.protobuf.GeneratedMessageV3.internalGetMapFieldReflection(int)
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 ()
getDescriptor()
public static final Descriptors . Descriptor getDescriptor ()
newBuilder()
public static SparseVector . Builder newBuilder ()
newBuilder(SparseVector prototype)
public static SparseVector . Builder newBuilder ( SparseVector prototype )
public static SparseVector parseDelimitedFrom ( InputStream input )
public static SparseVector parseDelimitedFrom ( InputStream input , ExtensionRegistryLite extensionRegistry )
parseFrom(byte[] data)
public static SparseVector parseFrom ( byte [] data )
Parameter
Name
Description
data
byte []
parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
public static SparseVector parseFrom ( byte [] data , ExtensionRegistryLite extensionRegistry )
parseFrom(ByteString data)
public static SparseVector parseFrom ( ByteString data )
parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
public static SparseVector parseFrom ( ByteString data , ExtensionRegistryLite extensionRegistry )
public static SparseVector parseFrom ( CodedInputStream input )
public static SparseVector parseFrom ( CodedInputStream input , ExtensionRegistryLite extensionRegistry )
public static SparseVector parseFrom ( InputStream input )
public static SparseVector parseFrom ( InputStream input , ExtensionRegistryLite extensionRegistry )
parseFrom(ByteBuffer data)
public static SparseVector parseFrom ( ByteBuffer data )
parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
public static SparseVector parseFrom ( ByteBuffer data , ExtensionRegistryLite extensionRegistry )
parser()
public static Parser<SparseVector> parser ()
Methods
equals(Object obj)
public boolean equals ( Object obj )
Parameter
Name
Description
obj
Object
Overrides
getDefaultInstanceForType()
public SparseVector getDefaultInstanceForType ()
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 ()
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()
Returns
Type
Description
int
Overrides
internalGetFieldAccessorTable()
protected GeneratedMessageV3 . FieldAccessorTable internalGetFieldAccessorTable ()
Overrides
isInitialized()
public final boolean isInitialized ()
Overrides
newBuilderForType()
public SparseVector . Builder newBuilderForType ()
newBuilderForType(GeneratedMessageV3.BuilderParent parent)
protected SparseVector . Builder newBuilderForType ( GeneratedMessageV3 . BuilderParent parent )
Overrides
newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
protected Object newInstance ( GeneratedMessageV3 . UnusedPrivateParameter unused )
Returns
Type
Description
Object
Overrides
toBuilder()
public SparseVector . Builder toBuilder ()
writeTo(CodedOutputStream output)
public void writeTo ( CodedOutputStream output )
Overrides
Send feedback
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License , and code samples are licensed under the Apache 2.0 License . For details, see the Google Developers Site Policies . Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-11-19 UTC.
Need to tell us more?
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-11-19 UTC."],[],[]]