public static final class DenseVector.Builder extends GeneratedMessage.Builder<DenseVector.Builder> implements DenseVectorOrBuilderA dense vector.
Protobuf type google.cloud.vectorsearch.v1beta.DenseVector
Inheritance
java.lang.Object > AbstractMessageLite.Builder<MessageType,BuilderType> > AbstractMessage.Builder<BuilderType> > GeneratedMessage.Builder > DenseVector.BuilderImplements
DenseVectorOrBuilderStatic Methods
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()| Returns | |
|---|---|
| Type | Description |
Descriptor |
|
Methods
addAllValues(Iterable<? extends Float> values)
public DenseVector.Builder addAllValues(Iterable<? extends Float> values)Required. The values of the vector.
repeated float values = 1 [(.google.api.field_behavior) = REQUIRED];
| Parameter | |
|---|---|
| Name | Description |
values |
Iterable<? extends java.lang.Float>The values to add. |
| Returns | |
|---|---|
| Type | Description |
DenseVector.Builder |
This builder for chaining. |
addValues(float value)
public DenseVector.Builder addValues(float value)Required. The values of the vector.
repeated float values = 1 [(.google.api.field_behavior) = REQUIRED];
| Parameter | |
|---|---|
| Name | Description |
value |
floatThe values to add. |
| Returns | |
|---|---|
| Type | Description |
DenseVector.Builder |
This builder for chaining. |
build()
public DenseVector build()| Returns | |
|---|---|
| Type | Description |
DenseVector |
|
buildPartial()
public DenseVector buildPartial()| Returns | |
|---|---|
| Type | Description |
DenseVector |
|
clear()
public DenseVector.Builder clear()| Returns | |
|---|---|
| Type | Description |
DenseVector.Builder |
|
clearValues()
public DenseVector.Builder clearValues()Required. The values of the vector.
repeated float values = 1 [(.google.api.field_behavior) = REQUIRED];
| Returns | |
|---|---|
| Type | Description |
DenseVector.Builder |
This builder for chaining. |
getDefaultInstanceForType()
public DenseVector getDefaultInstanceForType()| Returns | |
|---|---|
| Type | Description |
DenseVector |
|
getDescriptorForType()
public Descriptors.Descriptor getDescriptorForType()| Returns | |
|---|---|
| Type | Description |
Descriptor |
|
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 |
intThe 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. |
internalGetFieldAccessorTable()
protected GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()| Returns | |
|---|---|
| Type | Description |
FieldAccessorTable |
|
isInitialized()
public final boolean isInitialized()| Returns | |
|---|---|
| Type | Description |
boolean |
|
mergeFrom(DenseVector other)
public DenseVector.Builder mergeFrom(DenseVector other)| Parameter | |
|---|---|
| Name | Description |
other |
DenseVector |
| Returns | |
|---|---|
| Type | Description |
DenseVector.Builder |
|
mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
public DenseVector.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)| Parameters | |
|---|---|
| Name | Description |
input |
CodedInputStream |
extensionRegistry |
ExtensionRegistryLite |
| Returns | |
|---|---|
| Type | Description |
DenseVector.Builder |
|
| Exceptions | |
|---|---|
| Type | Description |
IOException |
|
mergeFrom(Message other)
public DenseVector.Builder mergeFrom(Message other)| Parameter | |
|---|---|
| Name | Description |
other |
Message |
| Returns | |
|---|---|
| Type | Description |
DenseVector.Builder |
|
setValues(int index, float value)
public DenseVector.Builder setValues(int index, float value)Required. The values of the vector.
repeated float values = 1 [(.google.api.field_behavior) = REQUIRED];
| Parameters | |
|---|---|
| Name | Description |
index |
intThe index to set the value at. |
value |
floatThe values to set. |
| Returns | |
|---|---|
| Type | Description |
DenseVector.Builder |
This builder for chaining. |