All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.clarifai.grpc.api.utils.Matrix Maven / Gradle / Ivy

The newest version!
// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: proto/clarifai/api/utils/matrix.proto

package com.clarifai.grpc.api.utils;

public final class Matrix {
  private Matrix() {}
  public static void registerAllExtensions(
      com.google.protobuf.ExtensionRegistryLite registry) {
  }

  public static void registerAllExtensions(
      com.google.protobuf.ExtensionRegistry registry) {
    registerAllExtensions(
        (com.google.protobuf.ExtensionRegistryLite) registry);
  }
  public interface MatrixUint64OrBuilder extends
      // @@protoc_insertion_point(interface_extends:MatrixUint64)
      com.google.protobuf.MessageOrBuilder {

    /**
     * 
     * Number of columns
     * 
* * uint64 n_cols = 1; * @return The nCols. */ long getNCols(); /** *
     * Matrix data stored as an array.
     * In order to access matrix element at row i & column j, use data[i*n_cols+j].
     * 
* * repeated uint64 data = 2; * @return A list containing the data. */ java.util.List getDataList(); /** *
     * Matrix data stored as an array.
     * In order to access matrix element at row i & column j, use data[i*n_cols+j].
     * 
* * repeated uint64 data = 2; * @return The count of data. */ int getDataCount(); /** *
     * Matrix data stored as an array.
     * In order to access matrix element at row i & column j, use data[i*n_cols+j].
     * 
* * repeated uint64 data = 2; * @param index The index of the element to return. * @return The data at the given index. */ long getData(int index); } /** *
   * Store matrix of uint64s values.
   * It is recommended to store the matrix as a 1D array
   * because it produces less bytes during serialization than a 2D array.
   * The matrix does store the number of columns, but it does not store the number of rows.
   * The number of rows can automatically be calculated as length(data)/n_cols.
   * 
* * Protobuf type {@code MatrixUint64} */ public static final class MatrixUint64 extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:MatrixUint64) MatrixUint64OrBuilder { private static final long serialVersionUID = 0L; // Use MatrixUint64.newBuilder() to construct. private MatrixUint64(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private MatrixUint64() { data_ = emptyLongList(); } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance( UnusedPrivateParameter unused) { return new MatrixUint64(); } @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private MatrixUint64( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { this(); if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } int mutable_bitField0_ = 0; com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; case 8: { nCols_ = input.readUInt64(); break; } case 16: { if (!((mutable_bitField0_ & 0x00000001) != 0)) { data_ = newLongList(); mutable_bitField0_ |= 0x00000001; } data_.addLong(input.readUInt64()); break; } case 18: { int length = input.readRawVarint32(); int limit = input.pushLimit(length); if (!((mutable_bitField0_ & 0x00000001) != 0) && input.getBytesUntilLimit() > 0) { data_ = newLongList(); mutable_bitField0_ |= 0x00000001; } while (input.getBytesUntilLimit() > 0) { data_.addLong(input.readUInt64()); } input.popLimit(limit); break; } default: { if (!parseUnknownField( input, unknownFields, extensionRegistry, tag)) { done = true; } break; } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(this); } catch (com.google.protobuf.UninitializedMessageException e) { throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException( e).setUnfinishedMessage(this); } finally { if (((mutable_bitField0_ & 0x00000001) != 0)) { data_.makeImmutable(); // C } this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.clarifai.grpc.api.utils.Matrix.internal_static_MatrixUint64_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.clarifai.grpc.api.utils.Matrix.internal_static_MatrixUint64_fieldAccessorTable .ensureFieldAccessorsInitialized( com.clarifai.grpc.api.utils.Matrix.MatrixUint64.class, com.clarifai.grpc.api.utils.Matrix.MatrixUint64.Builder.class); } public static final int N_COLS_FIELD_NUMBER = 1; private long nCols_; /** *
     * Number of columns
     * 
* * uint64 n_cols = 1; * @return The nCols. */ @java.lang.Override public long getNCols() { return nCols_; } public static final int DATA_FIELD_NUMBER = 2; private com.google.protobuf.Internal.LongList data_; /** *
     * Matrix data stored as an array.
     * In order to access matrix element at row i & column j, use data[i*n_cols+j].
     * 
* * repeated uint64 data = 2; * @return A list containing the data. */ @java.lang.Override public java.util.List getDataList() { return data_; } /** *
     * Matrix data stored as an array.
     * In order to access matrix element at row i & column j, use data[i*n_cols+j].
     * 
* * repeated uint64 data = 2; * @return The count of data. */ public int getDataCount() { return data_.size(); } /** *
     * Matrix data stored as an array.
     * In order to access matrix element at row i & column j, use data[i*n_cols+j].
     * 
* * repeated uint64 data = 2; * @param index The index of the element to return. * @return The data at the given index. */ public long getData(int index) { return data_.getLong(index); } private int dataMemoizedSerializedSize = -1; private byte memoizedIsInitialized = -1; @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; } @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); if (nCols_ != 0L) { output.writeUInt64(1, nCols_); } if (getDataList().size() > 0) { output.writeUInt32NoTag(18); output.writeUInt32NoTag(dataMemoizedSerializedSize); } for (int i = 0; i < data_.size(); i++) { output.writeUInt64NoTag(data_.getLong(i)); } unknownFields.writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (nCols_ != 0L) { size += com.google.protobuf.CodedOutputStream .computeUInt64Size(1, nCols_); } { int dataSize = 0; for (int i = 0; i < data_.size(); i++) { dataSize += com.google.protobuf.CodedOutputStream .computeUInt64SizeNoTag(data_.getLong(i)); } size += dataSize; if (!getDataList().isEmpty()) { size += 1; size += com.google.protobuf.CodedOutputStream .computeInt32SizeNoTag(dataSize); } dataMemoizedSerializedSize = dataSize; } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; } @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof com.clarifai.grpc.api.utils.Matrix.MatrixUint64)) { return super.equals(obj); } com.clarifai.grpc.api.utils.Matrix.MatrixUint64 other = (com.clarifai.grpc.api.utils.Matrix.MatrixUint64) obj; if (getNCols() != other.getNCols()) return false; if (!getDataList() .equals(other.getDataList())) return false; if (!unknownFields.equals(other.unknownFields)) return false; return true; } @java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + N_COLS_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong( getNCols()); if (getDataCount() > 0) { hash = (37 * hash) + DATA_FIELD_NUMBER; hash = (53 * hash) + getDataList().hashCode(); } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } public static com.clarifai.grpc.api.utils.Matrix.MatrixUint64 parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.clarifai.grpc.api.utils.Matrix.MatrixUint64 parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.clarifai.grpc.api.utils.Matrix.MatrixUint64 parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.clarifai.grpc.api.utils.Matrix.MatrixUint64 parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.clarifai.grpc.api.utils.Matrix.MatrixUint64 parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.clarifai.grpc.api.utils.Matrix.MatrixUint64 parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.clarifai.grpc.api.utils.Matrix.MatrixUint64 parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.clarifai.grpc.api.utils.Matrix.MatrixUint64 parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } public static com.clarifai.grpc.api.utils.Matrix.MatrixUint64 parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static com.clarifai.grpc.api.utils.Matrix.MatrixUint64 parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static com.clarifai.grpc.api.utils.Matrix.MatrixUint64 parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.clarifai.grpc.api.utils.Matrix.MatrixUint64 parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } @java.lang.Override public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } public static Builder newBuilder(com.clarifai.grpc.api.utils.Matrix.MatrixUint64 prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @java.lang.Override public Builder toBuilder() { return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); } @java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** *
     * Store matrix of uint64s values.
     * It is recommended to store the matrix as a 1D array
     * because it produces less bytes during serialization than a 2D array.
     * The matrix does store the number of columns, but it does not store the number of rows.
     * The number of rows can automatically be calculated as length(data)/n_cols.
     * 
* * Protobuf type {@code MatrixUint64} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:MatrixUint64) com.clarifai.grpc.api.utils.Matrix.MatrixUint64OrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.clarifai.grpc.api.utils.Matrix.internal_static_MatrixUint64_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.clarifai.grpc.api.utils.Matrix.internal_static_MatrixUint64_fieldAccessorTable .ensureFieldAccessorsInitialized( com.clarifai.grpc.api.utils.Matrix.MatrixUint64.class, com.clarifai.grpc.api.utils.Matrix.MatrixUint64.Builder.class); } // Construct using com.clarifai.grpc.api.utils.Matrix.MatrixUint64.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3 .alwaysUseFieldBuilders) { } } @java.lang.Override public Builder clear() { super.clear(); nCols_ = 0L; data_ = emptyLongList(); bitField0_ = (bitField0_ & ~0x00000001); return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.clarifai.grpc.api.utils.Matrix.internal_static_MatrixUint64_descriptor; } @java.lang.Override public com.clarifai.grpc.api.utils.Matrix.MatrixUint64 getDefaultInstanceForType() { return com.clarifai.grpc.api.utils.Matrix.MatrixUint64.getDefaultInstance(); } @java.lang.Override public com.clarifai.grpc.api.utils.Matrix.MatrixUint64 build() { com.clarifai.grpc.api.utils.Matrix.MatrixUint64 result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public com.clarifai.grpc.api.utils.Matrix.MatrixUint64 buildPartial() { com.clarifai.grpc.api.utils.Matrix.MatrixUint64 result = new com.clarifai.grpc.api.utils.Matrix.MatrixUint64(this); int from_bitField0_ = bitField0_; result.nCols_ = nCols_; if (((bitField0_ & 0x00000001) != 0)) { data_.makeImmutable(); bitField0_ = (bitField0_ & ~0x00000001); } result.data_ = data_; onBuilt(); return result; } @java.lang.Override public Builder clone() { return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.setField(field, value); } @java.lang.Override public Builder clearField( com.google.protobuf.Descriptors.FieldDescriptor field) { return super.clearField(field); } @java.lang.Override public Builder clearOneof( com.google.protobuf.Descriptors.OneofDescriptor oneof) { return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.addRepeatedField(field, value); } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.clarifai.grpc.api.utils.Matrix.MatrixUint64) { return mergeFrom((com.clarifai.grpc.api.utils.Matrix.MatrixUint64)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(com.clarifai.grpc.api.utils.Matrix.MatrixUint64 other) { if (other == com.clarifai.grpc.api.utils.Matrix.MatrixUint64.getDefaultInstance()) return this; if (other.getNCols() != 0L) { setNCols(other.getNCols()); } if (!other.data_.isEmpty()) { if (data_.isEmpty()) { data_ = other.data_; bitField0_ = (bitField0_ & ~0x00000001); } else { ensureDataIsMutable(); data_.addAll(other.data_); } onChanged(); } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; } @java.lang.Override public final boolean isInitialized() { return true; } @java.lang.Override public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { com.clarifai.grpc.api.utils.Matrix.MatrixUint64 parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (com.clarifai.grpc.api.utils.Matrix.MatrixUint64) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private int bitField0_; private long nCols_ ; /** *
       * Number of columns
       * 
* * uint64 n_cols = 1; * @return The nCols. */ @java.lang.Override public long getNCols() { return nCols_; } /** *
       * Number of columns
       * 
* * uint64 n_cols = 1; * @param value The nCols to set. * @return This builder for chaining. */ public Builder setNCols(long value) { nCols_ = value; onChanged(); return this; } /** *
       * Number of columns
       * 
* * uint64 n_cols = 1; * @return This builder for chaining. */ public Builder clearNCols() { nCols_ = 0L; onChanged(); return this; } private com.google.protobuf.Internal.LongList data_ = emptyLongList(); private void ensureDataIsMutable() { if (!((bitField0_ & 0x00000001) != 0)) { data_ = mutableCopy(data_); bitField0_ |= 0x00000001; } } /** *
       * Matrix data stored as an array.
       * In order to access matrix element at row i & column j, use data[i*n_cols+j].
       * 
* * repeated uint64 data = 2; * @return A list containing the data. */ public java.util.List getDataList() { return ((bitField0_ & 0x00000001) != 0) ? java.util.Collections.unmodifiableList(data_) : data_; } /** *
       * Matrix data stored as an array.
       * In order to access matrix element at row i & column j, use data[i*n_cols+j].
       * 
* * repeated uint64 data = 2; * @return The count of data. */ public int getDataCount() { return data_.size(); } /** *
       * Matrix data stored as an array.
       * In order to access matrix element at row i & column j, use data[i*n_cols+j].
       * 
* * repeated uint64 data = 2; * @param index The index of the element to return. * @return The data at the given index. */ public long getData(int index) { return data_.getLong(index); } /** *
       * Matrix data stored as an array.
       * In order to access matrix element at row i & column j, use data[i*n_cols+j].
       * 
* * repeated uint64 data = 2; * @param index The index to set the value at. * @param value The data to set. * @return This builder for chaining. */ public Builder setData( int index, long value) { ensureDataIsMutable(); data_.setLong(index, value); onChanged(); return this; } /** *
       * Matrix data stored as an array.
       * In order to access matrix element at row i & column j, use data[i*n_cols+j].
       * 
* * repeated uint64 data = 2; * @param value The data to add. * @return This builder for chaining. */ public Builder addData(long value) { ensureDataIsMutable(); data_.addLong(value); onChanged(); return this; } /** *
       * Matrix data stored as an array.
       * In order to access matrix element at row i & column j, use data[i*n_cols+j].
       * 
* * repeated uint64 data = 2; * @param values The data to add. * @return This builder for chaining. */ public Builder addAllData( java.lang.Iterable values) { ensureDataIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( values, data_); onChanged(); return this; } /** *
       * Matrix data stored as an array.
       * In order to access matrix element at row i & column j, use data[i*n_cols+j].
       * 
* * repeated uint64 data = 2; * @return This builder for chaining. */ public Builder clearData() { data_ = emptyLongList(); bitField0_ = (bitField0_ & ~0x00000001); onChanged(); return this; } @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); } @java.lang.Override public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.mergeUnknownFields(unknownFields); } // @@protoc_insertion_point(builder_scope:MatrixUint64) } // @@protoc_insertion_point(class_scope:MatrixUint64) private static final com.clarifai.grpc.api.utils.Matrix.MatrixUint64 DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new com.clarifai.grpc.api.utils.Matrix.MatrixUint64(); } public static com.clarifai.grpc.api.utils.Matrix.MatrixUint64 getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public MatrixUint64 parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new MatrixUint64(input, extensionRegistry); } }; public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override public com.clarifai.grpc.api.utils.Matrix.MatrixUint64 getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } private static final com.google.protobuf.Descriptors.Descriptor internal_static_MatrixUint64_descriptor; private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_MatrixUint64_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { return descriptor; } private static com.google.protobuf.Descriptors.FileDescriptor descriptor; static { java.lang.String[] descriptorData = { "\n%proto/clarifai/api/utils/matrix.proto\"" + ",\n\014MatrixUint64\022\016\n\006n_cols\030\001 \001(\004\022\014\n\004data\030" + "\002 \003(\004B\\\n\033com.clarifai.grpc.api.utilsZ=gi" + "thub.com/Clarifai/clarifai-go-grpc/proto" + "/clarifai/api/utilsb\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor .internalBuildGeneratedFileFrom(descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] { }); internal_static_MatrixUint64_descriptor = getDescriptor().getMessageTypes().get(0); internal_static_MatrixUint64_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_MatrixUint64_descriptor, new java.lang.String[] { "NCols", "Data", }); } // @@protoc_insertion_point(outer_class_scope) }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy