// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: tribuo-clustering-hdbscan.proto

package org.tribuo.clustering.hdbscan.protos;

/**
 * <pre>
 *HdbscanTrainer.ClusterExemplar proto
 * </pre>
 *
 * Protobuf type {@code tribuo.clustering.hdbscan.ClusterExemplarProto}
 */
public final class ClusterExemplarProto extends
    com.google.protobuf.GeneratedMessageV3 implements
    // @@protoc_insertion_point(message_implements:tribuo.clustering.hdbscan.ClusterExemplarProto)
    ClusterExemplarProtoOrBuilder {
private static final long serialVersionUID = 0L;
  // Use ClusterExemplarProto.newBuilder() to construct.
  private ClusterExemplarProto(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
    super(builder);
  }
  private ClusterExemplarProto() {
  }

  @java.lang.Override
  @SuppressWarnings({"unused"})
  protected java.lang.Object newInstance(
      UnusedPrivateParameter unused) {
    return new ClusterExemplarProto();
  }

  @java.lang.Override
  public final com.google.protobuf.UnknownFieldSet
  getUnknownFields() {
    return this.unknownFields;
  }
  private ClusterExemplarProto(
      com.google.protobuf.CodedInputStream input,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    this();
    if (extensionRegistry == null) {
      throw new java.lang.NullPointerException();
    }
    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: {

            label_ = input.readInt32();
            break;
          }
          case 17: {

            outlierScore_ = input.readDouble();
            break;
          }
          case 26: {
            org.tribuo.math.protos.TensorProto.Builder subBuilder = null;
            if (features_ != null) {
              subBuilder = features_.toBuilder();
            }
            features_ = input.readMessage(org.tribuo.math.protos.TensorProto.parser(), extensionRegistry);
            if (subBuilder != null) {
              subBuilder.mergeFrom(features_);
              features_ = subBuilder.buildPartial();
            }

            break;
          }
          case 33: {

            maxDistToEdge_ = input.readDouble();
            break;
          }
          default: {
            if (!parseUnknownField(
                input, unknownFields, extensionRegistry, tag)) {
              done = true;
            }
            break;
          }
        }
      }
    } catch (com.google.protobuf.InvalidProtocolBufferException e) {
      throw e.setUnfinishedMessage(this);
    } catch (java.io.IOException e) {
      throw new com.google.protobuf.InvalidProtocolBufferException(
          e).setUnfinishedMessage(this);
    } finally {
      this.unknownFields = unknownFields.build();
      makeExtensionsImmutable();
    }
  }
  public static final com.google.protobuf.Descriptors.Descriptor
      getDescriptor() {
    return org.tribuo.clustering.hdbscan.protos.TribuoClusteringHdbscan.internal_static_tribuo_clustering_hdbscan_ClusterExemplarProto_descriptor;
  }

  @java.lang.Override
  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internalGetFieldAccessorTable() {
    return org.tribuo.clustering.hdbscan.protos.TribuoClusteringHdbscan.internal_static_tribuo_clustering_hdbscan_ClusterExemplarProto_fieldAccessorTable
        .ensureFieldAccessorsInitialized(
            org.tribuo.clustering.hdbscan.protos.ClusterExemplarProto.class, org.tribuo.clustering.hdbscan.protos.ClusterExemplarProto.Builder.class);
  }

  public static final int LABEL_FIELD_NUMBER = 1;
  private int label_;
  /**
   * <code>int32 label = 1;</code>
   * @return The label.
   */
  @java.lang.Override
  public int getLabel() {
    return label_;
  }

  public static final int OUTLIER_SCORE_FIELD_NUMBER = 2;
  private double outlierScore_;
  /**
   * <code>double outlier_score = 2;</code>
   * @return The outlierScore.
   */
  @java.lang.Override
  public double getOutlierScore() {
    return outlierScore_;
  }

  public static final int FEATURES_FIELD_NUMBER = 3;
  private org.tribuo.math.protos.TensorProto features_;
  /**
   * <code>.tribuo.math.TensorProto features = 3;</code>
   * @return Whether the features field is set.
   */
  @java.lang.Override
  public boolean hasFeatures() {
    return features_ != null;
  }
  /**
   * <code>.tribuo.math.TensorProto features = 3;</code>
   * @return The features.
   */
  @java.lang.Override
  public org.tribuo.math.protos.TensorProto getFeatures() {
    return features_ == null ? org.tribuo.math.protos.TensorProto.getDefaultInstance() : features_;
  }
  /**
   * <code>.tribuo.math.TensorProto features = 3;</code>
   */
  @java.lang.Override
  public org.tribuo.math.protos.TensorProtoOrBuilder getFeaturesOrBuilder() {
    return getFeatures();
  }

  public static final int MAX_DIST_TO_EDGE_FIELD_NUMBER = 4;
  private double maxDistToEdge_;
  /**
   * <code>double max_dist_to_edge = 4;</code>
   * @return The maxDistToEdge.
   */
  @java.lang.Override
  public double getMaxDistToEdge() {
    return maxDistToEdge_;
  }

  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 {
    if (label_ != 0) {
      output.writeInt32(1, label_);
    }
    if (java.lang.Double.doubleToRawLongBits(outlierScore_) != 0) {
      output.writeDouble(2, outlierScore_);
    }
    if (features_ != null) {
      output.writeMessage(3, getFeatures());
    }
    if (java.lang.Double.doubleToRawLongBits(maxDistToEdge_) != 0) {
      output.writeDouble(4, maxDistToEdge_);
    }
    unknownFields.writeTo(output);
  }

  @java.lang.Override
  public int getSerializedSize() {
    int size = memoizedSize;
    if (size != -1) return size;

    size = 0;
    if (label_ != 0) {
      size += com.google.protobuf.CodedOutputStream
        .computeInt32Size(1, label_);
    }
    if (java.lang.Double.doubleToRawLongBits(outlierScore_) != 0) {
      size += com.google.protobuf.CodedOutputStream
        .computeDoubleSize(2, outlierScore_);
    }
    if (features_ != null) {
      size += com.google.protobuf.CodedOutputStream
        .computeMessageSize(3, getFeatures());
    }
    if (java.lang.Double.doubleToRawLongBits(maxDistToEdge_) != 0) {
      size += com.google.protobuf.CodedOutputStream
        .computeDoubleSize(4, maxDistToEdge_);
    }
    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 org.tribuo.clustering.hdbscan.protos.ClusterExemplarProto)) {
      return super.equals(obj);
    }
    org.tribuo.clustering.hdbscan.protos.ClusterExemplarProto other = (org.tribuo.clustering.hdbscan.protos.ClusterExemplarProto) obj;

    if (getLabel()
        != other.getLabel()) return false;
    if (java.lang.Double.doubleToLongBits(getOutlierScore())
        != java.lang.Double.doubleToLongBits(
            other.getOutlierScore())) return false;
    if (hasFeatures() != other.hasFeatures()) return false;
    if (hasFeatures()) {
      if (!getFeatures()
          .equals(other.getFeatures())) return false;
    }
    if (java.lang.Double.doubleToLongBits(getMaxDistToEdge())
        != java.lang.Double.doubleToLongBits(
            other.getMaxDistToEdge())) 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) + LABEL_FIELD_NUMBER;
    hash = (53 * hash) + getLabel();
    hash = (37 * hash) + OUTLIER_SCORE_FIELD_NUMBER;
    hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
        java.lang.Double.doubleToLongBits(getOutlierScore()));
    if (hasFeatures()) {
      hash = (37 * hash) + FEATURES_FIELD_NUMBER;
      hash = (53 * hash) + getFeatures().hashCode();
    }
    hash = (37 * hash) + MAX_DIST_TO_EDGE_FIELD_NUMBER;
    hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
        java.lang.Double.doubleToLongBits(getMaxDistToEdge()));
    hash = (29 * hash) + unknownFields.hashCode();
    memoizedHashCode = hash;
    return hash;
  }

  public static org.tribuo.clustering.hdbscan.protos.ClusterExemplarProto parseFrom(
      java.nio.ByteBuffer data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static org.tribuo.clustering.hdbscan.protos.ClusterExemplarProto parseFrom(
      java.nio.ByteBuffer data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }
  public static org.tribuo.clustering.hdbscan.protos.ClusterExemplarProto parseFrom(
      com.google.protobuf.ByteString data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static org.tribuo.clustering.hdbscan.protos.ClusterExemplarProto parseFrom(
      com.google.protobuf.ByteString data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }
  public static org.tribuo.clustering.hdbscan.protos.ClusterExemplarProto parseFrom(byte[] data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static org.tribuo.clustering.hdbscan.protos.ClusterExemplarProto parseFrom(
      byte[] data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }
  public static org.tribuo.clustering.hdbscan.protos.ClusterExemplarProto parseFrom(java.io.InputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseWithIOException(PARSER, input);
  }
  public static org.tribuo.clustering.hdbscan.protos.ClusterExemplarProto 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 org.tribuo.clustering.hdbscan.protos.ClusterExemplarProto parseDelimitedFrom(java.io.InputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseDelimitedWithIOException(PARSER, input);
  }
  public static org.tribuo.clustering.hdbscan.protos.ClusterExemplarProto 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 org.tribuo.clustering.hdbscan.protos.ClusterExemplarProto parseFrom(
      com.google.protobuf.CodedInputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseWithIOException(PARSER, input);
  }
  public static org.tribuo.clustering.hdbscan.protos.ClusterExemplarProto 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(org.tribuo.clustering.hdbscan.protos.ClusterExemplarProto 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;
  }
  /**
   * <pre>
   *HdbscanTrainer.ClusterExemplar proto
   * </pre>
   *
   * Protobuf type {@code tribuo.clustering.hdbscan.ClusterExemplarProto}
   */
  public static final class Builder extends
      com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
      // @@protoc_insertion_point(builder_implements:tribuo.clustering.hdbscan.ClusterExemplarProto)
      org.tribuo.clustering.hdbscan.protos.ClusterExemplarProtoOrBuilder {
    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return org.tribuo.clustering.hdbscan.protos.TribuoClusteringHdbscan.internal_static_tribuo_clustering_hdbscan_ClusterExemplarProto_descriptor;
    }

    @java.lang.Override
    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return org.tribuo.clustering.hdbscan.protos.TribuoClusteringHdbscan.internal_static_tribuo_clustering_hdbscan_ClusterExemplarProto_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              org.tribuo.clustering.hdbscan.protos.ClusterExemplarProto.class, org.tribuo.clustering.hdbscan.protos.ClusterExemplarProto.Builder.class);
    }

    // Construct using org.tribuo.clustering.hdbscan.protos.ClusterExemplarProto.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();
      label_ = 0;

      outlierScore_ = 0D;

      if (featuresBuilder_ == null) {
        features_ = null;
      } else {
        features_ = null;
        featuresBuilder_ = null;
      }
      maxDistToEdge_ = 0D;

      return this;
    }

    @java.lang.Override
    public com.google.protobuf.Descriptors.Descriptor
        getDescriptorForType() {
      return org.tribuo.clustering.hdbscan.protos.TribuoClusteringHdbscan.internal_static_tribuo_clustering_hdbscan_ClusterExemplarProto_descriptor;
    }

    @java.lang.Override
    public org.tribuo.clustering.hdbscan.protos.ClusterExemplarProto getDefaultInstanceForType() {
      return org.tribuo.clustering.hdbscan.protos.ClusterExemplarProto.getDefaultInstance();
    }

    @java.lang.Override
    public org.tribuo.clustering.hdbscan.protos.ClusterExemplarProto build() {
      org.tribuo.clustering.hdbscan.protos.ClusterExemplarProto result = buildPartial();
      if (!result.isInitialized()) {
        throw newUninitializedMessageException(result);
      }
      return result;
    }

    @java.lang.Override
    public org.tribuo.clustering.hdbscan.protos.ClusterExemplarProto buildPartial() {
      org.tribuo.clustering.hdbscan.protos.ClusterExemplarProto result = new org.tribuo.clustering.hdbscan.protos.ClusterExemplarProto(this);
      result.label_ = label_;
      result.outlierScore_ = outlierScore_;
      if (featuresBuilder_ == null) {
        result.features_ = features_;
      } else {
        result.features_ = featuresBuilder_.build();
      }
      result.maxDistToEdge_ = maxDistToEdge_;
      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 org.tribuo.clustering.hdbscan.protos.ClusterExemplarProto) {
        return mergeFrom((org.tribuo.clustering.hdbscan.protos.ClusterExemplarProto)other);
      } else {
        super.mergeFrom(other);
        return this;
      }
    }

    public Builder mergeFrom(org.tribuo.clustering.hdbscan.protos.ClusterExemplarProto other) {
      if (other == org.tribuo.clustering.hdbscan.protos.ClusterExemplarProto.getDefaultInstance()) return this;
      if (other.getLabel() != 0) {
        setLabel(other.getLabel());
      }
      if (other.getOutlierScore() != 0D) {
        setOutlierScore(other.getOutlierScore());
      }
      if (other.hasFeatures()) {
        mergeFeatures(other.getFeatures());
      }
      if (other.getMaxDistToEdge() != 0D) {
        setMaxDistToEdge(other.getMaxDistToEdge());
      }
      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 {
      org.tribuo.clustering.hdbscan.protos.ClusterExemplarProto parsedMessage = null;
      try {
        parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        parsedMessage = (org.tribuo.clustering.hdbscan.protos.ClusterExemplarProto) e.getUnfinishedMessage();
        throw e.unwrapIOException();
      } finally {
        if (parsedMessage != null) {
          mergeFrom(parsedMessage);
        }
      }
      return this;
    }

    private int label_ ;
    /**
     * <code>int32 label = 1;</code>
     * @return The label.
     */
    @java.lang.Override
    public int getLabel() {
      return label_;
    }
    /**
     * <code>int32 label = 1;</code>
     * @param value The label to set.
     * @return This builder for chaining.
     */
    public Builder setLabel(int value) {
      
      label_ = value;
      onChanged();
      return this;
    }
    /**
     * <code>int32 label = 1;</code>
     * @return This builder for chaining.
     */
    public Builder clearLabel() {
      
      label_ = 0;
      onChanged();
      return this;
    }

    private double outlierScore_ ;
    /**
     * <code>double outlier_score = 2;</code>
     * @return The outlierScore.
     */
    @java.lang.Override
    public double getOutlierScore() {
      return outlierScore_;
    }
    /**
     * <code>double outlier_score = 2;</code>
     * @param value The outlierScore to set.
     * @return This builder for chaining.
     */
    public Builder setOutlierScore(double value) {
      
      outlierScore_ = value;
      onChanged();
      return this;
    }
    /**
     * <code>double outlier_score = 2;</code>
     * @return This builder for chaining.
     */
    public Builder clearOutlierScore() {
      
      outlierScore_ = 0D;
      onChanged();
      return this;
    }

    private org.tribuo.math.protos.TensorProto features_;
    private com.google.protobuf.SingleFieldBuilderV3<
        org.tribuo.math.protos.TensorProto, org.tribuo.math.protos.TensorProto.Builder, org.tribuo.math.protos.TensorProtoOrBuilder> featuresBuilder_;
    /**
     * <code>.tribuo.math.TensorProto features = 3;</code>
     * @return Whether the features field is set.
     */
    public boolean hasFeatures() {
      return featuresBuilder_ != null || features_ != null;
    }
    /**
     * <code>.tribuo.math.TensorProto features = 3;</code>
     * @return The features.
     */
    public org.tribuo.math.protos.TensorProto getFeatures() {
      if (featuresBuilder_ == null) {
        return features_ == null ? org.tribuo.math.protos.TensorProto.getDefaultInstance() : features_;
      } else {
        return featuresBuilder_.getMessage();
      }
    }
    /**
     * <code>.tribuo.math.TensorProto features = 3;</code>
     */
    public Builder setFeatures(org.tribuo.math.protos.TensorProto value) {
      if (featuresBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        features_ = value;
        onChanged();
      } else {
        featuresBuilder_.setMessage(value);
      }

      return this;
    }
    /**
     * <code>.tribuo.math.TensorProto features = 3;</code>
     */
    public Builder setFeatures(
        org.tribuo.math.protos.TensorProto.Builder builderForValue) {
      if (featuresBuilder_ == null) {
        features_ = builderForValue.build();
        onChanged();
      } else {
        featuresBuilder_.setMessage(builderForValue.build());
      }

      return this;
    }
    /**
     * <code>.tribuo.math.TensorProto features = 3;</code>
     */
    public Builder mergeFeatures(org.tribuo.math.protos.TensorProto value) {
      if (featuresBuilder_ == null) {
        if (features_ != null) {
          features_ =
            org.tribuo.math.protos.TensorProto.newBuilder(features_).mergeFrom(value).buildPartial();
        } else {
          features_ = value;
        }
        onChanged();
      } else {
        featuresBuilder_.mergeFrom(value);
      }

      return this;
    }
    /**
     * <code>.tribuo.math.TensorProto features = 3;</code>
     */
    public Builder clearFeatures() {
      if (featuresBuilder_ == null) {
        features_ = null;
        onChanged();
      } else {
        features_ = null;
        featuresBuilder_ = null;
      }

      return this;
    }
    /**
     * <code>.tribuo.math.TensorProto features = 3;</code>
     */
    public org.tribuo.math.protos.TensorProto.Builder getFeaturesBuilder() {
      
      onChanged();
      return getFeaturesFieldBuilder().getBuilder();
    }
    /**
     * <code>.tribuo.math.TensorProto features = 3;</code>
     */
    public org.tribuo.math.protos.TensorProtoOrBuilder getFeaturesOrBuilder() {
      if (featuresBuilder_ != null) {
        return featuresBuilder_.getMessageOrBuilder();
      } else {
        return features_ == null ?
            org.tribuo.math.protos.TensorProto.getDefaultInstance() : features_;
      }
    }
    /**
     * <code>.tribuo.math.TensorProto features = 3;</code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
        org.tribuo.math.protos.TensorProto, org.tribuo.math.protos.TensorProto.Builder, org.tribuo.math.protos.TensorProtoOrBuilder> 
        getFeaturesFieldBuilder() {
      if (featuresBuilder_ == null) {
        featuresBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
            org.tribuo.math.protos.TensorProto, org.tribuo.math.protos.TensorProto.Builder, org.tribuo.math.protos.TensorProtoOrBuilder>(
                getFeatures(),
                getParentForChildren(),
                isClean());
        features_ = null;
      }
      return featuresBuilder_;
    }

    private double maxDistToEdge_ ;
    /**
     * <code>double max_dist_to_edge = 4;</code>
     * @return The maxDistToEdge.
     */
    @java.lang.Override
    public double getMaxDistToEdge() {
      return maxDistToEdge_;
    }
    /**
     * <code>double max_dist_to_edge = 4;</code>
     * @param value The maxDistToEdge to set.
     * @return This builder for chaining.
     */
    public Builder setMaxDistToEdge(double value) {
      
      maxDistToEdge_ = value;
      onChanged();
      return this;
    }
    /**
     * <code>double max_dist_to_edge = 4;</code>
     * @return This builder for chaining.
     */
    public Builder clearMaxDistToEdge() {
      
      maxDistToEdge_ = 0D;
      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:tribuo.clustering.hdbscan.ClusterExemplarProto)
  }

  // @@protoc_insertion_point(class_scope:tribuo.clustering.hdbscan.ClusterExemplarProto)
  private static final org.tribuo.clustering.hdbscan.protos.ClusterExemplarProto DEFAULT_INSTANCE;
  static {
    DEFAULT_INSTANCE = new org.tribuo.clustering.hdbscan.protos.ClusterExemplarProto();
  }

  public static org.tribuo.clustering.hdbscan.protos.ClusterExemplarProto getDefaultInstance() {
    return DEFAULT_INSTANCE;
  }

  private static final com.google.protobuf.Parser<ClusterExemplarProto>
      PARSER = new com.google.protobuf.AbstractParser<ClusterExemplarProto>() {
    @java.lang.Override
    public ClusterExemplarProto parsePartialFrom(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return new ClusterExemplarProto(input, extensionRegistry);
    }
  };

  public static com.google.protobuf.Parser<ClusterExemplarProto> parser() {
    return PARSER;
  }

  @java.lang.Override
  public com.google.protobuf.Parser<ClusterExemplarProto> getParserForType() {
    return PARSER;
  }

  @java.lang.Override
  public org.tribuo.clustering.hdbscan.protos.ClusterExemplarProto getDefaultInstanceForType() {
    return DEFAULT_INSTANCE;
  }

}

