
org.tensorflow.framework.TreeMetadata Maven / Gradle / Ivy
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: tensorflow/core/kernels/boosted_trees/boosted_trees.proto
package org.tensorflow.framework;
/**
* Protobuf type {@code tensorflow.boosted_trees.TreeMetadata}
*/
public final class TreeMetadata extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:tensorflow.boosted_trees.TreeMetadata)
TreeMetadataOrBuilder {
private static final long serialVersionUID = 0L;
// Use TreeMetadata.newBuilder() to construct.
private TreeMetadata(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private TreeMetadata() {
numLayersGrown_ = 0;
isFinalized_ = false;
postPrunedNodesMeta_ = java.util.Collections.emptyList();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private TreeMetadata(
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 16: {
numLayersGrown_ = input.readInt32();
break;
}
case 24: {
isFinalized_ = input.readBool();
break;
}
case 34: {
if (!((mutable_bitField0_ & 0x00000004) == 0x00000004)) {
postPrunedNodesMeta_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000004;
}
postPrunedNodesMeta_.add(
input.readMessage(org.tensorflow.framework.TreeMetadata.PostPruneNodeUpdate.parser(), extensionRegistry));
break;
}
default: {
if (!parseUnknownFieldProto3(
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 {
if (((mutable_bitField0_ & 0x00000004) == 0x00000004)) {
postPrunedNodesMeta_ = java.util.Collections.unmodifiableList(postPrunedNodesMeta_);
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.tensorflow.framework.BoostedTreesProtos.internal_static_tensorflow_boosted_trees_TreeMetadata_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.tensorflow.framework.BoostedTreesProtos.internal_static_tensorflow_boosted_trees_TreeMetadata_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.tensorflow.framework.TreeMetadata.class, org.tensorflow.framework.TreeMetadata.Builder.class);
}
public interface PostPruneNodeUpdateOrBuilder extends
// @@protoc_insertion_point(interface_extends:tensorflow.boosted_trees.TreeMetadata.PostPruneNodeUpdate)
com.google.protobuf.MessageOrBuilder {
/**
* int32 new_node_id = 1;
*/
int getNewNodeId();
/**
* float logit_change = 2;
*/
float getLogitChange();
}
/**
* Protobuf type {@code tensorflow.boosted_trees.TreeMetadata.PostPruneNodeUpdate}
*/
public static final class PostPruneNodeUpdate extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:tensorflow.boosted_trees.TreeMetadata.PostPruneNodeUpdate)
PostPruneNodeUpdateOrBuilder {
private static final long serialVersionUID = 0L;
// Use PostPruneNodeUpdate.newBuilder() to construct.
private PostPruneNodeUpdate(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private PostPruneNodeUpdate() {
newNodeId_ = 0;
logitChange_ = 0F;
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private PostPruneNodeUpdate(
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: {
newNodeId_ = input.readInt32();
break;
}
case 21: {
logitChange_ = input.readFloat();
break;
}
default: {
if (!parseUnknownFieldProto3(
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.tensorflow.framework.BoostedTreesProtos.internal_static_tensorflow_boosted_trees_TreeMetadata_PostPruneNodeUpdate_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.tensorflow.framework.BoostedTreesProtos.internal_static_tensorflow_boosted_trees_TreeMetadata_PostPruneNodeUpdate_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.tensorflow.framework.TreeMetadata.PostPruneNodeUpdate.class, org.tensorflow.framework.TreeMetadata.PostPruneNodeUpdate.Builder.class);
}
public static final int NEW_NODE_ID_FIELD_NUMBER = 1;
private int newNodeId_;
/**
* int32 new_node_id = 1;
*/
public int getNewNodeId() {
return newNodeId_;
}
public static final int LOGIT_CHANGE_FIELD_NUMBER = 2;
private float logitChange_;
/**
* float logit_change = 2;
*/
public float getLogitChange() {
return logitChange_;
}
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 (newNodeId_ != 0) {
output.writeInt32(1, newNodeId_);
}
if (logitChange_ != 0F) {
output.writeFloat(2, logitChange_);
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (newNodeId_ != 0) {
size += com.google.protobuf.CodedOutputStream
.computeInt32Size(1, newNodeId_);
}
if (logitChange_ != 0F) {
size += com.google.protobuf.CodedOutputStream
.computeFloatSize(2, logitChange_);
}
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.tensorflow.framework.TreeMetadata.PostPruneNodeUpdate)) {
return super.equals(obj);
}
org.tensorflow.framework.TreeMetadata.PostPruneNodeUpdate other = (org.tensorflow.framework.TreeMetadata.PostPruneNodeUpdate) obj;
boolean result = true;
result = result && (getNewNodeId()
== other.getNewNodeId());
result = result && (
java.lang.Float.floatToIntBits(getLogitChange())
== java.lang.Float.floatToIntBits(
other.getLogitChange()));
result = result && unknownFields.equals(other.unknownFields);
return result;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + NEW_NODE_ID_FIELD_NUMBER;
hash = (53 * hash) + getNewNodeId();
hash = (37 * hash) + LOGIT_CHANGE_FIELD_NUMBER;
hash = (53 * hash) + java.lang.Float.floatToIntBits(
getLogitChange());
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static org.tensorflow.framework.TreeMetadata.PostPruneNodeUpdate parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.tensorflow.framework.TreeMetadata.PostPruneNodeUpdate parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.tensorflow.framework.TreeMetadata.PostPruneNodeUpdate parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.tensorflow.framework.TreeMetadata.PostPruneNodeUpdate parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.tensorflow.framework.TreeMetadata.PostPruneNodeUpdate parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.tensorflow.framework.TreeMetadata.PostPruneNodeUpdate parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.tensorflow.framework.TreeMetadata.PostPruneNodeUpdate parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.tensorflow.framework.TreeMetadata.PostPruneNodeUpdate 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.tensorflow.framework.TreeMetadata.PostPruneNodeUpdate parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static org.tensorflow.framework.TreeMetadata.PostPruneNodeUpdate 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.tensorflow.framework.TreeMetadata.PostPruneNodeUpdate parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.tensorflow.framework.TreeMetadata.PostPruneNodeUpdate 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.tensorflow.framework.TreeMetadata.PostPruneNodeUpdate 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;
}
/**
* Protobuf type {@code tensorflow.boosted_trees.TreeMetadata.PostPruneNodeUpdate}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:tensorflow.boosted_trees.TreeMetadata.PostPruneNodeUpdate)
org.tensorflow.framework.TreeMetadata.PostPruneNodeUpdateOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.tensorflow.framework.BoostedTreesProtos.internal_static_tensorflow_boosted_trees_TreeMetadata_PostPruneNodeUpdate_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.tensorflow.framework.BoostedTreesProtos.internal_static_tensorflow_boosted_trees_TreeMetadata_PostPruneNodeUpdate_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.tensorflow.framework.TreeMetadata.PostPruneNodeUpdate.class, org.tensorflow.framework.TreeMetadata.PostPruneNodeUpdate.Builder.class);
}
// Construct using org.tensorflow.framework.TreeMetadata.PostPruneNodeUpdate.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();
newNodeId_ = 0;
logitChange_ = 0F;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return org.tensorflow.framework.BoostedTreesProtos.internal_static_tensorflow_boosted_trees_TreeMetadata_PostPruneNodeUpdate_descriptor;
}
@java.lang.Override
public org.tensorflow.framework.TreeMetadata.PostPruneNodeUpdate getDefaultInstanceForType() {
return org.tensorflow.framework.TreeMetadata.PostPruneNodeUpdate.getDefaultInstance();
}
@java.lang.Override
public org.tensorflow.framework.TreeMetadata.PostPruneNodeUpdate build() {
org.tensorflow.framework.TreeMetadata.PostPruneNodeUpdate result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public org.tensorflow.framework.TreeMetadata.PostPruneNodeUpdate buildPartial() {
org.tensorflow.framework.TreeMetadata.PostPruneNodeUpdate result = new org.tensorflow.framework.TreeMetadata.PostPruneNodeUpdate(this);
result.newNodeId_ = newNodeId_;
result.logitChange_ = logitChange_;
onBuilt();
return result;
}
@java.lang.Override
public Builder clone() {
return (Builder) super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return (Builder) super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return (Builder) super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return (Builder) super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return (Builder) super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return (Builder) super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof org.tensorflow.framework.TreeMetadata.PostPruneNodeUpdate) {
return mergeFrom((org.tensorflow.framework.TreeMetadata.PostPruneNodeUpdate)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(org.tensorflow.framework.TreeMetadata.PostPruneNodeUpdate other) {
if (other == org.tensorflow.framework.TreeMetadata.PostPruneNodeUpdate.getDefaultInstance()) return this;
if (other.getNewNodeId() != 0) {
setNewNodeId(other.getNewNodeId());
}
if (other.getLogitChange() != 0F) {
setLogitChange(other.getLogitChange());
}
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.tensorflow.framework.TreeMetadata.PostPruneNodeUpdate parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (org.tensorflow.framework.TreeMetadata.PostPruneNodeUpdate) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int newNodeId_ ;
/**
* int32 new_node_id = 1;
*/
public int getNewNodeId() {
return newNodeId_;
}
/**
* int32 new_node_id = 1;
*/
public Builder setNewNodeId(int value) {
newNodeId_ = value;
onChanged();
return this;
}
/**
* int32 new_node_id = 1;
*/
public Builder clearNewNodeId() {
newNodeId_ = 0;
onChanged();
return this;
}
private float logitChange_ ;
/**
* float logit_change = 2;
*/
public float getLogitChange() {
return logitChange_;
}
/**
* float logit_change = 2;
*/
public Builder setLogitChange(float value) {
logitChange_ = value;
onChanged();
return this;
}
/**
* float logit_change = 2;
*/
public Builder clearLogitChange() {
logitChange_ = 0F;
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFieldsProto3(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:tensorflow.boosted_trees.TreeMetadata.PostPruneNodeUpdate)
}
// @@protoc_insertion_point(class_scope:tensorflow.boosted_trees.TreeMetadata.PostPruneNodeUpdate)
private static final org.tensorflow.framework.TreeMetadata.PostPruneNodeUpdate DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new org.tensorflow.framework.TreeMetadata.PostPruneNodeUpdate();
}
public static org.tensorflow.framework.TreeMetadata.PostPruneNodeUpdate getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public PostPruneNodeUpdate parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new PostPruneNodeUpdate(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 org.tensorflow.framework.TreeMetadata.PostPruneNodeUpdate getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
private int bitField0_;
public static final int NUM_LAYERS_GROWN_FIELD_NUMBER = 2;
private int numLayersGrown_;
/**
*
* Number of layers grown for this tree.
*
*
* int32 num_layers_grown = 2;
*/
public int getNumLayersGrown() {
return numLayersGrown_;
}
public static final int IS_FINALIZED_FIELD_NUMBER = 3;
private boolean isFinalized_;
/**
*
* Whether the tree is finalized in that no more layers can be grown.
*
*
* bool is_finalized = 3;
*/
public boolean getIsFinalized() {
return isFinalized_;
}
public static final int POST_PRUNED_NODES_META_FIELD_NUMBER = 4;
private java.util.List postPrunedNodesMeta_;
/**
*
* If tree was finalized and post pruning happened, it is possible that cache
* still refers to some nodes that were deleted or that the node ids changed
* (e.g. node id 5 became node id 2 due to pruning of the other branch).
* The mapping below allows us to understand where the old ids now map to and
* how the values should be adjusted due to post-pruning.
* The size of the list should be equal to the number of nodes in the tree
* before post-pruning happened.
* If the node was pruned, it will have new_node_id equal to the id of a node
* that this node was collapsed into. For a node that didn't get pruned, it is
* possible that its id still changed, so new_node_id will have the
* corresponding id in the pruned tree.
* If post-pruning didn't happen, or it did and it had no effect (e.g. no
* nodes got pruned), this list will be empty.
*
*
* repeated .tensorflow.boosted_trees.TreeMetadata.PostPruneNodeUpdate post_pruned_nodes_meta = 4;
*/
public java.util.List getPostPrunedNodesMetaList() {
return postPrunedNodesMeta_;
}
/**
*
* If tree was finalized and post pruning happened, it is possible that cache
* still refers to some nodes that were deleted or that the node ids changed
* (e.g. node id 5 became node id 2 due to pruning of the other branch).
* The mapping below allows us to understand where the old ids now map to and
* how the values should be adjusted due to post-pruning.
* The size of the list should be equal to the number of nodes in the tree
* before post-pruning happened.
* If the node was pruned, it will have new_node_id equal to the id of a node
* that this node was collapsed into. For a node that didn't get pruned, it is
* possible that its id still changed, so new_node_id will have the
* corresponding id in the pruned tree.
* If post-pruning didn't happen, or it did and it had no effect (e.g. no
* nodes got pruned), this list will be empty.
*
*
* repeated .tensorflow.boosted_trees.TreeMetadata.PostPruneNodeUpdate post_pruned_nodes_meta = 4;
*/
public java.util.List extends org.tensorflow.framework.TreeMetadata.PostPruneNodeUpdateOrBuilder>
getPostPrunedNodesMetaOrBuilderList() {
return postPrunedNodesMeta_;
}
/**
*
* If tree was finalized and post pruning happened, it is possible that cache
* still refers to some nodes that were deleted or that the node ids changed
* (e.g. node id 5 became node id 2 due to pruning of the other branch).
* The mapping below allows us to understand where the old ids now map to and
* how the values should be adjusted due to post-pruning.
* The size of the list should be equal to the number of nodes in the tree
* before post-pruning happened.
* If the node was pruned, it will have new_node_id equal to the id of a node
* that this node was collapsed into. For a node that didn't get pruned, it is
* possible that its id still changed, so new_node_id will have the
* corresponding id in the pruned tree.
* If post-pruning didn't happen, or it did and it had no effect (e.g. no
* nodes got pruned), this list will be empty.
*
*
* repeated .tensorflow.boosted_trees.TreeMetadata.PostPruneNodeUpdate post_pruned_nodes_meta = 4;
*/
public int getPostPrunedNodesMetaCount() {
return postPrunedNodesMeta_.size();
}
/**
*
* If tree was finalized and post pruning happened, it is possible that cache
* still refers to some nodes that were deleted or that the node ids changed
* (e.g. node id 5 became node id 2 due to pruning of the other branch).
* The mapping below allows us to understand where the old ids now map to and
* how the values should be adjusted due to post-pruning.
* The size of the list should be equal to the number of nodes in the tree
* before post-pruning happened.
* If the node was pruned, it will have new_node_id equal to the id of a node
* that this node was collapsed into. For a node that didn't get pruned, it is
* possible that its id still changed, so new_node_id will have the
* corresponding id in the pruned tree.
* If post-pruning didn't happen, or it did and it had no effect (e.g. no
* nodes got pruned), this list will be empty.
*
*
* repeated .tensorflow.boosted_trees.TreeMetadata.PostPruneNodeUpdate post_pruned_nodes_meta = 4;
*/
public org.tensorflow.framework.TreeMetadata.PostPruneNodeUpdate getPostPrunedNodesMeta(int index) {
return postPrunedNodesMeta_.get(index);
}
/**
*
* If tree was finalized and post pruning happened, it is possible that cache
* still refers to some nodes that were deleted or that the node ids changed
* (e.g. node id 5 became node id 2 due to pruning of the other branch).
* The mapping below allows us to understand where the old ids now map to and
* how the values should be adjusted due to post-pruning.
* The size of the list should be equal to the number of nodes in the tree
* before post-pruning happened.
* If the node was pruned, it will have new_node_id equal to the id of a node
* that this node was collapsed into. For a node that didn't get pruned, it is
* possible that its id still changed, so new_node_id will have the
* corresponding id in the pruned tree.
* If post-pruning didn't happen, or it did and it had no effect (e.g. no
* nodes got pruned), this list will be empty.
*
*
* repeated .tensorflow.boosted_trees.TreeMetadata.PostPruneNodeUpdate post_pruned_nodes_meta = 4;
*/
public org.tensorflow.framework.TreeMetadata.PostPruneNodeUpdateOrBuilder getPostPrunedNodesMetaOrBuilder(
int index) {
return postPrunedNodesMeta_.get(index);
}
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 (numLayersGrown_ != 0) {
output.writeInt32(2, numLayersGrown_);
}
if (isFinalized_ != false) {
output.writeBool(3, isFinalized_);
}
for (int i = 0; i < postPrunedNodesMeta_.size(); i++) {
output.writeMessage(4, postPrunedNodesMeta_.get(i));
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (numLayersGrown_ != 0) {
size += com.google.protobuf.CodedOutputStream
.computeInt32Size(2, numLayersGrown_);
}
if (isFinalized_ != false) {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(3, isFinalized_);
}
for (int i = 0; i < postPrunedNodesMeta_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(4, postPrunedNodesMeta_.get(i));
}
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.tensorflow.framework.TreeMetadata)) {
return super.equals(obj);
}
org.tensorflow.framework.TreeMetadata other = (org.tensorflow.framework.TreeMetadata) obj;
boolean result = true;
result = result && (getNumLayersGrown()
== other.getNumLayersGrown());
result = result && (getIsFinalized()
== other.getIsFinalized());
result = result && getPostPrunedNodesMetaList()
.equals(other.getPostPrunedNodesMetaList());
result = result && unknownFields.equals(other.unknownFields);
return result;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + NUM_LAYERS_GROWN_FIELD_NUMBER;
hash = (53 * hash) + getNumLayersGrown();
hash = (37 * hash) + IS_FINALIZED_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
getIsFinalized());
if (getPostPrunedNodesMetaCount() > 0) {
hash = (37 * hash) + POST_PRUNED_NODES_META_FIELD_NUMBER;
hash = (53 * hash) + getPostPrunedNodesMetaList().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static org.tensorflow.framework.TreeMetadata parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.tensorflow.framework.TreeMetadata parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.tensorflow.framework.TreeMetadata parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.tensorflow.framework.TreeMetadata parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.tensorflow.framework.TreeMetadata parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.tensorflow.framework.TreeMetadata parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.tensorflow.framework.TreeMetadata parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.tensorflow.framework.TreeMetadata 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.tensorflow.framework.TreeMetadata parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static org.tensorflow.framework.TreeMetadata 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.tensorflow.framework.TreeMetadata parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.tensorflow.framework.TreeMetadata 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.tensorflow.framework.TreeMetadata 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;
}
/**
* Protobuf type {@code tensorflow.boosted_trees.TreeMetadata}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:tensorflow.boosted_trees.TreeMetadata)
org.tensorflow.framework.TreeMetadataOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.tensorflow.framework.BoostedTreesProtos.internal_static_tensorflow_boosted_trees_TreeMetadata_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.tensorflow.framework.BoostedTreesProtos.internal_static_tensorflow_boosted_trees_TreeMetadata_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.tensorflow.framework.TreeMetadata.class, org.tensorflow.framework.TreeMetadata.Builder.class);
}
// Construct using org.tensorflow.framework.TreeMetadata.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
getPostPrunedNodesMetaFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
numLayersGrown_ = 0;
isFinalized_ = false;
if (postPrunedNodesMetaBuilder_ == null) {
postPrunedNodesMeta_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000004);
} else {
postPrunedNodesMetaBuilder_.clear();
}
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return org.tensorflow.framework.BoostedTreesProtos.internal_static_tensorflow_boosted_trees_TreeMetadata_descriptor;
}
@java.lang.Override
public org.tensorflow.framework.TreeMetadata getDefaultInstanceForType() {
return org.tensorflow.framework.TreeMetadata.getDefaultInstance();
}
@java.lang.Override
public org.tensorflow.framework.TreeMetadata build() {
org.tensorflow.framework.TreeMetadata result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public org.tensorflow.framework.TreeMetadata buildPartial() {
org.tensorflow.framework.TreeMetadata result = new org.tensorflow.framework.TreeMetadata(this);
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
result.numLayersGrown_ = numLayersGrown_;
result.isFinalized_ = isFinalized_;
if (postPrunedNodesMetaBuilder_ == null) {
if (((bitField0_ & 0x00000004) == 0x00000004)) {
postPrunedNodesMeta_ = java.util.Collections.unmodifiableList(postPrunedNodesMeta_);
bitField0_ = (bitField0_ & ~0x00000004);
}
result.postPrunedNodesMeta_ = postPrunedNodesMeta_;
} else {
result.postPrunedNodesMeta_ = postPrunedNodesMetaBuilder_.build();
}
result.bitField0_ = to_bitField0_;
onBuilt();
return result;
}
@java.lang.Override
public Builder clone() {
return (Builder) super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return (Builder) super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return (Builder) super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return (Builder) super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return (Builder) super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return (Builder) super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof org.tensorflow.framework.TreeMetadata) {
return mergeFrom((org.tensorflow.framework.TreeMetadata)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(org.tensorflow.framework.TreeMetadata other) {
if (other == org.tensorflow.framework.TreeMetadata.getDefaultInstance()) return this;
if (other.getNumLayersGrown() != 0) {
setNumLayersGrown(other.getNumLayersGrown());
}
if (other.getIsFinalized() != false) {
setIsFinalized(other.getIsFinalized());
}
if (postPrunedNodesMetaBuilder_ == null) {
if (!other.postPrunedNodesMeta_.isEmpty()) {
if (postPrunedNodesMeta_.isEmpty()) {
postPrunedNodesMeta_ = other.postPrunedNodesMeta_;
bitField0_ = (bitField0_ & ~0x00000004);
} else {
ensurePostPrunedNodesMetaIsMutable();
postPrunedNodesMeta_.addAll(other.postPrunedNodesMeta_);
}
onChanged();
}
} else {
if (!other.postPrunedNodesMeta_.isEmpty()) {
if (postPrunedNodesMetaBuilder_.isEmpty()) {
postPrunedNodesMetaBuilder_.dispose();
postPrunedNodesMetaBuilder_ = null;
postPrunedNodesMeta_ = other.postPrunedNodesMeta_;
bitField0_ = (bitField0_ & ~0x00000004);
postPrunedNodesMetaBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getPostPrunedNodesMetaFieldBuilder() : null;
} else {
postPrunedNodesMetaBuilder_.addAllMessages(other.postPrunedNodesMeta_);
}
}
}
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.tensorflow.framework.TreeMetadata parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (org.tensorflow.framework.TreeMetadata) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private int numLayersGrown_ ;
/**
*
* Number of layers grown for this tree.
*
*
* int32 num_layers_grown = 2;
*/
public int getNumLayersGrown() {
return numLayersGrown_;
}
/**
*
* Number of layers grown for this tree.
*
*
* int32 num_layers_grown = 2;
*/
public Builder setNumLayersGrown(int value) {
numLayersGrown_ = value;
onChanged();
return this;
}
/**
*
* Number of layers grown for this tree.
*
*
* int32 num_layers_grown = 2;
*/
public Builder clearNumLayersGrown() {
numLayersGrown_ = 0;
onChanged();
return this;
}
private boolean isFinalized_ ;
/**
*
* Whether the tree is finalized in that no more layers can be grown.
*
*
* bool is_finalized = 3;
*/
public boolean getIsFinalized() {
return isFinalized_;
}
/**
*
* Whether the tree is finalized in that no more layers can be grown.
*
*
* bool is_finalized = 3;
*/
public Builder setIsFinalized(boolean value) {
isFinalized_ = value;
onChanged();
return this;
}
/**
*
* Whether the tree is finalized in that no more layers can be grown.
*
*
* bool is_finalized = 3;
*/
public Builder clearIsFinalized() {
isFinalized_ = false;
onChanged();
return this;
}
private java.util.List postPrunedNodesMeta_ =
java.util.Collections.emptyList();
private void ensurePostPrunedNodesMetaIsMutable() {
if (!((bitField0_ & 0x00000004) == 0x00000004)) {
postPrunedNodesMeta_ = new java.util.ArrayList(postPrunedNodesMeta_);
bitField0_ |= 0x00000004;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
org.tensorflow.framework.TreeMetadata.PostPruneNodeUpdate, org.tensorflow.framework.TreeMetadata.PostPruneNodeUpdate.Builder, org.tensorflow.framework.TreeMetadata.PostPruneNodeUpdateOrBuilder> postPrunedNodesMetaBuilder_;
/**
*
* If tree was finalized and post pruning happened, it is possible that cache
* still refers to some nodes that were deleted or that the node ids changed
* (e.g. node id 5 became node id 2 due to pruning of the other branch).
* The mapping below allows us to understand where the old ids now map to and
* how the values should be adjusted due to post-pruning.
* The size of the list should be equal to the number of nodes in the tree
* before post-pruning happened.
* If the node was pruned, it will have new_node_id equal to the id of a node
* that this node was collapsed into. For a node that didn't get pruned, it is
* possible that its id still changed, so new_node_id will have the
* corresponding id in the pruned tree.
* If post-pruning didn't happen, or it did and it had no effect (e.g. no
* nodes got pruned), this list will be empty.
*
*
* repeated .tensorflow.boosted_trees.TreeMetadata.PostPruneNodeUpdate post_pruned_nodes_meta = 4;
*/
public java.util.List getPostPrunedNodesMetaList() {
if (postPrunedNodesMetaBuilder_ == null) {
return java.util.Collections.unmodifiableList(postPrunedNodesMeta_);
} else {
return postPrunedNodesMetaBuilder_.getMessageList();
}
}
/**
*
* If tree was finalized and post pruning happened, it is possible that cache
* still refers to some nodes that were deleted or that the node ids changed
* (e.g. node id 5 became node id 2 due to pruning of the other branch).
* The mapping below allows us to understand where the old ids now map to and
* how the values should be adjusted due to post-pruning.
* The size of the list should be equal to the number of nodes in the tree
* before post-pruning happened.
* If the node was pruned, it will have new_node_id equal to the id of a node
* that this node was collapsed into. For a node that didn't get pruned, it is
* possible that its id still changed, so new_node_id will have the
* corresponding id in the pruned tree.
* If post-pruning didn't happen, or it did and it had no effect (e.g. no
* nodes got pruned), this list will be empty.
*
*
* repeated .tensorflow.boosted_trees.TreeMetadata.PostPruneNodeUpdate post_pruned_nodes_meta = 4;
*/
public int getPostPrunedNodesMetaCount() {
if (postPrunedNodesMetaBuilder_ == null) {
return postPrunedNodesMeta_.size();
} else {
return postPrunedNodesMetaBuilder_.getCount();
}
}
/**
*
* If tree was finalized and post pruning happened, it is possible that cache
* still refers to some nodes that were deleted or that the node ids changed
* (e.g. node id 5 became node id 2 due to pruning of the other branch).
* The mapping below allows us to understand where the old ids now map to and
* how the values should be adjusted due to post-pruning.
* The size of the list should be equal to the number of nodes in the tree
* before post-pruning happened.
* If the node was pruned, it will have new_node_id equal to the id of a node
* that this node was collapsed into. For a node that didn't get pruned, it is
* possible that its id still changed, so new_node_id will have the
* corresponding id in the pruned tree.
* If post-pruning didn't happen, or it did and it had no effect (e.g. no
* nodes got pruned), this list will be empty.
*
*
* repeated .tensorflow.boosted_trees.TreeMetadata.PostPruneNodeUpdate post_pruned_nodes_meta = 4;
*/
public org.tensorflow.framework.TreeMetadata.PostPruneNodeUpdate getPostPrunedNodesMeta(int index) {
if (postPrunedNodesMetaBuilder_ == null) {
return postPrunedNodesMeta_.get(index);
} else {
return postPrunedNodesMetaBuilder_.getMessage(index);
}
}
/**
*
* If tree was finalized and post pruning happened, it is possible that cache
* still refers to some nodes that were deleted or that the node ids changed
* (e.g. node id 5 became node id 2 due to pruning of the other branch).
* The mapping below allows us to understand where the old ids now map to and
* how the values should be adjusted due to post-pruning.
* The size of the list should be equal to the number of nodes in the tree
* before post-pruning happened.
* If the node was pruned, it will have new_node_id equal to the id of a node
* that this node was collapsed into. For a node that didn't get pruned, it is
* possible that its id still changed, so new_node_id will have the
* corresponding id in the pruned tree.
* If post-pruning didn't happen, or it did and it had no effect (e.g. no
* nodes got pruned), this list will be empty.
*
*
* repeated .tensorflow.boosted_trees.TreeMetadata.PostPruneNodeUpdate post_pruned_nodes_meta = 4;
*/
public Builder setPostPrunedNodesMeta(
int index, org.tensorflow.framework.TreeMetadata.PostPruneNodeUpdate value) {
if (postPrunedNodesMetaBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensurePostPrunedNodesMetaIsMutable();
postPrunedNodesMeta_.set(index, value);
onChanged();
} else {
postPrunedNodesMetaBuilder_.setMessage(index, value);
}
return this;
}
/**
*
* If tree was finalized and post pruning happened, it is possible that cache
* still refers to some nodes that were deleted or that the node ids changed
* (e.g. node id 5 became node id 2 due to pruning of the other branch).
* The mapping below allows us to understand where the old ids now map to and
* how the values should be adjusted due to post-pruning.
* The size of the list should be equal to the number of nodes in the tree
* before post-pruning happened.
* If the node was pruned, it will have new_node_id equal to the id of a node
* that this node was collapsed into. For a node that didn't get pruned, it is
* possible that its id still changed, so new_node_id will have the
* corresponding id in the pruned tree.
* If post-pruning didn't happen, or it did and it had no effect (e.g. no
* nodes got pruned), this list will be empty.
*
*
* repeated .tensorflow.boosted_trees.TreeMetadata.PostPruneNodeUpdate post_pruned_nodes_meta = 4;
*/
public Builder setPostPrunedNodesMeta(
int index, org.tensorflow.framework.TreeMetadata.PostPruneNodeUpdate.Builder builderForValue) {
if (postPrunedNodesMetaBuilder_ == null) {
ensurePostPrunedNodesMetaIsMutable();
postPrunedNodesMeta_.set(index, builderForValue.build());
onChanged();
} else {
postPrunedNodesMetaBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
*
* If tree was finalized and post pruning happened, it is possible that cache
* still refers to some nodes that were deleted or that the node ids changed
* (e.g. node id 5 became node id 2 due to pruning of the other branch).
* The mapping below allows us to understand where the old ids now map to and
* how the values should be adjusted due to post-pruning.
* The size of the list should be equal to the number of nodes in the tree
* before post-pruning happened.
* If the node was pruned, it will have new_node_id equal to the id of a node
* that this node was collapsed into. For a node that didn't get pruned, it is
* possible that its id still changed, so new_node_id will have the
* corresponding id in the pruned tree.
* If post-pruning didn't happen, or it did and it had no effect (e.g. no
* nodes got pruned), this list will be empty.
*
*
* repeated .tensorflow.boosted_trees.TreeMetadata.PostPruneNodeUpdate post_pruned_nodes_meta = 4;
*/
public Builder addPostPrunedNodesMeta(org.tensorflow.framework.TreeMetadata.PostPruneNodeUpdate value) {
if (postPrunedNodesMetaBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensurePostPrunedNodesMetaIsMutable();
postPrunedNodesMeta_.add(value);
onChanged();
} else {
postPrunedNodesMetaBuilder_.addMessage(value);
}
return this;
}
/**
*
* If tree was finalized and post pruning happened, it is possible that cache
* still refers to some nodes that were deleted or that the node ids changed
* (e.g. node id 5 became node id 2 due to pruning of the other branch).
* The mapping below allows us to understand where the old ids now map to and
* how the values should be adjusted due to post-pruning.
* The size of the list should be equal to the number of nodes in the tree
* before post-pruning happened.
* If the node was pruned, it will have new_node_id equal to the id of a node
* that this node was collapsed into. For a node that didn't get pruned, it is
* possible that its id still changed, so new_node_id will have the
* corresponding id in the pruned tree.
* If post-pruning didn't happen, or it did and it had no effect (e.g. no
* nodes got pruned), this list will be empty.
*
*
* repeated .tensorflow.boosted_trees.TreeMetadata.PostPruneNodeUpdate post_pruned_nodes_meta = 4;
*/
public Builder addPostPrunedNodesMeta(
int index, org.tensorflow.framework.TreeMetadata.PostPruneNodeUpdate value) {
if (postPrunedNodesMetaBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensurePostPrunedNodesMetaIsMutable();
postPrunedNodesMeta_.add(index, value);
onChanged();
} else {
postPrunedNodesMetaBuilder_.addMessage(index, value);
}
return this;
}
/**
*
* If tree was finalized and post pruning happened, it is possible that cache
* still refers to some nodes that were deleted or that the node ids changed
* (e.g. node id 5 became node id 2 due to pruning of the other branch).
* The mapping below allows us to understand where the old ids now map to and
* how the values should be adjusted due to post-pruning.
* The size of the list should be equal to the number of nodes in the tree
* before post-pruning happened.
* If the node was pruned, it will have new_node_id equal to the id of a node
* that this node was collapsed into. For a node that didn't get pruned, it is
* possible that its id still changed, so new_node_id will have the
* corresponding id in the pruned tree.
* If post-pruning didn't happen, or it did and it had no effect (e.g. no
* nodes got pruned), this list will be empty.
*
*
* repeated .tensorflow.boosted_trees.TreeMetadata.PostPruneNodeUpdate post_pruned_nodes_meta = 4;
*/
public Builder addPostPrunedNodesMeta(
org.tensorflow.framework.TreeMetadata.PostPruneNodeUpdate.Builder builderForValue) {
if (postPrunedNodesMetaBuilder_ == null) {
ensurePostPrunedNodesMetaIsMutable();
postPrunedNodesMeta_.add(builderForValue.build());
onChanged();
} else {
postPrunedNodesMetaBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
*
* If tree was finalized and post pruning happened, it is possible that cache
* still refers to some nodes that were deleted or that the node ids changed
* (e.g. node id 5 became node id 2 due to pruning of the other branch).
* The mapping below allows us to understand where the old ids now map to and
* how the values should be adjusted due to post-pruning.
* The size of the list should be equal to the number of nodes in the tree
* before post-pruning happened.
* If the node was pruned, it will have new_node_id equal to the id of a node
* that this node was collapsed into. For a node that didn't get pruned, it is
* possible that its id still changed, so new_node_id will have the
* corresponding id in the pruned tree.
* If post-pruning didn't happen, or it did and it had no effect (e.g. no
* nodes got pruned), this list will be empty.
*
*
* repeated .tensorflow.boosted_trees.TreeMetadata.PostPruneNodeUpdate post_pruned_nodes_meta = 4;
*/
public Builder addPostPrunedNodesMeta(
int index, org.tensorflow.framework.TreeMetadata.PostPruneNodeUpdate.Builder builderForValue) {
if (postPrunedNodesMetaBuilder_ == null) {
ensurePostPrunedNodesMetaIsMutable();
postPrunedNodesMeta_.add(index, builderForValue.build());
onChanged();
} else {
postPrunedNodesMetaBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
*
* If tree was finalized and post pruning happened, it is possible that cache
* still refers to some nodes that were deleted or that the node ids changed
* (e.g. node id 5 became node id 2 due to pruning of the other branch).
* The mapping below allows us to understand where the old ids now map to and
* how the values should be adjusted due to post-pruning.
* The size of the list should be equal to the number of nodes in the tree
* before post-pruning happened.
* If the node was pruned, it will have new_node_id equal to the id of a node
* that this node was collapsed into. For a node that didn't get pruned, it is
* possible that its id still changed, so new_node_id will have the
* corresponding id in the pruned tree.
* If post-pruning didn't happen, or it did and it had no effect (e.g. no
* nodes got pruned), this list will be empty.
*
*
* repeated .tensorflow.boosted_trees.TreeMetadata.PostPruneNodeUpdate post_pruned_nodes_meta = 4;
*/
public Builder addAllPostPrunedNodesMeta(
java.lang.Iterable extends org.tensorflow.framework.TreeMetadata.PostPruneNodeUpdate> values) {
if (postPrunedNodesMetaBuilder_ == null) {
ensurePostPrunedNodesMetaIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, postPrunedNodesMeta_);
onChanged();
} else {
postPrunedNodesMetaBuilder_.addAllMessages(values);
}
return this;
}
/**
*
* If tree was finalized and post pruning happened, it is possible that cache
* still refers to some nodes that were deleted or that the node ids changed
* (e.g. node id 5 became node id 2 due to pruning of the other branch).
* The mapping below allows us to understand where the old ids now map to and
* how the values should be adjusted due to post-pruning.
* The size of the list should be equal to the number of nodes in the tree
* before post-pruning happened.
* If the node was pruned, it will have new_node_id equal to the id of a node
* that this node was collapsed into. For a node that didn't get pruned, it is
* possible that its id still changed, so new_node_id will have the
* corresponding id in the pruned tree.
* If post-pruning didn't happen, or it did and it had no effect (e.g. no
* nodes got pruned), this list will be empty.
*
*
* repeated .tensorflow.boosted_trees.TreeMetadata.PostPruneNodeUpdate post_pruned_nodes_meta = 4;
*/
public Builder clearPostPrunedNodesMeta() {
if (postPrunedNodesMetaBuilder_ == null) {
postPrunedNodesMeta_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000004);
onChanged();
} else {
postPrunedNodesMetaBuilder_.clear();
}
return this;
}
/**
*
* If tree was finalized and post pruning happened, it is possible that cache
* still refers to some nodes that were deleted or that the node ids changed
* (e.g. node id 5 became node id 2 due to pruning of the other branch).
* The mapping below allows us to understand where the old ids now map to and
* how the values should be adjusted due to post-pruning.
* The size of the list should be equal to the number of nodes in the tree
* before post-pruning happened.
* If the node was pruned, it will have new_node_id equal to the id of a node
* that this node was collapsed into. For a node that didn't get pruned, it is
* possible that its id still changed, so new_node_id will have the
* corresponding id in the pruned tree.
* If post-pruning didn't happen, or it did and it had no effect (e.g. no
* nodes got pruned), this list will be empty.
*
*
* repeated .tensorflow.boosted_trees.TreeMetadata.PostPruneNodeUpdate post_pruned_nodes_meta = 4;
*/
public Builder removePostPrunedNodesMeta(int index) {
if (postPrunedNodesMetaBuilder_ == null) {
ensurePostPrunedNodesMetaIsMutable();
postPrunedNodesMeta_.remove(index);
onChanged();
} else {
postPrunedNodesMetaBuilder_.remove(index);
}
return this;
}
/**
*
* If tree was finalized and post pruning happened, it is possible that cache
* still refers to some nodes that were deleted or that the node ids changed
* (e.g. node id 5 became node id 2 due to pruning of the other branch).
* The mapping below allows us to understand where the old ids now map to and
* how the values should be adjusted due to post-pruning.
* The size of the list should be equal to the number of nodes in the tree
* before post-pruning happened.
* If the node was pruned, it will have new_node_id equal to the id of a node
* that this node was collapsed into. For a node that didn't get pruned, it is
* possible that its id still changed, so new_node_id will have the
* corresponding id in the pruned tree.
* If post-pruning didn't happen, or it did and it had no effect (e.g. no
* nodes got pruned), this list will be empty.
*
*
* repeated .tensorflow.boosted_trees.TreeMetadata.PostPruneNodeUpdate post_pruned_nodes_meta = 4;
*/
public org.tensorflow.framework.TreeMetadata.PostPruneNodeUpdate.Builder getPostPrunedNodesMetaBuilder(
int index) {
return getPostPrunedNodesMetaFieldBuilder().getBuilder(index);
}
/**
*
* If tree was finalized and post pruning happened, it is possible that cache
* still refers to some nodes that were deleted or that the node ids changed
* (e.g. node id 5 became node id 2 due to pruning of the other branch).
* The mapping below allows us to understand where the old ids now map to and
* how the values should be adjusted due to post-pruning.
* The size of the list should be equal to the number of nodes in the tree
* before post-pruning happened.
* If the node was pruned, it will have new_node_id equal to the id of a node
* that this node was collapsed into. For a node that didn't get pruned, it is
* possible that its id still changed, so new_node_id will have the
* corresponding id in the pruned tree.
* If post-pruning didn't happen, or it did and it had no effect (e.g. no
* nodes got pruned), this list will be empty.
*
*
* repeated .tensorflow.boosted_trees.TreeMetadata.PostPruneNodeUpdate post_pruned_nodes_meta = 4;
*/
public org.tensorflow.framework.TreeMetadata.PostPruneNodeUpdateOrBuilder getPostPrunedNodesMetaOrBuilder(
int index) {
if (postPrunedNodesMetaBuilder_ == null) {
return postPrunedNodesMeta_.get(index); } else {
return postPrunedNodesMetaBuilder_.getMessageOrBuilder(index);
}
}
/**
*
* If tree was finalized and post pruning happened, it is possible that cache
* still refers to some nodes that were deleted or that the node ids changed
* (e.g. node id 5 became node id 2 due to pruning of the other branch).
* The mapping below allows us to understand where the old ids now map to and
* how the values should be adjusted due to post-pruning.
* The size of the list should be equal to the number of nodes in the tree
* before post-pruning happened.
* If the node was pruned, it will have new_node_id equal to the id of a node
* that this node was collapsed into. For a node that didn't get pruned, it is
* possible that its id still changed, so new_node_id will have the
* corresponding id in the pruned tree.
* If post-pruning didn't happen, or it did and it had no effect (e.g. no
* nodes got pruned), this list will be empty.
*
*
* repeated .tensorflow.boosted_trees.TreeMetadata.PostPruneNodeUpdate post_pruned_nodes_meta = 4;
*/
public java.util.List extends org.tensorflow.framework.TreeMetadata.PostPruneNodeUpdateOrBuilder>
getPostPrunedNodesMetaOrBuilderList() {
if (postPrunedNodesMetaBuilder_ != null) {
return postPrunedNodesMetaBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(postPrunedNodesMeta_);
}
}
/**
*
* If tree was finalized and post pruning happened, it is possible that cache
* still refers to some nodes that were deleted or that the node ids changed
* (e.g. node id 5 became node id 2 due to pruning of the other branch).
* The mapping below allows us to understand where the old ids now map to and
* how the values should be adjusted due to post-pruning.
* The size of the list should be equal to the number of nodes in the tree
* before post-pruning happened.
* If the node was pruned, it will have new_node_id equal to the id of a node
* that this node was collapsed into. For a node that didn't get pruned, it is
* possible that its id still changed, so new_node_id will have the
* corresponding id in the pruned tree.
* If post-pruning didn't happen, or it did and it had no effect (e.g. no
* nodes got pruned), this list will be empty.
*
*
* repeated .tensorflow.boosted_trees.TreeMetadata.PostPruneNodeUpdate post_pruned_nodes_meta = 4;
*/
public org.tensorflow.framework.TreeMetadata.PostPruneNodeUpdate.Builder addPostPrunedNodesMetaBuilder() {
return getPostPrunedNodesMetaFieldBuilder().addBuilder(
org.tensorflow.framework.TreeMetadata.PostPruneNodeUpdate.getDefaultInstance());
}
/**
*
* If tree was finalized and post pruning happened, it is possible that cache
* still refers to some nodes that were deleted or that the node ids changed
* (e.g. node id 5 became node id 2 due to pruning of the other branch).
* The mapping below allows us to understand where the old ids now map to and
* how the values should be adjusted due to post-pruning.
* The size of the list should be equal to the number of nodes in the tree
* before post-pruning happened.
* If the node was pruned, it will have new_node_id equal to the id of a node
* that this node was collapsed into. For a node that didn't get pruned, it is
* possible that its id still changed, so new_node_id will have the
* corresponding id in the pruned tree.
* If post-pruning didn't happen, or it did and it had no effect (e.g. no
* nodes got pruned), this list will be empty.
*
*
* repeated .tensorflow.boosted_trees.TreeMetadata.PostPruneNodeUpdate post_pruned_nodes_meta = 4;
*/
public org.tensorflow.framework.TreeMetadata.PostPruneNodeUpdate.Builder addPostPrunedNodesMetaBuilder(
int index) {
return getPostPrunedNodesMetaFieldBuilder().addBuilder(
index, org.tensorflow.framework.TreeMetadata.PostPruneNodeUpdate.getDefaultInstance());
}
/**
*
* If tree was finalized and post pruning happened, it is possible that cache
* still refers to some nodes that were deleted or that the node ids changed
* (e.g. node id 5 became node id 2 due to pruning of the other branch).
* The mapping below allows us to understand where the old ids now map to and
* how the values should be adjusted due to post-pruning.
* The size of the list should be equal to the number of nodes in the tree
* before post-pruning happened.
* If the node was pruned, it will have new_node_id equal to the id of a node
* that this node was collapsed into. For a node that didn't get pruned, it is
* possible that its id still changed, so new_node_id will have the
* corresponding id in the pruned tree.
* If post-pruning didn't happen, or it did and it had no effect (e.g. no
* nodes got pruned), this list will be empty.
*
*
* repeated .tensorflow.boosted_trees.TreeMetadata.PostPruneNodeUpdate post_pruned_nodes_meta = 4;
*/
public java.util.List
getPostPrunedNodesMetaBuilderList() {
return getPostPrunedNodesMetaFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
org.tensorflow.framework.TreeMetadata.PostPruneNodeUpdate, org.tensorflow.framework.TreeMetadata.PostPruneNodeUpdate.Builder, org.tensorflow.framework.TreeMetadata.PostPruneNodeUpdateOrBuilder>
getPostPrunedNodesMetaFieldBuilder() {
if (postPrunedNodesMetaBuilder_ == null) {
postPrunedNodesMetaBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
org.tensorflow.framework.TreeMetadata.PostPruneNodeUpdate, org.tensorflow.framework.TreeMetadata.PostPruneNodeUpdate.Builder, org.tensorflow.framework.TreeMetadata.PostPruneNodeUpdateOrBuilder>(
postPrunedNodesMeta_,
((bitField0_ & 0x00000004) == 0x00000004),
getParentForChildren(),
isClean());
postPrunedNodesMeta_ = null;
}
return postPrunedNodesMetaBuilder_;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFieldsProto3(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:tensorflow.boosted_trees.TreeMetadata)
}
// @@protoc_insertion_point(class_scope:tensorflow.boosted_trees.TreeMetadata)
private static final org.tensorflow.framework.TreeMetadata DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new org.tensorflow.framework.TreeMetadata();
}
public static org.tensorflow.framework.TreeMetadata getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public TreeMetadata parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new TreeMetadata(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 org.tensorflow.framework.TreeMetadata getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy