iterator() {
return m.values().iterator();
}
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ FeatureMap that = (FeatureMap) o;
+ return m.equals(that.m);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(m);
+ }
+
/**
* Same as the toString, but ordered by name, and with newlines.
* @return A String representation of this FeatureMap.
@@ -136,4 +160,13 @@ public boolean domainEquals(FeatureMap other) {
}
}
+ /**
+ * Deserializes a {@link FeatureDomainProto} into a {@link FeatureMap} subclass.
+ * @param proto The proto to deserialize.
+ * @return The deserialized FeatureMap.
+ */
+ public static FeatureMap deserialize(FeatureDomainProto proto) {
+ return ProtoUtil.deserialize(proto);
+ }
+
}
diff --git a/Core/src/main/java/org/tribuo/ImmutableFeatureMap.java b/Core/src/main/java/org/tribuo/ImmutableFeatureMap.java
index cf18c1c02..e0c6ae8cc 100644
--- a/Core/src/main/java/org/tribuo/ImmutableFeatureMap.java
+++ b/Core/src/main/java/org/tribuo/ImmutableFeatureMap.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015-2020, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015-2022, Oracle and/or its affiliates. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -16,6 +16,14 @@
package org.tribuo;
+import com.google.protobuf.Any;
+import com.google.protobuf.InvalidProtocolBufferException;
+import org.tribuo.protos.ProtoSerializableClass;
+import org.tribuo.protos.ProtoUtil;
+import org.tribuo.protos.core.FeatureDomainProto;
+import org.tribuo.protos.core.ImmutableFeatureMapProto;
+import org.tribuo.protos.core.VariableInfoProto;
+
import java.io.Serializable;
import java.util.HashMap;
import java.util.List;
@@ -32,9 +40,15 @@
* those features are unobserved. This is an extremely important property of {@link Feature}s,
* {@link Example}s and {@link ImmutableFeatureMap}.
*/
+@ProtoSerializableClass(version = ImmutableFeatureMap.CURRENT_VERSION, serializedDataClass = ImmutableFeatureMapProto.class)
public class ImmutableFeatureMap extends FeatureMap implements Serializable {
private static final long serialVersionUID = 1L;
+ /**
+ * Protobuf serialization version.
+ */
+ public static final int CURRENT_VERSION = 0;
+
/**
* The map from id numbers to the feature infos.
*/
@@ -83,6 +97,35 @@ protected ImmutableFeatureMap() {
idMap = new HashMap<>();
}
+ /**
+ * Deserialization factory.
+ * @param version The serialized object version.
+ * @param className The class name.
+ * @param message The serialized data.
+ */
+ public static ImmutableFeatureMap deserializeFromProto(int version, String className, Any message) throws InvalidProtocolBufferException {
+ if (version < 0 || version > CURRENT_VERSION) {
+ throw new IllegalArgumentException("Unknown version " + version + ", this class supports at most version " + CURRENT_VERSION);
+ }
+ ImmutableFeatureMapProto proto = message.unpack(ImmutableFeatureMapProto.class);
+ ImmutableFeatureMap obj = new ImmutableFeatureMap();
+ for (VariableInfoProto infoProto : proto.getInfoList()) {
+ VariableIDInfo info = ProtoUtil.deserialize(infoProto);
+ Object o = obj.idMap.put(info.getID(), info);
+ Object otherO = obj.m.put(info.getName(),info);
+ if ((o != null) || (otherO != null)) {
+ throw new IllegalStateException("Invalid protobuf, found two mappings for " + info.getName());
+ }
+ }
+ obj.size = proto.getInfoCount();
+ return obj;
+ }
+
+ @Override
+ public FeatureDomainProto serialize() {
+ return ProtoUtil.serialize(this);
+ }
+
/**
* Gets the {@link VariableIDInfo}
* for this id number. Returns null if it's unknown.
diff --git a/Core/src/main/java/org/tribuo/MutableFeatureMap.java b/Core/src/main/java/org/tribuo/MutableFeatureMap.java
index 4fbade16c..79caa69bb 100644
--- a/Core/src/main/java/org/tribuo/MutableFeatureMap.java
+++ b/Core/src/main/java/org/tribuo/MutableFeatureMap.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015-2020, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015-2022, Oracle and/or its affiliates. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -16,12 +16,30 @@
package org.tribuo;
+import com.google.protobuf.Any;
+import com.google.protobuf.InvalidProtocolBufferException;
+import org.tribuo.protos.ProtoSerializableClass;
+import org.tribuo.protos.ProtoSerializableField;
+import org.tribuo.protos.ProtoUtil;
+import org.tribuo.protos.core.FeatureDomainProto;
+import org.tribuo.protos.core.MutableFeatureMapProto;
+import org.tribuo.protos.core.VariableInfoProto;
+
+import java.util.Objects;
+
/**
* A feature map that can record new feature value observations.
*/
+@ProtoSerializableClass(version = MutableFeatureMap.CURRENT_VERSION, serializedDataClass = MutableFeatureMapProto.class)
public class MutableFeatureMap extends FeatureMap {
private static final long serialVersionUID = 2L;
+ /**
+ * Protobuf serialization version.
+ */
+ public static final int CURRENT_VERSION = 0;
+
+ @ProtoSerializableField
private final boolean convertHighCardinality;
/**
@@ -44,6 +62,33 @@ public MutableFeatureMap(boolean convertHighCardinality) {
this.convertHighCardinality = convertHighCardinality;
}
+ /**
+ * Deserialization factory.
+ * @param version The serialized object version.
+ * @param className The class name.
+ * @param message The serialized data.
+ */
+ public static MutableFeatureMap deserializeFromProto(int version, String className, Any message) throws InvalidProtocolBufferException {
+ if (version < 0 || version > CURRENT_VERSION) {
+ throw new IllegalArgumentException("Unknown version " + version + ", this class supports at most version " + CURRENT_VERSION);
+ }
+ MutableFeatureMapProto proto = message.unpack(MutableFeatureMapProto.class);
+ MutableFeatureMap obj = new MutableFeatureMap(proto.getConvertHighCardinality());
+ for (VariableInfoProto infoProto : proto.getInfoList()) {
+ VariableInfo info = ProtoUtil.deserialize(infoProto);
+ Object o = obj.put(info);
+ if (o != null) {
+ throw new IllegalStateException("Invalid protobuf, found two mappings for " + info.getName());
+ }
+ }
+ return obj;
+ }
+
+ @Override
+ public FeatureDomainProto serialize() {
+ return ProtoUtil.serialize(this);
+ }
+
/**
* Adds a variable info into the feature map.
*
@@ -82,4 +127,24 @@ public void clear() {
m.clear();
}
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ if (!super.equals(o)) {
+ return false;
+ }
+ MutableFeatureMap that = (MutableFeatureMap) o;
+ return convertHighCardinality == that.convertHighCardinality;
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(super.hashCode(), convertHighCardinality);
+ }
+
}
diff --git a/Core/src/main/java/org/tribuo/RealIDInfo.java b/Core/src/main/java/org/tribuo/RealIDInfo.java
index 441536ece..eb4a73c5a 100644
--- a/Core/src/main/java/org/tribuo/RealIDInfo.java
+++ b/Core/src/main/java/org/tribuo/RealIDInfo.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015-2020, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015-2022, Oracle and/or its affiliates. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -16,12 +16,27 @@
package org.tribuo;
+import com.google.protobuf.Any;
+import com.google.protobuf.InvalidProtocolBufferException;
+import org.tribuo.protos.ProtoSerializableClass;
+import org.tribuo.protos.ProtoSerializableField;
+import org.tribuo.protos.core.RealIDInfoProto;
+
+import java.util.Objects;
+
/**
* Same as a {@link RealInfo}, but with an additional int id field.
*/
+@ProtoSerializableClass(version = RealIDInfo.CURRENT_VERSION, serializedDataClass = RealIDInfoProto.class)
public class RealIDInfo extends RealInfo implements VariableIDInfo {
private static final long serialVersionUID = 1L;
+ /**
+ * Protobuf serialization version.
+ */
+ public static final int CURRENT_VERSION = 0;
+
+ @ProtoSerializableField
private final int id;
/**
@@ -36,6 +51,9 @@ public class RealIDInfo extends RealInfo implements VariableIDInfo {
*/
public RealIDInfo(String name, int count, double max, double min, double mean, double sumSquares, int id) {
super(name,count,max,min,mean,sumSquares);
+ if (id < 0) {
+ throw new IllegalArgumentException("Invalid id number, must be non-negative, found " + id);
+ }
this.id = id;
}
@@ -46,6 +64,9 @@ public RealIDInfo(String name, int count, double max, double min, double mean, d
*/
public RealIDInfo(RealInfo info, int id) {
super(info);
+ if (id < 0) {
+ throw new IllegalArgumentException("Invalid id number, must be non-negative, found " + id);
+ }
this.id = id;
}
@@ -59,6 +80,27 @@ private RealIDInfo(RealIDInfo info, String newName) {
this.id = info.id;
}
+ /**
+ * Deserialization factory.
+ * @param version The serialized object version.
+ * @param className The class name.
+ * @param message The serialized data.
+ */
+ public static RealIDInfo deserializeFromProto(int version, String className, Any message) throws InvalidProtocolBufferException {
+ if (version < 0 || version > CURRENT_VERSION) {
+ throw new IllegalArgumentException("Unknown version " + version + ", this class supports at most version " + CURRENT_VERSION);
+ }
+ RealIDInfoProto proto = message.unpack(RealIDInfoProto.class);
+ if (proto.getId() < 0) {
+ throw new IllegalStateException("Invalid protobuf, found no id where one was expected.");
+ }
+ RealIDInfo info = new RealIDInfo(proto.getName(),proto.getCount(),
+ proto.getMax(),proto.getMin(),
+ proto.getMean(),proto.getSumSquares(),
+ proto.getId());
+ return info;
+ }
+
@Override
public int getID() {
return id;
@@ -83,4 +125,25 @@ public RealIDInfo copy() {
public String toString() {
return String.format("RealFeature(name=%s,id=%d,count=%d,max=%f,min=%f,mean=%f,variance=%f)",name,id,count,max,min,mean,(sumSquares /(count-1)));
}
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ if (!super.equals(o)) {
+ return false;
+ }
+ RealIDInfo that = (RealIDInfo) o;
+ return id == that.id;
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(super.hashCode(), id);
+ }
+
}
diff --git a/Core/src/main/java/org/tribuo/RealInfo.java b/Core/src/main/java/org/tribuo/RealInfo.java
index 098303dde..d2b932551 100644
--- a/Core/src/main/java/org/tribuo/RealInfo.java
+++ b/Core/src/main/java/org/tribuo/RealInfo.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015-2020, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015-2022, Oracle and/or its affiliates. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -16,6 +16,15 @@
package org.tribuo;
+import com.google.protobuf.Any;
+import com.google.protobuf.InvalidProtocolBufferException;
+import org.tribuo.protos.core.RealInfoProto;
+import org.tribuo.protos.core.VariableInfoProto;
+import org.tribuo.protos.ProtoSerializableClass;
+import org.tribuo.protos.ProtoSerializableField;
+import org.tribuo.protos.ProtoUtil;
+
+import java.util.Objects;
import java.util.SplittableRandom;
/**
@@ -26,27 +35,37 @@
* Does not contain an id number, but can be transformed into {@link RealIDInfo} which
* does contain an id number.
*/
+@ProtoSerializableClass(version = RealInfo.CURRENT_VERSION, serializedDataClass = RealInfoProto.class)
public class RealInfo extends SkeletalVariableInfo {
private static final long serialVersionUID = 1L;
+ /**
+ * Protobuf serialization version.
+ */
+ public static final int CURRENT_VERSION = 0;
+
/**
* The maximum observed feature value.
*/
+ @ProtoSerializableField
protected double max = Double.NEGATIVE_INFINITY;
/**
* The minimum observed feature value.
*/
+ @ProtoSerializableField
protected double min = Double.POSITIVE_INFINITY;
/**
* The feature mean.
*/
+ @ProtoSerializableField
protected double mean = 0.0;
/**
* The sum of the squared feature values (used to compute the variance).
*/
+ @ProtoSerializableField
protected double sumSquares = 0.0;
/**
@@ -79,6 +98,18 @@ public RealInfo(String name, int count) {
*/
public RealInfo(String name, int count, double max, double min, double mean, double sumSquares) {
super(name, count);
+ if (max < min) {
+ throw new IllegalArgumentException("Invalid RealInfo, min greater than max.");
+ }
+ if (mean > max) {
+ throw new IllegalArgumentException("Invalid RealInfo, mean greater than max.");
+ }
+ if (mean < min) {
+ throw new IllegalArgumentException("Invalid RealInfo, mean less than min.");
+ }
+ if (sumSquares < 0) {
+ throw new IllegalArgumentException("Invalid RealInfo, variance must be non-negative.");
+ }
this.max = max;
this.min = min;
this.mean = mean;
@@ -106,6 +137,28 @@ protected RealInfo(RealInfo other, String newName) {
this.sumSquares = other.sumSquares;
}
+ /**
+ * Deserialization factory.
+ * @param version The serialized object version.
+ * @param className The class name.
+ * @param message The serialized data.
+ */
+ public static RealInfo deserializeFromProto(int version, String className, Any message) throws InvalidProtocolBufferException {
+ if (version < 0 || version > CURRENT_VERSION) {
+ throw new IllegalArgumentException("Unknown version " + version + ", this class supports at most version " + CURRENT_VERSION);
+ }
+ RealInfoProto proto = message.unpack(RealInfoProto.class);
+ RealInfo info = new RealInfo(proto.getName(),proto.getCount(),
+ proto.getMax(),proto.getMin(),
+ proto.getMean(),proto.getSumSquares());
+ return info;
+ }
+
+ @Override
+ public VariableInfoProto serialize() {
+ return ProtoUtil.serialize(this);
+ }
+
@Override
protected void observe(double value) {
if (value != 0.0) {
@@ -175,8 +228,29 @@ public double uniformSample(SplittableRandom rng) {
return (rng.nextDouble()*max) - min;
}
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ if (!super.equals(o)) {
+ return false;
+ }
+ RealInfo realInfo = (RealInfo) o;
+ return Double.compare(realInfo.max, max) == 0 && Double.compare(realInfo.min, min) == 0 && Double.compare(realInfo.mean, mean) == 0 && Double.compare(realInfo.sumSquares, sumSquares) == 0;
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(super.hashCode(), max, min, mean, sumSquares);
+ }
+
@Override
public String toString() {
return String.format("RealFeature(name=%s,count=%d,max=%f,min=%f,mean=%f,variance=%f)",name,count,max,min,mean,(sumSquares /(count-1)));
}
+
}
diff --git a/Core/src/main/java/org/tribuo/SkeletalVariableInfo.java b/Core/src/main/java/org/tribuo/SkeletalVariableInfo.java
index deb782d01..8204c5b22 100644
--- a/Core/src/main/java/org/tribuo/SkeletalVariableInfo.java
+++ b/Core/src/main/java/org/tribuo/SkeletalVariableInfo.java
@@ -19,6 +19,8 @@
import java.util.Objects;
import java.util.logging.Logger;
+import org.tribuo.protos.ProtoSerializableField;
+
/**
* Contains information about a feature and can be stored in the feature map
* in a {@link Dataset}.
@@ -31,11 +33,13 @@ public abstract class SkeletalVariableInfo implements VariableInfo {
/**
* The name of the feature.
*/
+ @ProtoSerializableField
protected final String name;
/**
* How often the feature occurs in the dataset.
*/
+ @ProtoSerializableField
protected int count;
/**
diff --git a/Core/src/main/java/org/tribuo/VariableInfo.java b/Core/src/main/java/org/tribuo/VariableInfo.java
index 7ecc5ec4c..1a2c4c0ab 100644
--- a/Core/src/main/java/org/tribuo/VariableInfo.java
+++ b/Core/src/main/java/org/tribuo/VariableInfo.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015-2020, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015-2022, Oracle and/or its affiliates. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -16,6 +16,9 @@
package org.tribuo;
+import org.tribuo.protos.ProtoSerializable;
+import org.tribuo.protos.core.VariableInfoProto;
+
import java.io.Serializable;
import java.util.SplittableRandom;
@@ -23,7 +26,7 @@
* A VariableInfo subclass contains information about a feature and
* its observed values.
*/
-public interface VariableInfo extends Serializable, Cloneable {
+public interface VariableInfo extends Serializable, ProtoSerializable, Cloneable {
/**
* The name of this feature.
* @return The feature name.
diff --git a/Core/src/main/java/org/tribuo/hash/HashCodeHasher.java b/Core/src/main/java/org/tribuo/hash/HashCodeHasher.java
index dd2d8b479..aa2f15fd6 100644
--- a/Core/src/main/java/org/tribuo/hash/HashCodeHasher.java
+++ b/Core/src/main/java/org/tribuo/hash/HashCodeHasher.java
@@ -16,23 +16,37 @@
package org.tribuo.hash;
+import com.google.protobuf.Any;
import com.oracle.labs.mlrg.olcut.config.Config;
import com.oracle.labs.mlrg.olcut.config.PropertyException;
import com.oracle.labs.mlrg.olcut.provenance.ConfiguredObjectProvenance;
import com.oracle.labs.mlrg.olcut.provenance.Provenance;
import com.oracle.labs.mlrg.olcut.provenance.primitives.StringProvenance;
+import org.tribuo.protos.core.HasherProto;
+import org.tribuo.protos.ProtoSerializableClass;
+import org.tribuo.protos.ProtoUtil;
import java.io.IOException;
import java.io.ObjectInputStream;
import java.util.Collections;
import java.util.Map;
+import java.util.Objects;
/**
* Hashes names using String.hashCode().
+ *
+ * HashCodeHasher does not serialize the salt in its serialized forms, and
+ * thus the salt must be set after deserialization.
*/
+@ProtoSerializableClass(version = HashCodeHasher.CURRENT_VERSION)
public final class HashCodeHasher extends Hasher {
private static final long serialVersionUID = 2L;
+ /**
+ * Protobuf serialization version.
+ */
+ public static final int CURRENT_VERSION = 0;
+
@Config(mandatory = true, redact = true, description="Salt used in the hash.")
private transient String salt = null;
@@ -52,6 +66,26 @@ public HashCodeHasher(String salt) {
postConfig();
}
+ /**
+ * Deserialization factory.
+ *
+ * Note the salt must be set after the hasher has been deserialized.
+ * @param version The serialized object version.
+ * @param className The class name.
+ * @param message The serialized data.
+ */
+ public static HashCodeHasher deserializeFromProto(int version, String className, Any message) {
+ if (version < 0 || version > CURRENT_VERSION) {
+ throw new IllegalArgumentException("Unknown version " + version + ", this class supports at most version " + CURRENT_VERSION);
+ }
+ return new HashCodeHasher();
+ }
+
+ @Override
+ public HasherProto serialize() {
+ return ProtoUtil.serialize(this);
+ }
+
@Override
public String hash(String name) {
if (salt == null) {
@@ -92,6 +126,23 @@ public String toString() {
return "HashCodeHasher()";
}
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ HashCodeHasher that = (HashCodeHasher) o;
+ return Objects.equals(salt, that.salt);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(salt);
+ }
+
private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException {
in.defaultReadObject();
salt = null;
diff --git a/Core/src/main/java/org/tribuo/hash/HashedFeatureMap.java b/Core/src/main/java/org/tribuo/hash/HashedFeatureMap.java
index 9e53681a1..2ec6d5bb8 100644
--- a/Core/src/main/java/org/tribuo/hash/HashedFeatureMap.java
+++ b/Core/src/main/java/org/tribuo/hash/HashedFeatureMap.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015-2020, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015-2022, Oracle and/or its affiliates. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -16,11 +16,19 @@
package org.tribuo.hash;
+import com.google.protobuf.Any;
+import com.google.protobuf.InvalidProtocolBufferException;
import org.tribuo.FeatureMap;
import org.tribuo.ImmutableFeatureMap;
import org.tribuo.Model;
import org.tribuo.VariableIDInfo;
import org.tribuo.VariableInfo;
+import org.tribuo.protos.ProtoSerializableClass;
+import org.tribuo.protos.ProtoSerializableField;
+import org.tribuo.protos.ProtoUtil;
+import org.tribuo.protos.core.HashedFeatureMapProto;
+import org.tribuo.protos.core.HasherProto;
+import org.tribuo.protos.core.VariableInfoProto;
import java.util.Map;
import java.util.TreeMap;
@@ -30,10 +38,19 @@
* provide feature name hashing and guarantee that the {@link Model}
* does not contain feature name information, but still works
* with unhashed features names.
+ *
+ * The salt must be set after this object has been deserialized.
*/
+@ProtoSerializableClass(version = HashedFeatureMap.CURRENT_VERSION, serializedDataClass = HashedFeatureMapProto.class)
public final class HashedFeatureMap extends ImmutableFeatureMap {
private static final long serialVersionUID = 1L;
+ /**
+ * Protobuf serialization version.
+ */
+ public static final int CURRENT_VERSION = 0;
+
+ @ProtoSerializableField
private final Hasher hasher;
private HashedFeatureMap(Hasher hasher) {
@@ -41,6 +58,32 @@ private HashedFeatureMap(Hasher hasher) {
this.hasher = hasher;
}
+ /**
+ * Deserialization factory.
+ * @param version The serialized object version.
+ * @param className The class name.
+ * @param message The serialized data.
+ */
+ public static HashedFeatureMap deserializeFromProto(int version, String className, Any message) throws InvalidProtocolBufferException {
+ if (version < 0 || version > CURRENT_VERSION) {
+ throw new IllegalArgumentException("Unknown version " + version + ", this class supports at most version " + CURRENT_VERSION);
+ }
+ HashedFeatureMapProto proto = message.unpack(HashedFeatureMapProto.class);
+ HasherProto hasherProto = proto.getHasher();
+ Hasher hasher = ProtoUtil.deserialize(hasherProto);
+ HashedFeatureMap obj = new HashedFeatureMap(hasher);
+ for (VariableInfoProto infoProto : proto.getInfoList()) {
+ VariableIDInfo info = ProtoUtil.deserialize(infoProto);
+ Object o = obj.idMap.put(info.getID(), info);
+ Object otherO = obj.m.put(info.getName(),info);
+ if ((o != null) || (otherO != null)) {
+ throw new IllegalStateException("Invalid protobuf, found two mappings for " + info.getName());
+ }
+ }
+ obj.size = proto.getInfoCount();
+ return obj;
+ }
+
@Override
public VariableIDInfo get(String name) {
String hash = hasher.hash(name);
@@ -80,7 +123,7 @@ public void setSalt(String salt) {
* This preserves the index ordering of the original feature names,
* which is important for making sure test time performance is good.
*
- * It guarantees any collisions will produce an feature id number lower
+ * It guarantees any collisions will produce a feature id number lower
* than the previous feature's number, and so can be easily removed.
*
* @param map The {@link FeatureMap} to hash.
diff --git a/Core/src/main/java/org/tribuo/hash/Hasher.java b/Core/src/main/java/org/tribuo/hash/Hasher.java
index ba04d29e9..28f42b3ed 100644
--- a/Core/src/main/java/org/tribuo/hash/Hasher.java
+++ b/Core/src/main/java/org/tribuo/hash/Hasher.java
@@ -19,22 +19,30 @@
import com.oracle.labs.mlrg.olcut.config.Configurable;
import com.oracle.labs.mlrg.olcut.provenance.ConfiguredObjectProvenance;
import com.oracle.labs.mlrg.olcut.provenance.Provenancable;
+import org.tribuo.protos.ProtoSerializable;
+import org.tribuo.protos.core.HasherProto;
import java.io.Serializable;
/**
* An abstract base class for hash functions used to hash the names of features.
+ *
+ * Hasher implementations do not serialize the salt in their serialized forms, and
+ * thus the salt must be set after deserialization.
*/
-public abstract class Hasher implements Configurable, Provenancable, Serializable {
+public abstract class Hasher implements Configurable, Provenancable, Serializable,
+ ProtoSerializable {
private static final long serialVersionUID = 2L;
/**
* The minimum length of the salt. Salts shorter than this will not validate.
*/
- public static final int MIN_LENGTH=8;
+ public static final int MIN_LENGTH = 8;
/**
* Hashes the supplied input using the hashing function.
+ *
+ * If the salt is not set then this throws {@link IllegalStateException}.
* @param input The input to hash.
* @return A String representation of the hashed output.
*/
diff --git a/Core/src/main/java/org/tribuo/hash/MessageDigestHasher.java b/Core/src/main/java/org/tribuo/hash/MessageDigestHasher.java
index 78eae8fce..8e2d13fa6 100644
--- a/Core/src/main/java/org/tribuo/hash/MessageDigestHasher.java
+++ b/Core/src/main/java/org/tribuo/hash/MessageDigestHasher.java
@@ -16,12 +16,19 @@
package org.tribuo.hash;
+import com.google.protobuf.Any;
+import com.google.protobuf.InvalidProtocolBufferException;
import com.oracle.labs.mlrg.olcut.config.Config;
import com.oracle.labs.mlrg.olcut.config.PropertyException;
import com.oracle.labs.mlrg.olcut.provenance.ConfiguredObjectProvenance;
import com.oracle.labs.mlrg.olcut.provenance.ObjectProvenance;
import com.oracle.labs.mlrg.olcut.provenance.Provenance;
import com.oracle.labs.mlrg.olcut.provenance.primitives.StringProvenance;
+import org.tribuo.protos.ProtoSerializableClass;
+import org.tribuo.protos.ProtoSerializableField;
+import org.tribuo.protos.ProtoUtil;
+import org.tribuo.protos.core.HasherProto;
+import org.tribuo.protos.core.MessageDigestHasherProto;
import java.io.IOException;
import java.io.ObjectInputStream;
@@ -29,6 +36,7 @@
import java.nio.charset.StandardCharsets;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
+import java.util.Arrays;
import java.util.Base64;
import java.util.HashMap;
import java.util.Map;
@@ -37,10 +45,19 @@
/**
* Hashes Strings using the supplied MessageDigest type.
+ *
+ * MessageDigestHasher does not serialize the salt in its serialized forms, and
+ * thus the salt must be set after deserialization.
*/
+@ProtoSerializableClass(version = MessageDigestHasher.CURRENT_VERSION, serializedDataClass = MessageDigestHasherProto.class)
public final class MessageDigestHasher extends Hasher {
private static final long serialVersionUID = 3L;
+ /**
+ * Protobuf serialization version.
+ */
+ public static final int CURRENT_VERSION = 0;
+
/**
* Alias for {@link StandardCharsets#UTF_8}.
*/
@@ -49,6 +66,7 @@ public final class MessageDigestHasher extends Hasher {
static final String HASH_TYPE = "hashType";
@Config(mandatory = true,description="MessageDigest hashing function.")
+ @ProtoSerializableField
private String hashType;
private transient ThreadLocal md;
@@ -84,6 +102,28 @@ public MessageDigestHasher(String hashType, String salt) {
this.provenance = new MessageDigestHasherProvenance(hashType);
}
+ /**
+ * Deserialization factory.
+ *
+ * Note the salt must be set after the hasher has been deserialized.
+ * @param version The serialized object version number.
+ * @param className The class name.
+ * @param message The serialized data.
+ * @throws InvalidProtocolBufferException If the message cannot be parsed by {@link MessageDigestHasherProto}.
+ */
+ public static MessageDigestHasher deserializeFromProto(int version, String className, Any message) throws InvalidProtocolBufferException {
+ if (version < 0 || version > CURRENT_VERSION) {
+ throw new IllegalArgumentException("Unknown version " + version + ", this class supports at most version " + CURRENT_VERSION);
+ }
+ MessageDigestHasher obj = new MessageDigestHasher();
+ MessageDigestHasherProto proto = message.unpack(MessageDigestHasherProto.class);
+ obj.hashType = proto.getHashType();
+ obj.md = ThreadLocal.withInitial(getDigestSupplier(obj.hashType));
+ MessageDigest d = obj.md.get(); // To trigger the unsupported digest exception.
+ obj.provenance = new MessageDigestHasherProvenance(obj.hashType);
+ return obj;
+ }
+
/**
* Used by the OLCUT configuration system, and should not be called by external code.
*/
@@ -118,6 +158,11 @@ public String hash(String input) {
return Base64.getEncoder().encodeToString(hash);
}
+ @Override
+ public HasherProto serialize() {
+ return ProtoUtil.serialize(this);
+ }
+
@Override
public void setSalt(String salt) {
if (Hasher.validateSalt(salt)) {
@@ -139,6 +184,25 @@ public String toString() {
return "MessageDigestHasher(algorithm="+md.get().getAlgorithm()+")";
}
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ MessageDigestHasher that = (MessageDigestHasher) o;
+ return Objects.equals(hashType, that.hashType) && Arrays.equals(salt, that.salt);
+ }
+
+ @Override
+ public int hashCode() {
+ int result = Objects.hash(hashType);
+ result = 31 * result + Arrays.hashCode(salt);
+ return result;
+ }
+
@Override
public ConfiguredObjectProvenance getProvenance() {
return provenance;
diff --git a/Core/src/main/java/org/tribuo/hash/ModHashCodeHasher.java b/Core/src/main/java/org/tribuo/hash/ModHashCodeHasher.java
index 3a671cf58..1008f3442 100644
--- a/Core/src/main/java/org/tribuo/hash/ModHashCodeHasher.java
+++ b/Core/src/main/java/org/tribuo/hash/ModHashCodeHasher.java
@@ -16,6 +16,8 @@
package org.tribuo.hash;
+import com.google.protobuf.Any;
+import com.google.protobuf.InvalidProtocolBufferException;
import com.oracle.labs.mlrg.olcut.config.Config;
import com.oracle.labs.mlrg.olcut.config.PropertyException;
import com.oracle.labs.mlrg.olcut.provenance.ConfiguredObjectProvenance;
@@ -23,6 +25,11 @@
import com.oracle.labs.mlrg.olcut.provenance.Provenance;
import com.oracle.labs.mlrg.olcut.provenance.primitives.IntProvenance;
import com.oracle.labs.mlrg.olcut.provenance.primitives.StringProvenance;
+import org.tribuo.protos.ProtoSerializableClass;
+import org.tribuo.protos.ProtoSerializableField;
+import org.tribuo.protos.ProtoUtil;
+import org.tribuo.protos.core.HasherProto;
+import org.tribuo.protos.core.ModHashCodeHasherProto;
import java.io.IOException;
import java.io.ObjectInputStream;
@@ -32,15 +39,25 @@
/**
* Hashes names using String.hashCode(), then reduces the dimension.
+ *
+ * ModHashCodeHasher does not serialize the salt in its serialized forms, and
+ * thus the salt must be set after deserialization.
*/
+@ProtoSerializableClass(version = ModHashCodeHasher.CURRENT_VERSION, serializedDataClass = ModHashCodeHasherProto.class)
public final class ModHashCodeHasher extends Hasher {
private static final long serialVersionUID = 2L;
+ /**
+ * Protobuf serialization version.
+ */
+ public static final int CURRENT_VERSION = 0;
+
static final String DIMENSION = "dimension";
@Config(mandatory = true,redact = true,description="Salt used in the hash.")
private transient String salt = null;
+ @ProtoSerializableField
@Config(mandatory = true,description="Range of the hashing function.")
private int dimension = 100;
@@ -70,6 +87,31 @@ public ModHashCodeHasher(int dimension, String salt) {
postConfig();
}
+ /**
+ * Deserialization constructor.
+ *
+ * Note the salt must be set after the hasher has been deserialized.
+ * @param version The version number.
+ * @param className The class name.
+ * @param message The serialized data.
+ * @throws InvalidProtocolBufferException If the message cannot be parsed by {@link ModHashCodeHasherProto}.
+ */
+ public static ModHashCodeHasher deserializeFromProto(int version, String className, Any message) throws InvalidProtocolBufferException {
+ if (version < 0 || version > CURRENT_VERSION) {
+ throw new IllegalArgumentException("Unknown version " + version + ", this class supports at most version " + CURRENT_VERSION);
+ }
+ ModHashCodeHasherProto proto = message.unpack(ModHashCodeHasherProto.class);
+ ModHashCodeHasher obj = new ModHashCodeHasher();
+ obj.dimension = proto.getDimension();
+ obj.provenance = new ModHashCodeHasherProvenance(obj.dimension);
+ return obj;
+ }
+
+ @Override
+ public HasherProto serialize() {
+ return ProtoUtil.serialize(this);
+ }
+
/**
* Used by the OLCUT configuration system, and should not be called by external code.
*/
@@ -111,6 +153,23 @@ public String toString() {
return "ModHashCodeHasher(dimension=" + dimension + ")";
}
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ ModHashCodeHasher that = (ModHashCodeHasher) o;
+ return dimension == that.dimension && Objects.equals(salt, that.salt);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(salt, dimension);
+ }
+
private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException {
in.defaultReadObject();
salt = null;
diff --git a/Core/src/main/java/org/tribuo/hash/package-info.java b/Core/src/main/java/org/tribuo/hash/package-info.java
index 1aa670a57..93ceded0c 100644
--- a/Core/src/main/java/org/tribuo/hash/package-info.java
+++ b/Core/src/main/java/org/tribuo/hash/package-info.java
@@ -24,5 +24,9 @@
* a specific range, and {@link org.tribuo.hash.MessageDigestHasher} which uses a
* {@link java.security.MessageDigest} implementation to perform the hashing. Only MessageDigestHasher provides
* security guarantees suitable for production usage.
+ *
+ * Note {@link org.tribuo.hash.Hasher} implementations require a salt which is serialized separately
+ * from the {@code Hasher} object. Without supplying this seed the hash methods will throw
+ * {@link java.lang.IllegalStateException}.
*/
package org.tribuo.hash;
\ No newline at end of file
diff --git a/Core/src/main/java/org/tribuo/protos/ProtoSerializable.java b/Core/src/main/java/org/tribuo/protos/ProtoSerializable.java
new file mode 100644
index 000000000..b3d8da181
--- /dev/null
+++ b/Core/src/main/java/org/tribuo/protos/ProtoSerializable.java
@@ -0,0 +1,53 @@
+/*
+ * Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.tribuo.protos;
+
+import com.google.protobuf.Message;
+import com.oracle.labs.mlrg.olcut.config.protobuf.ProtoProvenanceSerialization;
+
+/**
+ * Interface for serializing an implementing object to the specified protobuf.
+ *
+ * All classes which implement this interface must expose a static method called
+ * {@link ProtoSerializable#DESERIALIZATION_METHOD_NAME} which
+ * accepts three arguments (int version, String className, com.google.protobuf.Any message)
+ * and returns an instance of this class.
+ * We can't require this with the type system yet, so it must be checked by tests.
+ *
+ * The deserialization factory is accessed reflectively, and so if it is not public
+ * the module must be opened to the {@code org.tribuo.core} module.
+ * @param The protobuf type.
+ */
+public interface ProtoSerializable {
+
+ /**
+ * Serializer used for provenance objects.
+ */
+ public static final ProtoProvenanceSerialization PROVENANCE_SERIALIZER = new ProtoProvenanceSerialization(false);
+
+ /**
+ * The name of the static deserialization method for {@link ProtoSerializable} classes.
+ */
+ public static final String DESERIALIZATION_METHOD_NAME = "deserializeFromProto";
+
+ /**
+ * Serializes this object to a protobuf.
+ * @return The protobuf.
+ */
+ public T serialize();
+
+}
diff --git a/Core/src/main/java/org/tribuo/protos/ProtoSerializableClass.java b/Core/src/main/java/org/tribuo/protos/ProtoSerializableClass.java
new file mode 100644
index 000000000..8bbd4bd50
--- /dev/null
+++ b/Core/src/main/java/org/tribuo/protos/ProtoSerializableClass.java
@@ -0,0 +1,45 @@
+/*
+ * Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.tribuo.protos;
+
+import com.google.protobuf.Message;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+import static java.lang.annotation.ElementType.TYPE;
+
+/**
+ * Mark a class as being {@link ProtoSerializable} and specify
+ * the class type used to serialize the "serialized_data".
+ */
+@Retention(RetentionPolicy.RUNTIME)
+@Target(TYPE)
+public @interface ProtoSerializableClass {
+ /**
+ * Specifies the type of the serialized data payload.
+ * @return The proto class of the serialized data.
+ */
+ Class extends Message> serializedDataClass() default Message.class;
+
+ /**
+ * The current version of this proto serialized class.
+ * @return The version number.
+ */
+ int version();
+}
diff --git a/Core/src/main/java/org/tribuo/protos/ProtoSerializableField.java b/Core/src/main/java/org/tribuo/protos/ProtoSerializableField.java
new file mode 100644
index 000000000..9f2355577
--- /dev/null
+++ b/Core/src/main/java/org/tribuo/protos/ProtoSerializableField.java
@@ -0,0 +1,50 @@
+/*
+ * Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.tribuo.protos;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+import static java.lang.annotation.ElementType.FIELD;
+
+/**
+ * Annotation which denotes that a field should be part of the protobuf serialized representation.
+ *
+ * Behaviour is undefined when used on a class which doesn't implement {@link ProtoSerializable}.
+ */
+@Retention(RetentionPolicy.RUNTIME)
+@Target(FIELD)
+public @interface ProtoSerializableField {
+
+ /**
+ * The default field name, used to signify it should use the field name rather than a supplied value.
+ */
+ public static final String DEFAULT_FIELD_NAME = "[DEFAULT_FIELD_NAME]";
+
+ /**
+ * The protobuf version when this field was added.
+ * @return The version.
+ */
+ int sinceVersion() default 0;
+
+ /**
+ * The name of the field in the protobuf in Java.
+ * @return The field name.
+ */
+ String name() default DEFAULT_FIELD_NAME;
+}
diff --git a/Core/src/main/java/org/tribuo/protos/ProtoSerializableKeysValuesField.java b/Core/src/main/java/org/tribuo/protos/ProtoSerializableKeysValuesField.java
new file mode 100644
index 000000000..91550a962
--- /dev/null
+++ b/Core/src/main/java/org/tribuo/protos/ProtoSerializableKeysValuesField.java
@@ -0,0 +1,49 @@
+/*
+ * Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.tribuo.protos;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+import static java.lang.annotation.ElementType.FIELD;
+
+/**
+ * Annotation which denotes that the map field this is applied to is
+ * serialized as two repeated fields, one for keys and one for values.
+ */
+@Retention(RetentionPolicy.RUNTIME)
+@Target(FIELD)
+public @interface ProtoSerializableKeysValuesField {
+ /**
+ * The protobuf version when this field was added.
+ * @return The version.
+ */
+ int sinceVersion() default 0;
+
+ /**
+ * The name of the key field in the protobuf in Java.
+ * @return The key field name.
+ */
+ String keysName();
+
+ /**
+ * The name of the value field in the protobuf in Java.
+ * @return The value field name.
+ */
+ String valuesName();
+}
diff --git a/Core/src/main/java/org/tribuo/protos/ProtoSerializableMapValuesField.java b/Core/src/main/java/org/tribuo/protos/ProtoSerializableMapValuesField.java
new file mode 100644
index 000000000..b2ae444e4
--- /dev/null
+++ b/Core/src/main/java/org/tribuo/protos/ProtoSerializableMapValuesField.java
@@ -0,0 +1,43 @@
+/*
+ * Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.tribuo.protos;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+import static java.lang.annotation.ElementType.FIELD;
+
+/**
+ * Annotation which denotes that the map field this is applied to is
+ * serialized as a list of values.
+ */
+@Retention(RetentionPolicy.RUNTIME)
+@Target(FIELD)
+public @interface ProtoSerializableMapValuesField {
+ /**
+ * The protobuf version when this field was added.
+ * @return The version.
+ */
+ int sinceVersion() default 0;
+
+ /**
+ * The name of the value field in the protobuf in Java.
+ * @return The value field name.
+ */
+ String valuesName();
+}
diff --git a/Core/src/main/java/org/tribuo/protos/ProtoUtil.java b/Core/src/main/java/org/tribuo/protos/ProtoUtil.java
new file mode 100644
index 000000000..dac44b8ce
--- /dev/null
+++ b/Core/src/main/java/org/tribuo/protos/ProtoUtil.java
@@ -0,0 +1,480 @@
+/*
+ * Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.tribuo.protos;
+
+import com.google.protobuf.Any;
+import com.google.protobuf.Descriptors.FieldDescriptor;
+import com.google.protobuf.Message;
+import com.oracle.labs.mlrg.olcut.util.MutableDouble;
+import com.oracle.labs.mlrg.olcut.util.MutableLong;
+import com.oracle.labs.mlrg.olcut.util.Pair;
+
+import java.lang.reflect.Field;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+import java.lang.reflect.ParameterizedType;
+import java.lang.reflect.Type;
+import java.lang.reflect.TypeVariable;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.logging.Logger;
+import java.util.stream.Collectors;
+
+/**
+ * Utilities for working with Tribuo protobufs.
+ */
+public final class ProtoUtil {
+ private static final Logger logger = Logger.getLogger(ProtoUtil.class.getName());
+
+ /**
+ * Used to provide internal Tribuo redirects as classes are redefined.
+ *
+ * Must only be used for namespaces which are owned by Tribuo modules.
+ */
+ private static final Map, String> REDIRECT_MAP = new HashMap<>();
+
+ /**
+ * Private final constructor for static utility class.
+ */
+ private ProtoUtil() {}
+
+ /**
+ * Instantiates the class from the supplied protobuf fields.
+ *
+ * Deserialization proceeds as follows:
+ *
+ * Check to see if there is a valid redirect for this version & class name tuple.
+ * If there is then the new class name is used for the following steps.
+ * Lookup the class name and instantiate the {@link Class} object.
+ * Find the 3 arg static method {@code deserializeFromProto(int version, String className, com.google.protobuf.Any message)}.
+ * Call the method passing along the original three arguments (note this uses the
+ * original class name even if a redirect has been applied).
+ * Return the freshly constructed object, or rethrow any runtime exceptions.
+ *
+ *
+ * Throws {@link IllegalStateException} if:
+ *
+ * the requested class could not be found on the classpath/modulepath
+ * the requested class does not have the necessary 3 arg constructor
+ * the deserialization method could not be invoked due to its accessibility, or is in some other way invalid
+ * the deserialization method threw an exception
+ *
+ *
+ * @param serialized The protobuf to deserialize.
+ * @param The protobuf type.
+ * @param The deserialized type.
+ * @return The deserialized object.
+ */
+ public static > PROTO_SERIALIZABLE deserialize(SERIALIZED serialized) {
+
+ // Extract version from serialized
+ FieldDescriptor fieldDescriptor = serialized.getDescriptorForType().findFieldByName("version");
+ int version = (Integer) serialized.getField(fieldDescriptor);
+ // Extract class_name of return value from serialized
+ fieldDescriptor = serialized.getDescriptorForType().findFieldByName("class_name");
+ // Allow redirect for Tribuo's classes.
+ String className = (String) serialized.getField(fieldDescriptor);
+ Pair key = new Pair<>(version, className);
+ String targetClassName = REDIRECT_MAP.getOrDefault(key, className);
+
+ try {
+ @SuppressWarnings("unchecked")
+ Class protoSerializableClass = (Class) Class.forName(targetClassName);
+
+ fieldDescriptor = serialized.getDescriptorForType().findFieldByName("serialized_data");
+ Any serializedData = (Any) serialized.getField(fieldDescriptor);
+
+ Method method = protoSerializableClass.getDeclaredMethod(ProtoSerializable.DESERIALIZATION_METHOD_NAME, int.class, String.class, Any.class);
+ method.setAccessible(true);
+ @SuppressWarnings("unchecked")
+ PROTO_SERIALIZABLE protoSerializable = (PROTO_SERIALIZABLE) method.invoke(null, version, targetClassName, serializedData);
+ method.setAccessible(false);
+ return protoSerializable;
+ } catch (ClassNotFoundException e) {
+ throw new IllegalStateException("Failed to find class " + targetClassName, e);
+ } catch (NoSuchMethodException e) {
+ throw new IllegalStateException("Failed to find deserialization method " + ProtoSerializable.DESERIALIZATION_METHOD_NAME + "(int, String, com.google.protobuf.Any) on class " + targetClassName, e);
+ } catch (IllegalAccessException e) {
+ throw new IllegalStateException("Failed to invoke deserialization method " + ProtoSerializable.DESERIALIZATION_METHOD_NAME + "(int, String, com.google.protobuf.Any) on class " + targetClassName, e);
+ } catch (InvocationTargetException e) {
+ throw new IllegalStateException("The deserialization method for " + ProtoSerializable.DESERIALIZATION_METHOD_NAME + "(int, String, com.google.protobuf.Any) on class " + targetClassName + " threw an exception", e);
+ }
+ }
+
+ @SuppressWarnings("unchecked")
+ public static > SERIALIZED_CLASS serialize(PROTO_SERIALIZABLE protoSerializable) {
+ try {
+ ProtoSerializableClass annotation = protoSerializable.getClass().getAnnotation(ProtoSerializableClass.class);
+ if (annotation == null) {
+ throw new IllegalArgumentException("instance of ProtoSerializable must be annotated with @ProtoSerializableClass to be serialized with ProtoUtil.serialize()");
+ }
+
+ Class serializedClass = getSerializedClass(protoSerializable);
+ SERIALIZED_CLASS.Builder serializedClassBuilder = (SERIALIZED_CLASS.Builder) serializedClass.getMethod("newBuilder").invoke(null);
+ Class serializedClassBuilderClass = (Class) serializedClassBuilder.getClass();
+ serializedClassBuilderClass.getMethod("setVersion", Integer.TYPE).invoke(serializedClassBuilder, annotation.version());
+ serializedClassBuilderClass.getMethod("setClassName", String.class).invoke(serializedClassBuilder, protoSerializable.getClass().getName());
+
+ Class serializedDataClass = (Class) annotation.serializedDataClass();
+ //the default value for ProtoSerializableClass.serializedDataClass is GeneratedMessageV3 which is how you can signal that
+ //there is no serialized data to be serialized.
+ if (serializedDataClass != Message.class) {
+ SERIALIZED_DATA.Builder serializedDataBuilder = (SERIALIZED_DATA.Builder) serializedDataClass.getMethod("newBuilder").invoke(null);
+ Class serializedDataBuilderClass = (Class) serializedDataBuilder.getClass();
+
+ for (Field field : getFields(protoSerializable.getClass())) {
+ field.setAccessible(true);
+ Object obj = field.get(protoSerializable);
+
+ ProtoSerializableField protoSerializableField = field.getAnnotation(ProtoSerializableField.class);
+ if (protoSerializableField != null) {
+ String fieldName = protoSerializableField.name();
+ if (fieldName.equals(ProtoSerializableField.DEFAULT_FIELD_NAME)) {
+ fieldName = field.getName();
+ }
+
+ Class> fieldClazz = field.getType();
+ String nameStub = (fieldClazz.isArray() || Collection.class.isAssignableFrom(fieldClazz)) ? "addAll" : "set";
+ Method setter = findMethod(serializedDataBuilderClass, nameStub, fieldName, 1);
+ obj = convert(obj);
+ setter.setAccessible(true);
+ setter.invoke(serializedDataBuilder, obj);
+ setter.setAccessible(false);
+ }
+
+ ProtoSerializableKeysValuesField pskvf = field.getAnnotation(ProtoSerializableKeysValuesField.class);
+ if (pskvf != null) {
+ if (!(obj instanceof Map) && (obj != null)) {
+ throw new IllegalStateException("Field of type " + obj.getClass() + " was annotated with ProtoSerializableKeysValuesField which is only supported on java.util.Map fields");
+ }
+ Method keyAdder = findMethod(serializedDataBuilderClass, "add", pskvf.keysName(), 1);
+ keyAdder.setAccessible(true);
+ Method valueAdder = findMethod(serializedDataBuilderClass, "add", pskvf.valuesName(), 1);
+ valueAdder.setAccessible(true);
+ Map,?> map = (Map,?>) obj;
+ if (map != null) {
+ for (Map.Entry,?> e : map.entrySet()) {
+ keyAdder.invoke(serializedDataBuilder, convert(e.getKey()));
+ valueAdder.invoke(serializedDataBuilder, convert(e.getValue()));
+ }
+ }
+ keyAdder.setAccessible(false);
+ valueAdder.setAccessible(false);
+ }
+
+ ProtoSerializableMapValuesField psmvf = field.getAnnotation(ProtoSerializableMapValuesField.class);
+ if (psmvf != null) {
+ if (!(obj instanceof Map) && (obj != null)) {
+ throw new IllegalStateException("Field of type " + obj.getClass() + " was annotated with ProtoSerializableMapValuesField which is only supported on java.util.Map fields");
+ }
+ Method valuesAdder = findMethod(serializedDataBuilderClass, "addAll", psmvf.valuesName(), 1);
+ obj = convertValues((Map,?>) obj);
+ valuesAdder.setAccessible(true);
+ valuesAdder.invoke(serializedDataBuilder, obj);
+ valuesAdder.setAccessible(false);
+ }
+
+ field.setAccessible(false);
+ }
+ serializedClassBuilderClass.getMethod("setSerializedData", com.google.protobuf.Any.class).invoke(serializedClassBuilder, Any.pack(serializedDataBuilder.build()));
+ }
+ return (SERIALIZED_CLASS) serializedClassBuilder.build();
+ } catch (InvocationTargetException | IllegalAccessException | NoSuchMethodException e) {
+ throw new RuntimeException(e);
+ }
+ }
+
+ /**
+ * If this class is annotated with {@link ProtoSerializableClass} returns the
+ * version number, otherwise returns -1.
+ *
+ * @param clazz The class to check.
+ * @return The version number, or -1 if it does not use the annotation.
+ */
+ public static int getCurrentVersion(Class extends ProtoSerializable>> clazz) {
+ ProtoSerializableClass ann = clazz.getAnnotation(ProtoSerializableClass.class);
+ if (ann != null) {
+ return ann.version();
+ } else {
+ return -1;
+ }
+ }
+
+ static > Class getSerializedClass(PROTO_SERIALIZABLE protoSerializable) {
+ @SuppressWarnings("unchecked")
+ Class serializedClass = (Class) resolveTypeParameter(ProtoSerializable.class, protoSerializable.getClass(), ProtoSerializable.class.getTypeParameters()[0]);
+ if (serializedClass != null) {
+ return serializedClass;
+ }
+ String tpName = ProtoSerializable.class.getTypeParameters()[0].getName();
+ throw new IllegalArgumentException("unable to resolve type parameter '" + tpName + "' in ProtoSerializable<" + tpName + "> for class " + protoSerializable.getClass().getName());
+ }
+
+ private static List convertValues(Map, ?> obj) {
+ List values = new ArrayList<>();
+ for (Object value : obj.values()) {
+ values.add(convert(value));
+ }
+ return values;
+ }
+
+ private static Object convert(Object obj) {
+ if (obj instanceof ProtoSerializable) {
+ return ((ProtoSerializable>) obj).serialize();
+ } else if (obj instanceof MutableLong) {
+ return ((MutableLong) obj).longValue();
+ } else if (obj instanceof MutableDouble) {
+ return ((MutableDouble) obj).doubleValue();
+ } else if (obj.getClass().isEnum()) {
+ return ((Enum>) obj).name();
+ } else if (obj instanceof int[]) {
+ int[] t = (int[]) obj;
+ return Arrays.stream(t).boxed().collect(Collectors.toList());
+ } else if (obj instanceof long[]) {
+ long[] t = (long[]) obj;
+ return Arrays.stream(t).boxed().collect(Collectors.toList());
+ } else if (obj instanceof float[]) {
+ float[] t = (float[]) obj;
+ List floats = new ArrayList<>();
+ for (float f : t) {
+ floats.add(f);
+ }
+ return floats;
+ } else if (obj instanceof double[]) {
+ double[] t = (double[]) obj;
+ return Arrays.stream(t).boxed().collect(Collectors.toList());
+ } else if (obj instanceof String[]) {
+ return Arrays.asList((String[]) obj);
+ } else if (obj instanceof Double || obj instanceof Float || obj instanceof Byte || obj instanceof Short || obj instanceof Character || obj instanceof Integer || obj instanceof Long || obj instanceof Boolean || obj instanceof String) {
+ return obj;
+ } else {
+ throw new IllegalArgumentException("Invalid protobuf field type " + obj.getClass());
+ }
+ }
+
+ private static List getFields(Class> clazz) {
+ Set fieldNameSet = new HashSet<>();
+ List fields = new ArrayList<>();
+ getFields(clazz, fieldNameSet, fields);
+ return fields;
+ }
+
+ private static void getFields(Class> clazz, Set fieldNameSet, List fields) {
+ for (Field field : clazz.getDeclaredFields()) {
+ ProtoSerializableField psf = field.getAnnotation(ProtoSerializableField.class);
+ ProtoSerializableKeysValuesField pskvf = field.getAnnotation(ProtoSerializableKeysValuesField.class);
+ ProtoSerializableMapValuesField psmvf = field.getAnnotation(ProtoSerializableMapValuesField.class);
+ if ((psf != null) && (pskvf == null) && (psmvf == null)) {
+ String protoFieldName;
+ if (psf.equals(ProtoSerializableField.DEFAULT_FIELD_NAME)) {
+ protoFieldName = field.getName();
+ } else {
+ protoFieldName = psf.name();
+ }
+ if (!fieldNameSet.contains(protoFieldName)) {
+ fields.add(field);
+ fieldNameSet.add(field.getName());
+ } else {
+ logger.warning("Duplicate field named " + protoFieldName + " detected in class " + clazz);
+ }
+ } else if ((psf == null) && (pskvf != null) && (psmvf == null)) {
+ String keyName = pskvf.keysName();
+ String valueName = pskvf.valuesName();
+ if (fieldNameSet.contains(keyName) && fieldNameSet.contains(valueName)) {
+ continue;
+ }
+ if (fieldNameSet.contains(keyName) || fieldNameSet.contains(valueName)) {
+ throw new IllegalStateException("ProtoSerializableKeysValuesField on " + clazz.getName() + "." + field.getName() + " collides with another ProtoSerializable annotation");
+ }
+ fields.add(field);
+ fieldNameSet.add(keyName);
+ fieldNameSet.add(valueName);
+ } else if ((psf == null) && (pskvf == null) && (psmvf != null)) {
+ String valuesName = psmvf.valuesName();
+ if (!fieldNameSet.contains(valuesName)) {
+ fields.add(field);
+ fieldNameSet.add(valuesName);
+ }
+ } else if ((psf != null) || (pskvf != null) || (psmvf != null)) {
+ String message = "Multiple ProtoSerializable annotations applied to the same field, found "
+ + "ProtoSerializableField = " + psf
+ + ", ProtoSerializableKeysValuesField = " + pskvf
+ + ", ProtoSerializableMapValuesField = " + psmvf
+ + " on field named " + field.getName() + " of class " + clazz;
+ throw new IllegalStateException(message);
+ }
+ }
+
+ Class> superclass = clazz.getSuperclass();
+ if (superclass != null && !superclass.equals(Object.class)) {
+ getFields(superclass, fieldNameSet, fields);
+ }
+ }
+
+ private static Method findMethod(Class> serializedDataBuilderClass, String prefixName, String fieldName, int expectedParamCount) {
+ String methodName = generateMethodName(prefixName, fieldName);
+
+ for (Method method : serializedDataBuilderClass.getMethods()) {
+ if (method.getName().equals(methodName)) {
+ if (method.getParameterTypes().length != expectedParamCount) {
+ continue;
+ }
+ if (expectedParamCount == 0) {
+ return method;
+ }
+ Class> clazz = method.getParameterTypes()[0];
+ if (Message.Builder.class.isAssignableFrom(clazz)) {
+ continue;
+ }
+ return method;
+ }
+ }
+ throw new IllegalArgumentException("Unable to find method " + methodName + " for field name: " + fieldName + " in class: "
+ + serializedDataBuilderClass.getName());
+ }
+
+ public static String generateMethodName(String prefix, String name) {
+ StringBuilder sb = new StringBuilder();
+ sb.append(prefix);
+ sb.append(("" + name.charAt(0)).toUpperCase());
+ sb.append(name.substring(1));
+ return sb.toString();
+ }
+
+ /**
+ * @param the type of the generic interface
+ * @param the type of the subclass we are trying to resolve the parameter for
+ * @param intrface a generically typed interface/class that has a type parameter that we want to resolve
+ * @param clazz a subclass of intrface that we to resolve the type parameter for (if possible)
+ * @param typeVariable the type variable/parameter that we want resolved (e.g. the type variable corresponding to <T>)
+ * @return null if the type parameter has not been resolved, otherwise the class type of the type parameter for the provided class.
+ */
+ private static Class> resolveTypeParameter(Class intrface, Class clazz, TypeVariable> typeVariable) {
+ return resolveTypeParameter(intrface, clazz, new MutableTypeVariable(typeVariable));
+ }
+
+ @SuppressWarnings({"unchecked", "rawtypes"})
+ private static Class> resolveTypeParameter(Class intrface, Class clazz, MutableTypeVariable typeVariable) {
+ //go up the class hierarchy until super class is no longer assignable to the interface
+ Class superClass = clazz.getSuperclass();
+ if (superClass != null && intrface.isAssignableFrom(superClass)) {
+ Class> serializedClass = resolveTypeParameter(intrface, superClass, typeVariable);
+ if (serializedClass != null) {
+ return serializedClass;
+ }
+ }
+ //go up the interfaces hierarchy - but only those assignable to the interface
+ for (Class iface : clazz.getInterfaces()) {
+ if (intrface.isAssignableFrom(iface) && !intrface.equals(iface)) {
+ Class> serializedClass = resolveTypeParameter(intrface, iface, typeVariable);
+ if (serializedClass != null) {
+ return serializedClass;
+ }
+ }
+ }
+
+ //get all the generic supertypes that are parameterized types (but only those
+ //assignable to the interface)
+ List pts = getGenericSuperParameterizedTypes(intrface, clazz);
+
+ //loop over each and get the type of the type variable for the typed generic interface
+ for (ParameterizedType genericInterface : pts) {
+ Type t = getParameterType(genericInterface, typeVariable.var);
+ //if the resulting type is another type variable, then we need to update the
+ //type variable that we are trying to match against
+ if (t instanceof TypeVariable) {
+ typeVariable.var = (TypeVariable) t;
+ }
+ //otherwise, we are done and we can return the class type of the type variable.
+ else if (t instanceof Class) {
+ return (Class>) t;
+ }
+ }
+
+ return null;
+ }
+
+ /**
+ * Puts the generic superclass and generic interfaces into a single list
+ * to make it easy to iterate over each in a single collection. All
+ * returned values will be of type ParameterizedType and assignable to the
+ * intface (i.e. subclass sub-interface).
+ *
+ * @param clazz the class definition to find the generic parameterized types for.
+ * @return
+ */
+ private static List getGenericSuperParameterizedTypes(Class> intrface, Class> clazz) {
+ List pts = new ArrayList<>();
+ Type genericSuperclass = clazz.getGenericSuperclass();
+ if (genericSuperclass instanceof ParameterizedType) {
+ pts.add((ParameterizedType) genericSuperclass);
+ }
+ for (Type genericInterface : clazz.getGenericInterfaces()) {
+ if (genericInterface instanceof ParameterizedType) {
+ ParameterizedType pt = (ParameterizedType) genericInterface;
+ if (intrface.isAssignableFrom((Class>) pt.getRawType())) {
+ pts.add((ParameterizedType) genericInterface);
+ }
+ }
+ }
+ return pts;
+ }
+
+ /**
+ * a class or type variable corresponding to the parameterized type's parameter
+ * type for the given type variable The returned type will either be a class if
+ * specified or another type variable if not.
+ *
+ * @param parameterizedType either a generic superclass or a generic interface
+ * @param typeVariable a type variable corresponding to e.g. <T>
+ * @return a class or type variable corresponding to the parameterized type's
+ * parameter type for the given type variable
+ */
+ @SuppressWarnings("rawtypes")
+ private static Type getParameterType(ParameterizedType parameterizedType, TypeVariable> typeVariable) {
+ Type rawType = parameterizedType.getRawType();
+ if (rawType instanceof Class) {
+ TypeVariable>[] typeParameters = ((Class>) rawType).getTypeParameters();
+ Type[] actualTypeArguments = parameterizedType.getActualTypeArguments();
+ if (typeParameters.length == actualTypeArguments.length) {
+ for (int i = 0; i < typeParameters.length; i++) {
+ TypeVariable> tp = typeParameters[i];
+ if (tp.getName().equals(typeVariable.getName())) {
+ Type actualTypeArgument = actualTypeArguments[i];
+ return actualTypeArgument;
+ }
+ }
+ }
+ }
+ return null;
+ }
+
+ private static final class MutableTypeVariable {
+ private TypeVariable> var;
+
+ MutableTypeVariable(TypeVariable> var) {
+ this.var = var;
+ }
+ }
+
+}
diff --git a/Core/src/main/java/org/tribuo/protos/core/BinningTransformerProto.java b/Core/src/main/java/org/tribuo/protos/core/BinningTransformerProto.java
new file mode 100644
index 000000000..34878ac13
--- /dev/null
+++ b/Core/src/main/java/org/tribuo/protos/core/BinningTransformerProto.java
@@ -0,0 +1,917 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: tribuo-core-impl.proto
+
+package org.tribuo.protos.core;
+
+/**
+ *
+ *BinningTransformer proto
+ *
+ *
+ * Protobuf type {@code tribuo.core.BinningTransformerProto}
+ */
+public final class BinningTransformerProto extends
+ com.google.protobuf.GeneratedMessageV3 implements
+ // @@protoc_insertion_point(message_implements:tribuo.core.BinningTransformerProto)
+ BinningTransformerProtoOrBuilder {
+private static final long serialVersionUID = 0L;
+ // Use BinningTransformerProto.newBuilder() to construct.
+ private BinningTransformerProto(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
+ super(builder);
+ }
+ private BinningTransformerProto() {
+ binningType_ = "";
+ bins_ = emptyDoubleList();
+ values_ = emptyDoubleList();
+ }
+
+ @java.lang.Override
+ @SuppressWarnings({"unused"})
+ protected java.lang.Object newInstance(
+ UnusedPrivateParameter unused) {
+ return new BinningTransformerProto();
+ }
+
+ @java.lang.Override
+ public final com.google.protobuf.UnknownFieldSet
+ getUnknownFields() {
+ return this.unknownFields;
+ }
+ private BinningTransformerProto(
+ 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 10: {
+ java.lang.String s = input.readStringRequireUtf8();
+
+ binningType_ = s;
+ break;
+ }
+ case 17: {
+ if (!((mutable_bitField0_ & 0x00000001) != 0)) {
+ bins_ = newDoubleList();
+ mutable_bitField0_ |= 0x00000001;
+ }
+ bins_.addDouble(input.readDouble());
+ break;
+ }
+ case 18: {
+ int length = input.readRawVarint32();
+ int limit = input.pushLimit(length);
+ if (!((mutable_bitField0_ & 0x00000001) != 0) && input.getBytesUntilLimit() > 0) {
+ bins_ = newDoubleList();
+ mutable_bitField0_ |= 0x00000001;
+ }
+ while (input.getBytesUntilLimit() > 0) {
+ bins_.addDouble(input.readDouble());
+ }
+ input.popLimit(limit);
+ break;
+ }
+ case 25: {
+ if (!((mutable_bitField0_ & 0x00000002) != 0)) {
+ values_ = newDoubleList();
+ mutable_bitField0_ |= 0x00000002;
+ }
+ values_.addDouble(input.readDouble());
+ break;
+ }
+ case 26: {
+ int length = input.readRawVarint32();
+ int limit = input.pushLimit(length);
+ if (!((mutable_bitField0_ & 0x00000002) != 0) && input.getBytesUntilLimit() > 0) {
+ values_ = newDoubleList();
+ mutable_bitField0_ |= 0x00000002;
+ }
+ while (input.getBytesUntilLimit() > 0) {
+ values_.addDouble(input.readDouble());
+ }
+ 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)) {
+ bins_.makeImmutable(); // C
+ }
+ if (((mutable_bitField0_ & 0x00000002) != 0)) {
+ values_.makeImmutable(); // C
+ }
+ this.unknownFields = unknownFields.build();
+ makeExtensionsImmutable();
+ }
+ }
+ public static final com.google.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return org.tribuo.protos.core.TribuoCoreImpl.internal_static_tribuo_core_BinningTransformerProto_descriptor;
+ }
+
+ @java.lang.Override
+ protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return org.tribuo.protos.core.TribuoCoreImpl.internal_static_tribuo_core_BinningTransformerProto_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ org.tribuo.protos.core.BinningTransformerProto.class, org.tribuo.protos.core.BinningTransformerProto.Builder.class);
+ }
+
+ public static final int BINNING_TYPE_FIELD_NUMBER = 1;
+ private volatile java.lang.Object binningType_;
+ /**
+ * string binning_type = 1;
+ * @return The binningType.
+ */
+ @java.lang.Override
+ public java.lang.String getBinningType() {
+ java.lang.Object ref = binningType_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ binningType_ = s;
+ return s;
+ }
+ }
+ /**
+ * string binning_type = 1;
+ * @return The bytes for binningType.
+ */
+ @java.lang.Override
+ public com.google.protobuf.ByteString
+ getBinningTypeBytes() {
+ java.lang.Object ref = binningType_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ binningType_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int BINS_FIELD_NUMBER = 2;
+ private com.google.protobuf.Internal.DoubleList bins_;
+ /**
+ * repeated double bins = 2;
+ * @return A list containing the bins.
+ */
+ @java.lang.Override
+ public java.util.List
+ getBinsList() {
+ return bins_;
+ }
+ /**
+ * repeated double bins = 2;
+ * @return The count of bins.
+ */
+ public int getBinsCount() {
+ return bins_.size();
+ }
+ /**
+ * repeated double bins = 2;
+ * @param index The index of the element to return.
+ * @return The bins at the given index.
+ */
+ public double getBins(int index) {
+ return bins_.getDouble(index);
+ }
+ private int binsMemoizedSerializedSize = -1;
+
+ public static final int VALUES_FIELD_NUMBER = 3;
+ private com.google.protobuf.Internal.DoubleList values_;
+ /**
+ * repeated double values = 3;
+ * @return A list containing the values.
+ */
+ @java.lang.Override
+ public java.util.List
+ getValuesList() {
+ return values_;
+ }
+ /**
+ * repeated double values = 3;
+ * @return The count of values.
+ */
+ public int getValuesCount() {
+ return values_.size();
+ }
+ /**
+ * repeated double values = 3;
+ * @param index The index of the element to return.
+ * @return The values at the given index.
+ */
+ public double getValues(int index) {
+ return values_.getDouble(index);
+ }
+ private int valuesMemoizedSerializedSize = -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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(binningType_)) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 1, binningType_);
+ }
+ if (getBinsList().size() > 0) {
+ output.writeUInt32NoTag(18);
+ output.writeUInt32NoTag(binsMemoizedSerializedSize);
+ }
+ for (int i = 0; i < bins_.size(); i++) {
+ output.writeDoubleNoTag(bins_.getDouble(i));
+ }
+ if (getValuesList().size() > 0) {
+ output.writeUInt32NoTag(26);
+ output.writeUInt32NoTag(valuesMemoizedSerializedSize);
+ }
+ for (int i = 0; i < values_.size(); i++) {
+ output.writeDoubleNoTag(values_.getDouble(i));
+ }
+ unknownFields.writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(binningType_)) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, binningType_);
+ }
+ {
+ int dataSize = 0;
+ dataSize = 8 * getBinsList().size();
+ size += dataSize;
+ if (!getBinsList().isEmpty()) {
+ size += 1;
+ size += com.google.protobuf.CodedOutputStream
+ .computeInt32SizeNoTag(dataSize);
+ }
+ binsMemoizedSerializedSize = dataSize;
+ }
+ {
+ int dataSize = 0;
+ dataSize = 8 * getValuesList().size();
+ size += dataSize;
+ if (!getValuesList().isEmpty()) {
+ size += 1;
+ size += com.google.protobuf.CodedOutputStream
+ .computeInt32SizeNoTag(dataSize);
+ }
+ valuesMemoizedSerializedSize = 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 org.tribuo.protos.core.BinningTransformerProto)) {
+ return super.equals(obj);
+ }
+ org.tribuo.protos.core.BinningTransformerProto other = (org.tribuo.protos.core.BinningTransformerProto) obj;
+
+ if (!getBinningType()
+ .equals(other.getBinningType())) return false;
+ if (!getBinsList()
+ .equals(other.getBinsList())) return false;
+ if (!getValuesList()
+ .equals(other.getValuesList())) 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) + BINNING_TYPE_FIELD_NUMBER;
+ hash = (53 * hash) + getBinningType().hashCode();
+ if (getBinsCount() > 0) {
+ hash = (37 * hash) + BINS_FIELD_NUMBER;
+ hash = (53 * hash) + getBinsList().hashCode();
+ }
+ if (getValuesCount() > 0) {
+ hash = (37 * hash) + VALUES_FIELD_NUMBER;
+ hash = (53 * hash) + getValuesList().hashCode();
+ }
+ hash = (29 * hash) + unknownFields.hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static org.tribuo.protos.core.BinningTransformerProto parseFrom(
+ java.nio.ByteBuffer data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static org.tribuo.protos.core.BinningTransformerProto parseFrom(
+ java.nio.ByteBuffer data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static org.tribuo.protos.core.BinningTransformerProto parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static org.tribuo.protos.core.BinningTransformerProto 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.protos.core.BinningTransformerProto parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static org.tribuo.protos.core.BinningTransformerProto parseFrom(
+ byte[] data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static org.tribuo.protos.core.BinningTransformerProto parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input);
+ }
+ public static org.tribuo.protos.core.BinningTransformerProto 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.protos.core.BinningTransformerProto parseDelimitedFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseDelimitedWithIOException(PARSER, input);
+ }
+ public static org.tribuo.protos.core.BinningTransformerProto 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.protos.core.BinningTransformerProto parseFrom(
+ com.google.protobuf.CodedInputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input);
+ }
+ public static org.tribuo.protos.core.BinningTransformerProto 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.protos.core.BinningTransformerProto 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;
+ }
+ /**
+ *
+ *BinningTransformer proto
+ *
+ *
+ * Protobuf type {@code tribuo.core.BinningTransformerProto}
+ */
+ public static final class Builder extends
+ com.google.protobuf.GeneratedMessageV3.Builder implements
+ // @@protoc_insertion_point(builder_implements:tribuo.core.BinningTransformerProto)
+ org.tribuo.protos.core.BinningTransformerProtoOrBuilder {
+ public static final com.google.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return org.tribuo.protos.core.TribuoCoreImpl.internal_static_tribuo_core_BinningTransformerProto_descriptor;
+ }
+
+ @java.lang.Override
+ protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return org.tribuo.protos.core.TribuoCoreImpl.internal_static_tribuo_core_BinningTransformerProto_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ org.tribuo.protos.core.BinningTransformerProto.class, org.tribuo.protos.core.BinningTransformerProto.Builder.class);
+ }
+
+ // Construct using org.tribuo.protos.core.BinningTransformerProto.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();
+ binningType_ = "";
+
+ bins_ = emptyDoubleList();
+ bitField0_ = (bitField0_ & ~0x00000001);
+ values_ = emptyDoubleList();
+ bitField0_ = (bitField0_ & ~0x00000002);
+ return this;
+ }
+
+ @java.lang.Override
+ public com.google.protobuf.Descriptors.Descriptor
+ getDescriptorForType() {
+ return org.tribuo.protos.core.TribuoCoreImpl.internal_static_tribuo_core_BinningTransformerProto_descriptor;
+ }
+
+ @java.lang.Override
+ public org.tribuo.protos.core.BinningTransformerProto getDefaultInstanceForType() {
+ return org.tribuo.protos.core.BinningTransformerProto.getDefaultInstance();
+ }
+
+ @java.lang.Override
+ public org.tribuo.protos.core.BinningTransformerProto build() {
+ org.tribuo.protos.core.BinningTransformerProto result = buildPartial();
+ if (!result.isInitialized()) {
+ throw newUninitializedMessageException(result);
+ }
+ return result;
+ }
+
+ @java.lang.Override
+ public org.tribuo.protos.core.BinningTransformerProto buildPartial() {
+ org.tribuo.protos.core.BinningTransformerProto result = new org.tribuo.protos.core.BinningTransformerProto(this);
+ int from_bitField0_ = bitField0_;
+ result.binningType_ = binningType_;
+ if (((bitField0_ & 0x00000001) != 0)) {
+ bins_.makeImmutable();
+ bitField0_ = (bitField0_ & ~0x00000001);
+ }
+ result.bins_ = bins_;
+ if (((bitField0_ & 0x00000002) != 0)) {
+ values_.makeImmutable();
+ bitField0_ = (bitField0_ & ~0x00000002);
+ }
+ result.values_ = values_;
+ 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.protos.core.BinningTransformerProto) {
+ return mergeFrom((org.tribuo.protos.core.BinningTransformerProto)other);
+ } else {
+ super.mergeFrom(other);
+ return this;
+ }
+ }
+
+ public Builder mergeFrom(org.tribuo.protos.core.BinningTransformerProto other) {
+ if (other == org.tribuo.protos.core.BinningTransformerProto.getDefaultInstance()) return this;
+ if (!other.getBinningType().isEmpty()) {
+ binningType_ = other.binningType_;
+ onChanged();
+ }
+ if (!other.bins_.isEmpty()) {
+ if (bins_.isEmpty()) {
+ bins_ = other.bins_;
+ bitField0_ = (bitField0_ & ~0x00000001);
+ } else {
+ ensureBinsIsMutable();
+ bins_.addAll(other.bins_);
+ }
+ onChanged();
+ }
+ if (!other.values_.isEmpty()) {
+ if (values_.isEmpty()) {
+ values_ = other.values_;
+ bitField0_ = (bitField0_ & ~0x00000002);
+ } else {
+ ensureValuesIsMutable();
+ values_.addAll(other.values_);
+ }
+ 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 {
+ org.tribuo.protos.core.BinningTransformerProto parsedMessage = null;
+ try {
+ parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ parsedMessage = (org.tribuo.protos.core.BinningTransformerProto) e.getUnfinishedMessage();
+ throw e.unwrapIOException();
+ } finally {
+ if (parsedMessage != null) {
+ mergeFrom(parsedMessage);
+ }
+ }
+ return this;
+ }
+ private int bitField0_;
+
+ private java.lang.Object binningType_ = "";
+ /**
+ * string binning_type = 1;
+ * @return The binningType.
+ */
+ public java.lang.String getBinningType() {
+ java.lang.Object ref = binningType_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ binningType_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ * string binning_type = 1;
+ * @return The bytes for binningType.
+ */
+ public com.google.protobuf.ByteString
+ getBinningTypeBytes() {
+ java.lang.Object ref = binningType_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ binningType_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ * string binning_type = 1;
+ * @param value The binningType to set.
+ * @return This builder for chaining.
+ */
+ public Builder setBinningType(
+ java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ binningType_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * string binning_type = 1;
+ * @return This builder for chaining.
+ */
+ public Builder clearBinningType() {
+
+ binningType_ = getDefaultInstance().getBinningType();
+ onChanged();
+ return this;
+ }
+ /**
+ * string binning_type = 1;
+ * @param value The bytes for binningType to set.
+ * @return This builder for chaining.
+ */
+ public Builder setBinningTypeBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ binningType_ = value;
+ onChanged();
+ return this;
+ }
+
+ private com.google.protobuf.Internal.DoubleList bins_ = emptyDoubleList();
+ private void ensureBinsIsMutable() {
+ if (!((bitField0_ & 0x00000001) != 0)) {
+ bins_ = mutableCopy(bins_);
+ bitField0_ |= 0x00000001;
+ }
+ }
+ /**
+ * repeated double bins = 2;
+ * @return A list containing the bins.
+ */
+ public java.util.List
+ getBinsList() {
+ return ((bitField0_ & 0x00000001) != 0) ?
+ java.util.Collections.unmodifiableList(bins_) : bins_;
+ }
+ /**
+ * repeated double bins = 2;
+ * @return The count of bins.
+ */
+ public int getBinsCount() {
+ return bins_.size();
+ }
+ /**
+ * repeated double bins = 2;
+ * @param index The index of the element to return.
+ * @return The bins at the given index.
+ */
+ public double getBins(int index) {
+ return bins_.getDouble(index);
+ }
+ /**
+ * repeated double bins = 2;
+ * @param index The index to set the value at.
+ * @param value The bins to set.
+ * @return This builder for chaining.
+ */
+ public Builder setBins(
+ int index, double value) {
+ ensureBinsIsMutable();
+ bins_.setDouble(index, value);
+ onChanged();
+ return this;
+ }
+ /**
+ * repeated double bins = 2;
+ * @param value The bins to add.
+ * @return This builder for chaining.
+ */
+ public Builder addBins(double value) {
+ ensureBinsIsMutable();
+ bins_.addDouble(value);
+ onChanged();
+ return this;
+ }
+ /**
+ * repeated double bins = 2;
+ * @param values The bins to add.
+ * @return This builder for chaining.
+ */
+ public Builder addAllBins(
+ java.lang.Iterable extends java.lang.Double> values) {
+ ensureBinsIsMutable();
+ com.google.protobuf.AbstractMessageLite.Builder.addAll(
+ values, bins_);
+ onChanged();
+ return this;
+ }
+ /**
+ * repeated double bins = 2;
+ * @return This builder for chaining.
+ */
+ public Builder clearBins() {
+ bins_ = emptyDoubleList();
+ bitField0_ = (bitField0_ & ~0x00000001);
+ onChanged();
+ return this;
+ }
+
+ private com.google.protobuf.Internal.DoubleList values_ = emptyDoubleList();
+ private void ensureValuesIsMutable() {
+ if (!((bitField0_ & 0x00000002) != 0)) {
+ values_ = mutableCopy(values_);
+ bitField0_ |= 0x00000002;
+ }
+ }
+ /**
+ * repeated double values = 3;
+ * @return A list containing the values.
+ */
+ public java.util.List
+ getValuesList() {
+ return ((bitField0_ & 0x00000002) != 0) ?
+ java.util.Collections.unmodifiableList(values_) : values_;
+ }
+ /**
+ * repeated double values = 3;
+ * @return The count of values.
+ */
+ public int getValuesCount() {
+ return values_.size();
+ }
+ /**
+ * repeated double values = 3;
+ * @param index The index of the element to return.
+ * @return The values at the given index.
+ */
+ public double getValues(int index) {
+ return values_.getDouble(index);
+ }
+ /**
+ * repeated double values = 3;
+ * @param index The index to set the value at.
+ * @param value The values to set.
+ * @return This builder for chaining.
+ */
+ public Builder setValues(
+ int index, double value) {
+ ensureValuesIsMutable();
+ values_.setDouble(index, value);
+ onChanged();
+ return this;
+ }
+ /**
+ * repeated double values = 3;
+ * @param value The values to add.
+ * @return This builder for chaining.
+ */
+ public Builder addValues(double value) {
+ ensureValuesIsMutable();
+ values_.addDouble(value);
+ onChanged();
+ return this;
+ }
+ /**
+ * repeated double values = 3;
+ * @param values The values to add.
+ * @return This builder for chaining.
+ */
+ public Builder addAllValues(
+ java.lang.Iterable extends java.lang.Double> values) {
+ ensureValuesIsMutable();
+ com.google.protobuf.AbstractMessageLite.Builder.addAll(
+ values, values_);
+ onChanged();
+ return this;
+ }
+ /**
+ * repeated double values = 3;
+ * @return This builder for chaining.
+ */
+ public Builder clearValues() {
+ values_ = emptyDoubleList();
+ bitField0_ = (bitField0_ & ~0x00000002);
+ 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.core.BinningTransformerProto)
+ }
+
+ // @@protoc_insertion_point(class_scope:tribuo.core.BinningTransformerProto)
+ private static final org.tribuo.protos.core.BinningTransformerProto DEFAULT_INSTANCE;
+ static {
+ DEFAULT_INSTANCE = new org.tribuo.protos.core.BinningTransformerProto();
+ }
+
+ public static org.tribuo.protos.core.BinningTransformerProto getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser
+ PARSER = new com.google.protobuf.AbstractParser() {
+ @java.lang.Override
+ public BinningTransformerProto parsePartialFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return new BinningTransformerProto(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.tribuo.protos.core.BinningTransformerProto getDefaultInstanceForType() {
+ return DEFAULT_INSTANCE;
+ }
+
+}
+
diff --git a/Core/src/main/java/org/tribuo/protos/core/BinningTransformerProtoOrBuilder.java b/Core/src/main/java/org/tribuo/protos/core/BinningTransformerProtoOrBuilder.java
new file mode 100644
index 000000000..89e10c836
--- /dev/null
+++ b/Core/src/main/java/org/tribuo/protos/core/BinningTransformerProtoOrBuilder.java
@@ -0,0 +1,55 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: tribuo-core-impl.proto
+
+package org.tribuo.protos.core;
+
+public interface BinningTransformerProtoOrBuilder extends
+ // @@protoc_insertion_point(interface_extends:tribuo.core.BinningTransformerProto)
+ com.google.protobuf.MessageOrBuilder {
+
+ /**
+ * string binning_type = 1;
+ * @return The binningType.
+ */
+ java.lang.String getBinningType();
+ /**
+ * string binning_type = 1;
+ * @return The bytes for binningType.
+ */
+ com.google.protobuf.ByteString
+ getBinningTypeBytes();
+
+ /**
+ * repeated double bins = 2;
+ * @return A list containing the bins.
+ */
+ java.util.List getBinsList();
+ /**
+ * repeated double bins = 2;
+ * @return The count of bins.
+ */
+ int getBinsCount();
+ /**
+ * repeated double bins = 2;
+ * @param index The index of the element to return.
+ * @return The bins at the given index.
+ */
+ double getBins(int index);
+
+ /**
+ * repeated double values = 3;
+ * @return A list containing the values.
+ */
+ java.util.List getValuesList();
+ /**
+ * repeated double values = 3;
+ * @return The count of values.
+ */
+ int getValuesCount();
+ /**
+ * repeated double values = 3;
+ * @param index The index of the element to return.
+ * @return The values at the given index.
+ */
+ double getValues(int index);
+}
diff --git a/Core/src/main/java/org/tribuo/protos/core/CategoricalIDInfoProto.java b/Core/src/main/java/org/tribuo/protos/core/CategoricalIDInfoProto.java
new file mode 100644
index 000000000..9d6b06a98
--- /dev/null
+++ b/Core/src/main/java/org/tribuo/protos/core/CategoricalIDInfoProto.java
@@ -0,0 +1,1179 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: tribuo-core-impl.proto
+
+package org.tribuo.protos.core;
+
+/**
+ *
+ *CategoricalIDInfo proto
+ *
+ *
+ * Protobuf type {@code tribuo.core.CategoricalIDInfoProto}
+ */
+public final class CategoricalIDInfoProto extends
+ com.google.protobuf.GeneratedMessageV3 implements
+ // @@protoc_insertion_point(message_implements:tribuo.core.CategoricalIDInfoProto)
+ CategoricalIDInfoProtoOrBuilder {
+private static final long serialVersionUID = 0L;
+ // Use CategoricalIDInfoProto.newBuilder() to construct.
+ private CategoricalIDInfoProto(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
+ super(builder);
+ }
+ private CategoricalIDInfoProto() {
+ name_ = "";
+ key_ = emptyDoubleList();
+ value_ = emptyLongList();
+ }
+
+ @java.lang.Override
+ @SuppressWarnings({"unused"})
+ protected java.lang.Object newInstance(
+ UnusedPrivateParameter unused) {
+ return new CategoricalIDInfoProto();
+ }
+
+ @java.lang.Override
+ public final com.google.protobuf.UnknownFieldSet
+ getUnknownFields() {
+ return this.unknownFields;
+ }
+ private CategoricalIDInfoProto(
+ 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 10: {
+ java.lang.String s = input.readStringRequireUtf8();
+
+ name_ = s;
+ break;
+ }
+ case 16: {
+
+ count_ = input.readInt32();
+ break;
+ }
+ case 24: {
+
+ id_ = input.readInt32();
+ break;
+ }
+ case 81: {
+ if (!((mutable_bitField0_ & 0x00000001) != 0)) {
+ key_ = newDoubleList();
+ mutable_bitField0_ |= 0x00000001;
+ }
+ key_.addDouble(input.readDouble());
+ break;
+ }
+ case 82: {
+ int length = input.readRawVarint32();
+ int limit = input.pushLimit(length);
+ if (!((mutable_bitField0_ & 0x00000001) != 0) && input.getBytesUntilLimit() > 0) {
+ key_ = newDoubleList();
+ mutable_bitField0_ |= 0x00000001;
+ }
+ while (input.getBytesUntilLimit() > 0) {
+ key_.addDouble(input.readDouble());
+ }
+ input.popLimit(limit);
+ break;
+ }
+ case 88: {
+ if (!((mutable_bitField0_ & 0x00000002) != 0)) {
+ value_ = newLongList();
+ mutable_bitField0_ |= 0x00000002;
+ }
+ value_.addLong(input.readInt64());
+ break;
+ }
+ case 90: {
+ int length = input.readRawVarint32();
+ int limit = input.pushLimit(length);
+ if (!((mutable_bitField0_ & 0x00000002) != 0) && input.getBytesUntilLimit() > 0) {
+ value_ = newLongList();
+ mutable_bitField0_ |= 0x00000002;
+ }
+ while (input.getBytesUntilLimit() > 0) {
+ value_.addLong(input.readInt64());
+ }
+ input.popLimit(limit);
+ break;
+ }
+ case 97: {
+
+ observedValue_ = input.readDouble();
+ break;
+ }
+ case 104: {
+
+ observedCount_ = input.readInt64();
+ 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)) {
+ key_.makeImmutable(); // C
+ }
+ if (((mutable_bitField0_ & 0x00000002) != 0)) {
+ value_.makeImmutable(); // C
+ }
+ this.unknownFields = unknownFields.build();
+ makeExtensionsImmutable();
+ }
+ }
+ public static final com.google.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return org.tribuo.protos.core.TribuoCoreImpl.internal_static_tribuo_core_CategoricalIDInfoProto_descriptor;
+ }
+
+ @java.lang.Override
+ protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return org.tribuo.protos.core.TribuoCoreImpl.internal_static_tribuo_core_CategoricalIDInfoProto_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ org.tribuo.protos.core.CategoricalIDInfoProto.class, org.tribuo.protos.core.CategoricalIDInfoProto.Builder.class);
+ }
+
+ public static final int NAME_FIELD_NUMBER = 1;
+ private volatile java.lang.Object name_;
+ /**
+ * string name = 1;
+ * @return The name.
+ */
+ @java.lang.Override
+ public java.lang.String getName() {
+ java.lang.Object ref = name_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ name_ = s;
+ return s;
+ }
+ }
+ /**
+ * string name = 1;
+ * @return The bytes for name.
+ */
+ @java.lang.Override
+ public com.google.protobuf.ByteString
+ getNameBytes() {
+ java.lang.Object ref = name_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ name_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int COUNT_FIELD_NUMBER = 2;
+ private int count_;
+ /**
+ * int32 count = 2;
+ * @return The count.
+ */
+ @java.lang.Override
+ public int getCount() {
+ return count_;
+ }
+
+ public static final int ID_FIELD_NUMBER = 3;
+ private int id_;
+ /**
+ * int32 id = 3;
+ * @return The id.
+ */
+ @java.lang.Override
+ public int getId() {
+ return id_;
+ }
+
+ public static final int KEY_FIELD_NUMBER = 10;
+ private com.google.protobuf.Internal.DoubleList key_;
+ /**
+ * repeated double key = 10;
+ * @return A list containing the key.
+ */
+ @java.lang.Override
+ public java.util.List
+ getKeyList() {
+ return key_;
+ }
+ /**
+ * repeated double key = 10;
+ * @return The count of key.
+ */
+ public int getKeyCount() {
+ return key_.size();
+ }
+ /**
+ * repeated double key = 10;
+ * @param index The index of the element to return.
+ * @return The key at the given index.
+ */
+ public double getKey(int index) {
+ return key_.getDouble(index);
+ }
+ private int keyMemoizedSerializedSize = -1;
+
+ public static final int VALUE_FIELD_NUMBER = 11;
+ private com.google.protobuf.Internal.LongList value_;
+ /**
+ * repeated int64 value = 11;
+ * @return A list containing the value.
+ */
+ @java.lang.Override
+ public java.util.List
+ getValueList() {
+ return value_;
+ }
+ /**
+ * repeated int64 value = 11;
+ * @return The count of value.
+ */
+ public int getValueCount() {
+ return value_.size();
+ }
+ /**
+ * repeated int64 value = 11;
+ * @param index The index of the element to return.
+ * @return The value at the given index.
+ */
+ public long getValue(int index) {
+ return value_.getLong(index);
+ }
+ private int valueMemoizedSerializedSize = -1;
+
+ public static final int OBSERVED_VALUE_FIELD_NUMBER = 12;
+ private double observedValue_;
+ /**
+ * double observed_value = 12;
+ * @return The observedValue.
+ */
+ @java.lang.Override
+ public double getObservedValue() {
+ return observedValue_;
+ }
+
+ public static final int OBSERVED_COUNT_FIELD_NUMBER = 13;
+ private long observedCount_;
+ /**
+ * int64 observed_count = 13;
+ * @return The observedCount.
+ */
+ @java.lang.Override
+ public long getObservedCount() {
+ return observedCount_;
+ }
+
+ 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_);
+ }
+ if (count_ != 0) {
+ output.writeInt32(2, count_);
+ }
+ if (id_ != 0) {
+ output.writeInt32(3, id_);
+ }
+ if (getKeyList().size() > 0) {
+ output.writeUInt32NoTag(82);
+ output.writeUInt32NoTag(keyMemoizedSerializedSize);
+ }
+ for (int i = 0; i < key_.size(); i++) {
+ output.writeDoubleNoTag(key_.getDouble(i));
+ }
+ if (getValueList().size() > 0) {
+ output.writeUInt32NoTag(90);
+ output.writeUInt32NoTag(valueMemoizedSerializedSize);
+ }
+ for (int i = 0; i < value_.size(); i++) {
+ output.writeInt64NoTag(value_.getLong(i));
+ }
+ if (java.lang.Double.doubleToRawLongBits(observedValue_) != 0) {
+ output.writeDouble(12, observedValue_);
+ }
+ if (observedCount_ != 0L) {
+ output.writeInt64(13, observedCount_);
+ }
+ unknownFields.writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_);
+ }
+ if (count_ != 0) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeInt32Size(2, count_);
+ }
+ if (id_ != 0) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeInt32Size(3, id_);
+ }
+ {
+ int dataSize = 0;
+ dataSize = 8 * getKeyList().size();
+ size += dataSize;
+ if (!getKeyList().isEmpty()) {
+ size += 1;
+ size += com.google.protobuf.CodedOutputStream
+ .computeInt32SizeNoTag(dataSize);
+ }
+ keyMemoizedSerializedSize = dataSize;
+ }
+ {
+ int dataSize = 0;
+ for (int i = 0; i < value_.size(); i++) {
+ dataSize += com.google.protobuf.CodedOutputStream
+ .computeInt64SizeNoTag(value_.getLong(i));
+ }
+ size += dataSize;
+ if (!getValueList().isEmpty()) {
+ size += 1;
+ size += com.google.protobuf.CodedOutputStream
+ .computeInt32SizeNoTag(dataSize);
+ }
+ valueMemoizedSerializedSize = dataSize;
+ }
+ if (java.lang.Double.doubleToRawLongBits(observedValue_) != 0) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeDoubleSize(12, observedValue_);
+ }
+ if (observedCount_ != 0L) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeInt64Size(13, observedCount_);
+ }
+ 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.protos.core.CategoricalIDInfoProto)) {
+ return super.equals(obj);
+ }
+ org.tribuo.protos.core.CategoricalIDInfoProto other = (org.tribuo.protos.core.CategoricalIDInfoProto) obj;
+
+ if (!getName()
+ .equals(other.getName())) return false;
+ if (getCount()
+ != other.getCount()) return false;
+ if (getId()
+ != other.getId()) return false;
+ if (!getKeyList()
+ .equals(other.getKeyList())) return false;
+ if (!getValueList()
+ .equals(other.getValueList())) return false;
+ if (java.lang.Double.doubleToLongBits(getObservedValue())
+ != java.lang.Double.doubleToLongBits(
+ other.getObservedValue())) return false;
+ if (getObservedCount()
+ != other.getObservedCount()) 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) + NAME_FIELD_NUMBER;
+ hash = (53 * hash) + getName().hashCode();
+ hash = (37 * hash) + COUNT_FIELD_NUMBER;
+ hash = (53 * hash) + getCount();
+ hash = (37 * hash) + ID_FIELD_NUMBER;
+ hash = (53 * hash) + getId();
+ if (getKeyCount() > 0) {
+ hash = (37 * hash) + KEY_FIELD_NUMBER;
+ hash = (53 * hash) + getKeyList().hashCode();
+ }
+ if (getValueCount() > 0) {
+ hash = (37 * hash) + VALUE_FIELD_NUMBER;
+ hash = (53 * hash) + getValueList().hashCode();
+ }
+ hash = (37 * hash) + OBSERVED_VALUE_FIELD_NUMBER;
+ hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
+ java.lang.Double.doubleToLongBits(getObservedValue()));
+ hash = (37 * hash) + OBSERVED_COUNT_FIELD_NUMBER;
+ hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
+ getObservedCount());
+ hash = (29 * hash) + unknownFields.hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static org.tribuo.protos.core.CategoricalIDInfoProto parseFrom(
+ java.nio.ByteBuffer data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static org.tribuo.protos.core.CategoricalIDInfoProto parseFrom(
+ java.nio.ByteBuffer data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static org.tribuo.protos.core.CategoricalIDInfoProto parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static org.tribuo.protos.core.CategoricalIDInfoProto 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.protos.core.CategoricalIDInfoProto parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static org.tribuo.protos.core.CategoricalIDInfoProto parseFrom(
+ byte[] data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static org.tribuo.protos.core.CategoricalIDInfoProto parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input);
+ }
+ public static org.tribuo.protos.core.CategoricalIDInfoProto 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.protos.core.CategoricalIDInfoProto parseDelimitedFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseDelimitedWithIOException(PARSER, input);
+ }
+ public static org.tribuo.protos.core.CategoricalIDInfoProto 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.protos.core.CategoricalIDInfoProto parseFrom(
+ com.google.protobuf.CodedInputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input);
+ }
+ public static org.tribuo.protos.core.CategoricalIDInfoProto 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.protos.core.CategoricalIDInfoProto 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;
+ }
+ /**
+ *
+ *CategoricalIDInfo proto
+ *
+ *
+ * Protobuf type {@code tribuo.core.CategoricalIDInfoProto}
+ */
+ public static final class Builder extends
+ com.google.protobuf.GeneratedMessageV3.Builder implements
+ // @@protoc_insertion_point(builder_implements:tribuo.core.CategoricalIDInfoProto)
+ org.tribuo.protos.core.CategoricalIDInfoProtoOrBuilder {
+ public static final com.google.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return org.tribuo.protos.core.TribuoCoreImpl.internal_static_tribuo_core_CategoricalIDInfoProto_descriptor;
+ }
+
+ @java.lang.Override
+ protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return org.tribuo.protos.core.TribuoCoreImpl.internal_static_tribuo_core_CategoricalIDInfoProto_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ org.tribuo.protos.core.CategoricalIDInfoProto.class, org.tribuo.protos.core.CategoricalIDInfoProto.Builder.class);
+ }
+
+ // Construct using org.tribuo.protos.core.CategoricalIDInfoProto.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();
+ name_ = "";
+
+ count_ = 0;
+
+ id_ = 0;
+
+ key_ = emptyDoubleList();
+ bitField0_ = (bitField0_ & ~0x00000001);
+ value_ = emptyLongList();
+ bitField0_ = (bitField0_ & ~0x00000002);
+ observedValue_ = 0D;
+
+ observedCount_ = 0L;
+
+ return this;
+ }
+
+ @java.lang.Override
+ public com.google.protobuf.Descriptors.Descriptor
+ getDescriptorForType() {
+ return org.tribuo.protos.core.TribuoCoreImpl.internal_static_tribuo_core_CategoricalIDInfoProto_descriptor;
+ }
+
+ @java.lang.Override
+ public org.tribuo.protos.core.CategoricalIDInfoProto getDefaultInstanceForType() {
+ return org.tribuo.protos.core.CategoricalIDInfoProto.getDefaultInstance();
+ }
+
+ @java.lang.Override
+ public org.tribuo.protos.core.CategoricalIDInfoProto build() {
+ org.tribuo.protos.core.CategoricalIDInfoProto result = buildPartial();
+ if (!result.isInitialized()) {
+ throw newUninitializedMessageException(result);
+ }
+ return result;
+ }
+
+ @java.lang.Override
+ public org.tribuo.protos.core.CategoricalIDInfoProto buildPartial() {
+ org.tribuo.protos.core.CategoricalIDInfoProto result = new org.tribuo.protos.core.CategoricalIDInfoProto(this);
+ int from_bitField0_ = bitField0_;
+ result.name_ = name_;
+ result.count_ = count_;
+ result.id_ = id_;
+ if (((bitField0_ & 0x00000001) != 0)) {
+ key_.makeImmutable();
+ bitField0_ = (bitField0_ & ~0x00000001);
+ }
+ result.key_ = key_;
+ if (((bitField0_ & 0x00000002) != 0)) {
+ value_.makeImmutable();
+ bitField0_ = (bitField0_ & ~0x00000002);
+ }
+ result.value_ = value_;
+ result.observedValue_ = observedValue_;
+ result.observedCount_ = observedCount_;
+ 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.protos.core.CategoricalIDInfoProto) {
+ return mergeFrom((org.tribuo.protos.core.CategoricalIDInfoProto)other);
+ } else {
+ super.mergeFrom(other);
+ return this;
+ }
+ }
+
+ public Builder mergeFrom(org.tribuo.protos.core.CategoricalIDInfoProto other) {
+ if (other == org.tribuo.protos.core.CategoricalIDInfoProto.getDefaultInstance()) return this;
+ if (!other.getName().isEmpty()) {
+ name_ = other.name_;
+ onChanged();
+ }
+ if (other.getCount() != 0) {
+ setCount(other.getCount());
+ }
+ if (other.getId() != 0) {
+ setId(other.getId());
+ }
+ if (!other.key_.isEmpty()) {
+ if (key_.isEmpty()) {
+ key_ = other.key_;
+ bitField0_ = (bitField0_ & ~0x00000001);
+ } else {
+ ensureKeyIsMutable();
+ key_.addAll(other.key_);
+ }
+ onChanged();
+ }
+ if (!other.value_.isEmpty()) {
+ if (value_.isEmpty()) {
+ value_ = other.value_;
+ bitField0_ = (bitField0_ & ~0x00000002);
+ } else {
+ ensureValueIsMutable();
+ value_.addAll(other.value_);
+ }
+ onChanged();
+ }
+ if (other.getObservedValue() != 0D) {
+ setObservedValue(other.getObservedValue());
+ }
+ if (other.getObservedCount() != 0L) {
+ setObservedCount(other.getObservedCount());
+ }
+ 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.protos.core.CategoricalIDInfoProto parsedMessage = null;
+ try {
+ parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ parsedMessage = (org.tribuo.protos.core.CategoricalIDInfoProto) e.getUnfinishedMessage();
+ throw e.unwrapIOException();
+ } finally {
+ if (parsedMessage != null) {
+ mergeFrom(parsedMessage);
+ }
+ }
+ return this;
+ }
+ private int bitField0_;
+
+ private java.lang.Object name_ = "";
+ /**
+ * string name = 1;
+ * @return The name.
+ */
+ public java.lang.String getName() {
+ java.lang.Object ref = name_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ name_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ * string name = 1;
+ * @return The bytes for name.
+ */
+ public com.google.protobuf.ByteString
+ getNameBytes() {
+ java.lang.Object ref = name_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ name_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ * string name = 1;
+ * @param value The name to set.
+ * @return This builder for chaining.
+ */
+ public Builder setName(
+ java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ name_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * string name = 1;
+ * @return This builder for chaining.
+ */
+ public Builder clearName() {
+
+ name_ = getDefaultInstance().getName();
+ onChanged();
+ return this;
+ }
+ /**
+ * string name = 1;
+ * @param value The bytes for name to set.
+ * @return This builder for chaining.
+ */
+ public Builder setNameBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ name_ = value;
+ onChanged();
+ return this;
+ }
+
+ private int count_ ;
+ /**
+ * int32 count = 2;
+ * @return The count.
+ */
+ @java.lang.Override
+ public int getCount() {
+ return count_;
+ }
+ /**
+ * int32 count = 2;
+ * @param value The count to set.
+ * @return This builder for chaining.
+ */
+ public Builder setCount(int value) {
+
+ count_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * int32 count = 2;
+ * @return This builder for chaining.
+ */
+ public Builder clearCount() {
+
+ count_ = 0;
+ onChanged();
+ return this;
+ }
+
+ private int id_ ;
+ /**
+ * int32 id = 3;
+ * @return The id.
+ */
+ @java.lang.Override
+ public int getId() {
+ return id_;
+ }
+ /**
+ * int32 id = 3;
+ * @param value The id to set.
+ * @return This builder for chaining.
+ */
+ public Builder setId(int value) {
+
+ id_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * int32 id = 3;
+ * @return This builder for chaining.
+ */
+ public Builder clearId() {
+
+ id_ = 0;
+ onChanged();
+ return this;
+ }
+
+ private com.google.protobuf.Internal.DoubleList key_ = emptyDoubleList();
+ private void ensureKeyIsMutable() {
+ if (!((bitField0_ & 0x00000001) != 0)) {
+ key_ = mutableCopy(key_);
+ bitField0_ |= 0x00000001;
+ }
+ }
+ /**
+ * repeated double key = 10;
+ * @return A list containing the key.
+ */
+ public java.util.List
+ getKeyList() {
+ return ((bitField0_ & 0x00000001) != 0) ?
+ java.util.Collections.unmodifiableList(key_) : key_;
+ }
+ /**
+ * repeated double key = 10;
+ * @return The count of key.
+ */
+ public int getKeyCount() {
+ return key_.size();
+ }
+ /**
+ * repeated double key = 10;
+ * @param index The index of the element to return.
+ * @return The key at the given index.
+ */
+ public double getKey(int index) {
+ return key_.getDouble(index);
+ }
+ /**
+ * repeated double key = 10;
+ * @param index The index to set the value at.
+ * @param value The key to set.
+ * @return This builder for chaining.
+ */
+ public Builder setKey(
+ int index, double value) {
+ ensureKeyIsMutable();
+ key_.setDouble(index, value);
+ onChanged();
+ return this;
+ }
+ /**
+ * repeated double key = 10;
+ * @param value The key to add.
+ * @return This builder for chaining.
+ */
+ public Builder addKey(double value) {
+ ensureKeyIsMutable();
+ key_.addDouble(value);
+ onChanged();
+ return this;
+ }
+ /**
+ * repeated double key = 10;
+ * @param values The key to add.
+ * @return This builder for chaining.
+ */
+ public Builder addAllKey(
+ java.lang.Iterable extends java.lang.Double> values) {
+ ensureKeyIsMutable();
+ com.google.protobuf.AbstractMessageLite.Builder.addAll(
+ values, key_);
+ onChanged();
+ return this;
+ }
+ /**
+ * repeated double key = 10;
+ * @return This builder for chaining.
+ */
+ public Builder clearKey() {
+ key_ = emptyDoubleList();
+ bitField0_ = (bitField0_ & ~0x00000001);
+ onChanged();
+ return this;
+ }
+
+ private com.google.protobuf.Internal.LongList value_ = emptyLongList();
+ private void ensureValueIsMutable() {
+ if (!((bitField0_ & 0x00000002) != 0)) {
+ value_ = mutableCopy(value_);
+ bitField0_ |= 0x00000002;
+ }
+ }
+ /**
+ * repeated int64 value = 11;
+ * @return A list containing the value.
+ */
+ public java.util.List
+ getValueList() {
+ return ((bitField0_ & 0x00000002) != 0) ?
+ java.util.Collections.unmodifiableList(value_) : value_;
+ }
+ /**
+ * repeated int64 value = 11;
+ * @return The count of value.
+ */
+ public int getValueCount() {
+ return value_.size();
+ }
+ /**
+ * repeated int64 value = 11;
+ * @param index The index of the element to return.
+ * @return The value at the given index.
+ */
+ public long getValue(int index) {
+ return value_.getLong(index);
+ }
+ /**
+ * repeated int64 value = 11;
+ * @param index The index to set the value at.
+ * @param value The value to set.
+ * @return This builder for chaining.
+ */
+ public Builder setValue(
+ int index, long value) {
+ ensureValueIsMutable();
+ value_.setLong(index, value);
+ onChanged();
+ return this;
+ }
+ /**
+ * repeated int64 value = 11;
+ * @param value The value to add.
+ * @return This builder for chaining.
+ */
+ public Builder addValue(long value) {
+ ensureValueIsMutable();
+ value_.addLong(value);
+ onChanged();
+ return this;
+ }
+ /**
+ * repeated int64 value = 11;
+ * @param values The value to add.
+ * @return This builder for chaining.
+ */
+ public Builder addAllValue(
+ java.lang.Iterable extends java.lang.Long> values) {
+ ensureValueIsMutable();
+ com.google.protobuf.AbstractMessageLite.Builder.addAll(
+ values, value_);
+ onChanged();
+ return this;
+ }
+ /**
+ * repeated int64 value = 11;
+ * @return This builder for chaining.
+ */
+ public Builder clearValue() {
+ value_ = emptyLongList();
+ bitField0_ = (bitField0_ & ~0x00000002);
+ onChanged();
+ return this;
+ }
+
+ private double observedValue_ ;
+ /**
+ * double observed_value = 12;
+ * @return The observedValue.
+ */
+ @java.lang.Override
+ public double getObservedValue() {
+ return observedValue_;
+ }
+ /**
+ * double observed_value = 12;
+ * @param value The observedValue to set.
+ * @return This builder for chaining.
+ */
+ public Builder setObservedValue(double value) {
+
+ observedValue_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * double observed_value = 12;
+ * @return This builder for chaining.
+ */
+ public Builder clearObservedValue() {
+
+ observedValue_ = 0D;
+ onChanged();
+ return this;
+ }
+
+ private long observedCount_ ;
+ /**
+ * int64 observed_count = 13;
+ * @return The observedCount.
+ */
+ @java.lang.Override
+ public long getObservedCount() {
+ return observedCount_;
+ }
+ /**
+ * int64 observed_count = 13;
+ * @param value The observedCount to set.
+ * @return This builder for chaining.
+ */
+ public Builder setObservedCount(long value) {
+
+ observedCount_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * int64 observed_count = 13;
+ * @return This builder for chaining.
+ */
+ public Builder clearObservedCount() {
+
+ observedCount_ = 0L;
+ 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.core.CategoricalIDInfoProto)
+ }
+
+ // @@protoc_insertion_point(class_scope:tribuo.core.CategoricalIDInfoProto)
+ private static final org.tribuo.protos.core.CategoricalIDInfoProto DEFAULT_INSTANCE;
+ static {
+ DEFAULT_INSTANCE = new org.tribuo.protos.core.CategoricalIDInfoProto();
+ }
+
+ public static org.tribuo.protos.core.CategoricalIDInfoProto getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser
+ PARSER = new com.google.protobuf.AbstractParser() {
+ @java.lang.Override
+ public CategoricalIDInfoProto parsePartialFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return new CategoricalIDInfoProto(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.tribuo.protos.core.CategoricalIDInfoProto getDefaultInstanceForType() {
+ return DEFAULT_INSTANCE;
+ }
+
+}
+
diff --git a/Core/src/main/java/org/tribuo/protos/core/CategoricalIDInfoProtoOrBuilder.java b/Core/src/main/java/org/tribuo/protos/core/CategoricalIDInfoProtoOrBuilder.java
new file mode 100644
index 000000000..25a1e7a12
--- /dev/null
+++ b/Core/src/main/java/org/tribuo/protos/core/CategoricalIDInfoProtoOrBuilder.java
@@ -0,0 +1,79 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: tribuo-core-impl.proto
+
+package org.tribuo.protos.core;
+
+public interface CategoricalIDInfoProtoOrBuilder extends
+ // @@protoc_insertion_point(interface_extends:tribuo.core.CategoricalIDInfoProto)
+ com.google.protobuf.MessageOrBuilder {
+
+ /**
+ * string name = 1;
+ * @return The name.
+ */
+ java.lang.String getName();
+ /**
+ * string name = 1;
+ * @return The bytes for name.
+ */
+ com.google.protobuf.ByteString
+ getNameBytes();
+
+ /**
+ * int32 count = 2;
+ * @return The count.
+ */
+ int getCount();
+
+ /**
+ * int32 id = 3;
+ * @return The id.
+ */
+ int getId();
+
+ /**
+ * repeated double key = 10;
+ * @return A list containing the key.
+ */
+ java.util.List getKeyList();
+ /**
+ * repeated double key = 10;
+ * @return The count of key.
+ */
+ int getKeyCount();
+ /**
+ * repeated double key = 10;
+ * @param index The index of the element to return.
+ * @return The key at the given index.
+ */
+ double getKey(int index);
+
+ /**
+ * repeated int64 value = 11;
+ * @return A list containing the value.
+ */
+ java.util.List getValueList();
+ /**
+ * repeated int64 value = 11;
+ * @return The count of value.
+ */
+ int getValueCount();
+ /**
+ * repeated int64 value = 11;
+ * @param index The index of the element to return.
+ * @return The value at the given index.
+ */
+ long getValue(int index);
+
+ /**
+ * double observed_value = 12;
+ * @return The observedValue.
+ */
+ double getObservedValue();
+
+ /**
+ * int64 observed_count = 13;
+ * @return The observedCount.
+ */
+ long getObservedCount();
+}
diff --git a/Core/src/main/java/org/tribuo/protos/core/CategoricalInfoProto.java b/Core/src/main/java/org/tribuo/protos/core/CategoricalInfoProto.java
new file mode 100644
index 000000000..51a0f6f22
--- /dev/null
+++ b/Core/src/main/java/org/tribuo/protos/core/CategoricalInfoProto.java
@@ -0,0 +1,1115 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: tribuo-core-impl.proto
+
+package org.tribuo.protos.core;
+
+/**
+ *
+ *CategoricalInfo proto
+ *
+ *
+ * Protobuf type {@code tribuo.core.CategoricalInfoProto}
+ */
+public final class CategoricalInfoProto extends
+ com.google.protobuf.GeneratedMessageV3 implements
+ // @@protoc_insertion_point(message_implements:tribuo.core.CategoricalInfoProto)
+ CategoricalInfoProtoOrBuilder {
+private static final long serialVersionUID = 0L;
+ // Use CategoricalInfoProto.newBuilder() to construct.
+ private CategoricalInfoProto(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
+ super(builder);
+ }
+ private CategoricalInfoProto() {
+ name_ = "";
+ key_ = emptyDoubleList();
+ value_ = emptyLongList();
+ }
+
+ @java.lang.Override
+ @SuppressWarnings({"unused"})
+ protected java.lang.Object newInstance(
+ UnusedPrivateParameter unused) {
+ return new CategoricalInfoProto();
+ }
+
+ @java.lang.Override
+ public final com.google.protobuf.UnknownFieldSet
+ getUnknownFields() {
+ return this.unknownFields;
+ }
+ private CategoricalInfoProto(
+ 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 10: {
+ java.lang.String s = input.readStringRequireUtf8();
+
+ name_ = s;
+ break;
+ }
+ case 16: {
+
+ count_ = input.readInt32();
+ break;
+ }
+ case 81: {
+ if (!((mutable_bitField0_ & 0x00000001) != 0)) {
+ key_ = newDoubleList();
+ mutable_bitField0_ |= 0x00000001;
+ }
+ key_.addDouble(input.readDouble());
+ break;
+ }
+ case 82: {
+ int length = input.readRawVarint32();
+ int limit = input.pushLimit(length);
+ if (!((mutable_bitField0_ & 0x00000001) != 0) && input.getBytesUntilLimit() > 0) {
+ key_ = newDoubleList();
+ mutable_bitField0_ |= 0x00000001;
+ }
+ while (input.getBytesUntilLimit() > 0) {
+ key_.addDouble(input.readDouble());
+ }
+ input.popLimit(limit);
+ break;
+ }
+ case 88: {
+ if (!((mutable_bitField0_ & 0x00000002) != 0)) {
+ value_ = newLongList();
+ mutable_bitField0_ |= 0x00000002;
+ }
+ value_.addLong(input.readInt64());
+ break;
+ }
+ case 90: {
+ int length = input.readRawVarint32();
+ int limit = input.pushLimit(length);
+ if (!((mutable_bitField0_ & 0x00000002) != 0) && input.getBytesUntilLimit() > 0) {
+ value_ = newLongList();
+ mutable_bitField0_ |= 0x00000002;
+ }
+ while (input.getBytesUntilLimit() > 0) {
+ value_.addLong(input.readInt64());
+ }
+ input.popLimit(limit);
+ break;
+ }
+ case 97: {
+
+ observedValue_ = input.readDouble();
+ break;
+ }
+ case 104: {
+
+ observedCount_ = input.readInt64();
+ 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)) {
+ key_.makeImmutable(); // C
+ }
+ if (((mutable_bitField0_ & 0x00000002) != 0)) {
+ value_.makeImmutable(); // C
+ }
+ this.unknownFields = unknownFields.build();
+ makeExtensionsImmutable();
+ }
+ }
+ public static final com.google.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return org.tribuo.protos.core.TribuoCoreImpl.internal_static_tribuo_core_CategoricalInfoProto_descriptor;
+ }
+
+ @java.lang.Override
+ protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return org.tribuo.protos.core.TribuoCoreImpl.internal_static_tribuo_core_CategoricalInfoProto_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ org.tribuo.protos.core.CategoricalInfoProto.class, org.tribuo.protos.core.CategoricalInfoProto.Builder.class);
+ }
+
+ public static final int NAME_FIELD_NUMBER = 1;
+ private volatile java.lang.Object name_;
+ /**
+ * string name = 1;
+ * @return The name.
+ */
+ @java.lang.Override
+ public java.lang.String getName() {
+ java.lang.Object ref = name_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ name_ = s;
+ return s;
+ }
+ }
+ /**
+ * string name = 1;
+ * @return The bytes for name.
+ */
+ @java.lang.Override
+ public com.google.protobuf.ByteString
+ getNameBytes() {
+ java.lang.Object ref = name_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ name_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int COUNT_FIELD_NUMBER = 2;
+ private int count_;
+ /**
+ * int32 count = 2;
+ * @return The count.
+ */
+ @java.lang.Override
+ public int getCount() {
+ return count_;
+ }
+
+ public static final int KEY_FIELD_NUMBER = 10;
+ private com.google.protobuf.Internal.DoubleList key_;
+ /**
+ * repeated double key = 10;
+ * @return A list containing the key.
+ */
+ @java.lang.Override
+ public java.util.List
+ getKeyList() {
+ return key_;
+ }
+ /**
+ * repeated double key = 10;
+ * @return The count of key.
+ */
+ public int getKeyCount() {
+ return key_.size();
+ }
+ /**
+ * repeated double key = 10;
+ * @param index The index of the element to return.
+ * @return The key at the given index.
+ */
+ public double getKey(int index) {
+ return key_.getDouble(index);
+ }
+ private int keyMemoizedSerializedSize = -1;
+
+ public static final int VALUE_FIELD_NUMBER = 11;
+ private com.google.protobuf.Internal.LongList value_;
+ /**
+ * repeated int64 value = 11;
+ * @return A list containing the value.
+ */
+ @java.lang.Override
+ public java.util.List
+ getValueList() {
+ return value_;
+ }
+ /**
+ * repeated int64 value = 11;
+ * @return The count of value.
+ */
+ public int getValueCount() {
+ return value_.size();
+ }
+ /**
+ * repeated int64 value = 11;
+ * @param index The index of the element to return.
+ * @return The value at the given index.
+ */
+ public long getValue(int index) {
+ return value_.getLong(index);
+ }
+ private int valueMemoizedSerializedSize = -1;
+
+ public static final int OBSERVED_VALUE_FIELD_NUMBER = 12;
+ private double observedValue_;
+ /**
+ * double observed_value = 12;
+ * @return The observedValue.
+ */
+ @java.lang.Override
+ public double getObservedValue() {
+ return observedValue_;
+ }
+
+ public static final int OBSERVED_COUNT_FIELD_NUMBER = 13;
+ private long observedCount_;
+ /**
+ * int64 observed_count = 13;
+ * @return The observedCount.
+ */
+ @java.lang.Override
+ public long getObservedCount() {
+ return observedCount_;
+ }
+
+ 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_);
+ }
+ if (count_ != 0) {
+ output.writeInt32(2, count_);
+ }
+ if (getKeyList().size() > 0) {
+ output.writeUInt32NoTag(82);
+ output.writeUInt32NoTag(keyMemoizedSerializedSize);
+ }
+ for (int i = 0; i < key_.size(); i++) {
+ output.writeDoubleNoTag(key_.getDouble(i));
+ }
+ if (getValueList().size() > 0) {
+ output.writeUInt32NoTag(90);
+ output.writeUInt32NoTag(valueMemoizedSerializedSize);
+ }
+ for (int i = 0; i < value_.size(); i++) {
+ output.writeInt64NoTag(value_.getLong(i));
+ }
+ if (java.lang.Double.doubleToRawLongBits(observedValue_) != 0) {
+ output.writeDouble(12, observedValue_);
+ }
+ if (observedCount_ != 0L) {
+ output.writeInt64(13, observedCount_);
+ }
+ unknownFields.writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_);
+ }
+ if (count_ != 0) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeInt32Size(2, count_);
+ }
+ {
+ int dataSize = 0;
+ dataSize = 8 * getKeyList().size();
+ size += dataSize;
+ if (!getKeyList().isEmpty()) {
+ size += 1;
+ size += com.google.protobuf.CodedOutputStream
+ .computeInt32SizeNoTag(dataSize);
+ }
+ keyMemoizedSerializedSize = dataSize;
+ }
+ {
+ int dataSize = 0;
+ for (int i = 0; i < value_.size(); i++) {
+ dataSize += com.google.protobuf.CodedOutputStream
+ .computeInt64SizeNoTag(value_.getLong(i));
+ }
+ size += dataSize;
+ if (!getValueList().isEmpty()) {
+ size += 1;
+ size += com.google.protobuf.CodedOutputStream
+ .computeInt32SizeNoTag(dataSize);
+ }
+ valueMemoizedSerializedSize = dataSize;
+ }
+ if (java.lang.Double.doubleToRawLongBits(observedValue_) != 0) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeDoubleSize(12, observedValue_);
+ }
+ if (observedCount_ != 0L) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeInt64Size(13, observedCount_);
+ }
+ 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.protos.core.CategoricalInfoProto)) {
+ return super.equals(obj);
+ }
+ org.tribuo.protos.core.CategoricalInfoProto other = (org.tribuo.protos.core.CategoricalInfoProto) obj;
+
+ if (!getName()
+ .equals(other.getName())) return false;
+ if (getCount()
+ != other.getCount()) return false;
+ if (!getKeyList()
+ .equals(other.getKeyList())) return false;
+ if (!getValueList()
+ .equals(other.getValueList())) return false;
+ if (java.lang.Double.doubleToLongBits(getObservedValue())
+ != java.lang.Double.doubleToLongBits(
+ other.getObservedValue())) return false;
+ if (getObservedCount()
+ != other.getObservedCount()) 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) + NAME_FIELD_NUMBER;
+ hash = (53 * hash) + getName().hashCode();
+ hash = (37 * hash) + COUNT_FIELD_NUMBER;
+ hash = (53 * hash) + getCount();
+ if (getKeyCount() > 0) {
+ hash = (37 * hash) + KEY_FIELD_NUMBER;
+ hash = (53 * hash) + getKeyList().hashCode();
+ }
+ if (getValueCount() > 0) {
+ hash = (37 * hash) + VALUE_FIELD_NUMBER;
+ hash = (53 * hash) + getValueList().hashCode();
+ }
+ hash = (37 * hash) + OBSERVED_VALUE_FIELD_NUMBER;
+ hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
+ java.lang.Double.doubleToLongBits(getObservedValue()));
+ hash = (37 * hash) + OBSERVED_COUNT_FIELD_NUMBER;
+ hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
+ getObservedCount());
+ hash = (29 * hash) + unknownFields.hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static org.tribuo.protos.core.CategoricalInfoProto parseFrom(
+ java.nio.ByteBuffer data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static org.tribuo.protos.core.CategoricalInfoProto parseFrom(
+ java.nio.ByteBuffer data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static org.tribuo.protos.core.CategoricalInfoProto parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static org.tribuo.protos.core.CategoricalInfoProto 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.protos.core.CategoricalInfoProto parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static org.tribuo.protos.core.CategoricalInfoProto parseFrom(
+ byte[] data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static org.tribuo.protos.core.CategoricalInfoProto parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input);
+ }
+ public static org.tribuo.protos.core.CategoricalInfoProto 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.protos.core.CategoricalInfoProto parseDelimitedFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseDelimitedWithIOException(PARSER, input);
+ }
+ public static org.tribuo.protos.core.CategoricalInfoProto 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.protos.core.CategoricalInfoProto parseFrom(
+ com.google.protobuf.CodedInputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input);
+ }
+ public static org.tribuo.protos.core.CategoricalInfoProto 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.protos.core.CategoricalInfoProto 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;
+ }
+ /**
+ *
+ *CategoricalInfo proto
+ *
+ *
+ * Protobuf type {@code tribuo.core.CategoricalInfoProto}
+ */
+ public static final class Builder extends
+ com.google.protobuf.GeneratedMessageV3.Builder implements
+ // @@protoc_insertion_point(builder_implements:tribuo.core.CategoricalInfoProto)
+ org.tribuo.protos.core.CategoricalInfoProtoOrBuilder {
+ public static final com.google.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return org.tribuo.protos.core.TribuoCoreImpl.internal_static_tribuo_core_CategoricalInfoProto_descriptor;
+ }
+
+ @java.lang.Override
+ protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return org.tribuo.protos.core.TribuoCoreImpl.internal_static_tribuo_core_CategoricalInfoProto_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ org.tribuo.protos.core.CategoricalInfoProto.class, org.tribuo.protos.core.CategoricalInfoProto.Builder.class);
+ }
+
+ // Construct using org.tribuo.protos.core.CategoricalInfoProto.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();
+ name_ = "";
+
+ count_ = 0;
+
+ key_ = emptyDoubleList();
+ bitField0_ = (bitField0_ & ~0x00000001);
+ value_ = emptyLongList();
+ bitField0_ = (bitField0_ & ~0x00000002);
+ observedValue_ = 0D;
+
+ observedCount_ = 0L;
+
+ return this;
+ }
+
+ @java.lang.Override
+ public com.google.protobuf.Descriptors.Descriptor
+ getDescriptorForType() {
+ return org.tribuo.protos.core.TribuoCoreImpl.internal_static_tribuo_core_CategoricalInfoProto_descriptor;
+ }
+
+ @java.lang.Override
+ public org.tribuo.protos.core.CategoricalInfoProto getDefaultInstanceForType() {
+ return org.tribuo.protos.core.CategoricalInfoProto.getDefaultInstance();
+ }
+
+ @java.lang.Override
+ public org.tribuo.protos.core.CategoricalInfoProto build() {
+ org.tribuo.protos.core.CategoricalInfoProto result = buildPartial();
+ if (!result.isInitialized()) {
+ throw newUninitializedMessageException(result);
+ }
+ return result;
+ }
+
+ @java.lang.Override
+ public org.tribuo.protos.core.CategoricalInfoProto buildPartial() {
+ org.tribuo.protos.core.CategoricalInfoProto result = new org.tribuo.protos.core.CategoricalInfoProto(this);
+ int from_bitField0_ = bitField0_;
+ result.name_ = name_;
+ result.count_ = count_;
+ if (((bitField0_ & 0x00000001) != 0)) {
+ key_.makeImmutable();
+ bitField0_ = (bitField0_ & ~0x00000001);
+ }
+ result.key_ = key_;
+ if (((bitField0_ & 0x00000002) != 0)) {
+ value_.makeImmutable();
+ bitField0_ = (bitField0_ & ~0x00000002);
+ }
+ result.value_ = value_;
+ result.observedValue_ = observedValue_;
+ result.observedCount_ = observedCount_;
+ 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.protos.core.CategoricalInfoProto) {
+ return mergeFrom((org.tribuo.protos.core.CategoricalInfoProto)other);
+ } else {
+ super.mergeFrom(other);
+ return this;
+ }
+ }
+
+ public Builder mergeFrom(org.tribuo.protos.core.CategoricalInfoProto other) {
+ if (other == org.tribuo.protos.core.CategoricalInfoProto.getDefaultInstance()) return this;
+ if (!other.getName().isEmpty()) {
+ name_ = other.name_;
+ onChanged();
+ }
+ if (other.getCount() != 0) {
+ setCount(other.getCount());
+ }
+ if (!other.key_.isEmpty()) {
+ if (key_.isEmpty()) {
+ key_ = other.key_;
+ bitField0_ = (bitField0_ & ~0x00000001);
+ } else {
+ ensureKeyIsMutable();
+ key_.addAll(other.key_);
+ }
+ onChanged();
+ }
+ if (!other.value_.isEmpty()) {
+ if (value_.isEmpty()) {
+ value_ = other.value_;
+ bitField0_ = (bitField0_ & ~0x00000002);
+ } else {
+ ensureValueIsMutable();
+ value_.addAll(other.value_);
+ }
+ onChanged();
+ }
+ if (other.getObservedValue() != 0D) {
+ setObservedValue(other.getObservedValue());
+ }
+ if (other.getObservedCount() != 0L) {
+ setObservedCount(other.getObservedCount());
+ }
+ 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.protos.core.CategoricalInfoProto parsedMessage = null;
+ try {
+ parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ parsedMessage = (org.tribuo.protos.core.CategoricalInfoProto) e.getUnfinishedMessage();
+ throw e.unwrapIOException();
+ } finally {
+ if (parsedMessage != null) {
+ mergeFrom(parsedMessage);
+ }
+ }
+ return this;
+ }
+ private int bitField0_;
+
+ private java.lang.Object name_ = "";
+ /**
+ * string name = 1;
+ * @return The name.
+ */
+ public java.lang.String getName() {
+ java.lang.Object ref = name_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ name_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ * string name = 1;
+ * @return The bytes for name.
+ */
+ public com.google.protobuf.ByteString
+ getNameBytes() {
+ java.lang.Object ref = name_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ name_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ * string name = 1;
+ * @param value The name to set.
+ * @return This builder for chaining.
+ */
+ public Builder setName(
+ java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ name_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * string name = 1;
+ * @return This builder for chaining.
+ */
+ public Builder clearName() {
+
+ name_ = getDefaultInstance().getName();
+ onChanged();
+ return this;
+ }
+ /**
+ * string name = 1;
+ * @param value The bytes for name to set.
+ * @return This builder for chaining.
+ */
+ public Builder setNameBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ name_ = value;
+ onChanged();
+ return this;
+ }
+
+ private int count_ ;
+ /**
+ * int32 count = 2;
+ * @return The count.
+ */
+ @java.lang.Override
+ public int getCount() {
+ return count_;
+ }
+ /**
+ * int32 count = 2;
+ * @param value The count to set.
+ * @return This builder for chaining.
+ */
+ public Builder setCount(int value) {
+
+ count_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * int32 count = 2;
+ * @return This builder for chaining.
+ */
+ public Builder clearCount() {
+
+ count_ = 0;
+ onChanged();
+ return this;
+ }
+
+ private com.google.protobuf.Internal.DoubleList key_ = emptyDoubleList();
+ private void ensureKeyIsMutable() {
+ if (!((bitField0_ & 0x00000001) != 0)) {
+ key_ = mutableCopy(key_);
+ bitField0_ |= 0x00000001;
+ }
+ }
+ /**
+ * repeated double key = 10;
+ * @return A list containing the key.
+ */
+ public java.util.List
+ getKeyList() {
+ return ((bitField0_ & 0x00000001) != 0) ?
+ java.util.Collections.unmodifiableList(key_) : key_;
+ }
+ /**
+ * repeated double key = 10;
+ * @return The count of key.
+ */
+ public int getKeyCount() {
+ return key_.size();
+ }
+ /**
+ * repeated double key = 10;
+ * @param index The index of the element to return.
+ * @return The key at the given index.
+ */
+ public double getKey(int index) {
+ return key_.getDouble(index);
+ }
+ /**
+ * repeated double key = 10;
+ * @param index The index to set the value at.
+ * @param value The key to set.
+ * @return This builder for chaining.
+ */
+ public Builder setKey(
+ int index, double value) {
+ ensureKeyIsMutable();
+ key_.setDouble(index, value);
+ onChanged();
+ return this;
+ }
+ /**
+ * repeated double key = 10;
+ * @param value The key to add.
+ * @return This builder for chaining.
+ */
+ public Builder addKey(double value) {
+ ensureKeyIsMutable();
+ key_.addDouble(value);
+ onChanged();
+ return this;
+ }
+ /**
+ * repeated double key = 10;
+ * @param values The key to add.
+ * @return This builder for chaining.
+ */
+ public Builder addAllKey(
+ java.lang.Iterable extends java.lang.Double> values) {
+ ensureKeyIsMutable();
+ com.google.protobuf.AbstractMessageLite.Builder.addAll(
+ values, key_);
+ onChanged();
+ return this;
+ }
+ /**
+ * repeated double key = 10;
+ * @return This builder for chaining.
+ */
+ public Builder clearKey() {
+ key_ = emptyDoubleList();
+ bitField0_ = (bitField0_ & ~0x00000001);
+ onChanged();
+ return this;
+ }
+
+ private com.google.protobuf.Internal.LongList value_ = emptyLongList();
+ private void ensureValueIsMutable() {
+ if (!((bitField0_ & 0x00000002) != 0)) {
+ value_ = mutableCopy(value_);
+ bitField0_ |= 0x00000002;
+ }
+ }
+ /**
+ * repeated int64 value = 11;
+ * @return A list containing the value.
+ */
+ public java.util.List
+ getValueList() {
+ return ((bitField0_ & 0x00000002) != 0) ?
+ java.util.Collections.unmodifiableList(value_) : value_;
+ }
+ /**
+ * repeated int64 value = 11;
+ * @return The count of value.
+ */
+ public int getValueCount() {
+ return value_.size();
+ }
+ /**
+ * repeated int64 value = 11;
+ * @param index The index of the element to return.
+ * @return The value at the given index.
+ */
+ public long getValue(int index) {
+ return value_.getLong(index);
+ }
+ /**
+ * repeated int64 value = 11;
+ * @param index The index to set the value at.
+ * @param value The value to set.
+ * @return This builder for chaining.
+ */
+ public Builder setValue(
+ int index, long value) {
+ ensureValueIsMutable();
+ value_.setLong(index, value);
+ onChanged();
+ return this;
+ }
+ /**
+ * repeated int64 value = 11;
+ * @param value The value to add.
+ * @return This builder for chaining.
+ */
+ public Builder addValue(long value) {
+ ensureValueIsMutable();
+ value_.addLong(value);
+ onChanged();
+ return this;
+ }
+ /**
+ * repeated int64 value = 11;
+ * @param values The value to add.
+ * @return This builder for chaining.
+ */
+ public Builder addAllValue(
+ java.lang.Iterable extends java.lang.Long> values) {
+ ensureValueIsMutable();
+ com.google.protobuf.AbstractMessageLite.Builder.addAll(
+ values, value_);
+ onChanged();
+ return this;
+ }
+ /**
+ * repeated int64 value = 11;
+ * @return This builder for chaining.
+ */
+ public Builder clearValue() {
+ value_ = emptyLongList();
+ bitField0_ = (bitField0_ & ~0x00000002);
+ onChanged();
+ return this;
+ }
+
+ private double observedValue_ ;
+ /**
+ * double observed_value = 12;
+ * @return The observedValue.
+ */
+ @java.lang.Override
+ public double getObservedValue() {
+ return observedValue_;
+ }
+ /**
+ * double observed_value = 12;
+ * @param value The observedValue to set.
+ * @return This builder for chaining.
+ */
+ public Builder setObservedValue(double value) {
+
+ observedValue_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * double observed_value = 12;
+ * @return This builder for chaining.
+ */
+ public Builder clearObservedValue() {
+
+ observedValue_ = 0D;
+ onChanged();
+ return this;
+ }
+
+ private long observedCount_ ;
+ /**
+ * int64 observed_count = 13;
+ * @return The observedCount.
+ */
+ @java.lang.Override
+ public long getObservedCount() {
+ return observedCount_;
+ }
+ /**
+ * int64 observed_count = 13;
+ * @param value The observedCount to set.
+ * @return This builder for chaining.
+ */
+ public Builder setObservedCount(long value) {
+
+ observedCount_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * int64 observed_count = 13;
+ * @return This builder for chaining.
+ */
+ public Builder clearObservedCount() {
+
+ observedCount_ = 0L;
+ 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.core.CategoricalInfoProto)
+ }
+
+ // @@protoc_insertion_point(class_scope:tribuo.core.CategoricalInfoProto)
+ private static final org.tribuo.protos.core.CategoricalInfoProto DEFAULT_INSTANCE;
+ static {
+ DEFAULT_INSTANCE = new org.tribuo.protos.core.CategoricalInfoProto();
+ }
+
+ public static org.tribuo.protos.core.CategoricalInfoProto getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser
+ PARSER = new com.google.protobuf.AbstractParser() {
+ @java.lang.Override
+ public CategoricalInfoProto parsePartialFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return new CategoricalInfoProto(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.tribuo.protos.core.CategoricalInfoProto getDefaultInstanceForType() {
+ return DEFAULT_INSTANCE;
+ }
+
+}
+
diff --git a/Core/src/main/java/org/tribuo/protos/core/CategoricalInfoProtoOrBuilder.java b/Core/src/main/java/org/tribuo/protos/core/CategoricalInfoProtoOrBuilder.java
new file mode 100644
index 000000000..6e82a72ff
--- /dev/null
+++ b/Core/src/main/java/org/tribuo/protos/core/CategoricalInfoProtoOrBuilder.java
@@ -0,0 +1,73 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: tribuo-core-impl.proto
+
+package org.tribuo.protos.core;
+
+public interface CategoricalInfoProtoOrBuilder extends
+ // @@protoc_insertion_point(interface_extends:tribuo.core.CategoricalInfoProto)
+ com.google.protobuf.MessageOrBuilder {
+
+ /**
+ * string name = 1;
+ * @return The name.
+ */
+ java.lang.String getName();
+ /**
+ * string name = 1;
+ * @return The bytes for name.
+ */
+ com.google.protobuf.ByteString
+ getNameBytes();
+
+ /**
+ * int32 count = 2;
+ * @return The count.
+ */
+ int getCount();
+
+ /**
+ * repeated double key = 10;
+ * @return A list containing the key.
+ */
+ java.util.List getKeyList();
+ /**
+ * repeated double key = 10;
+ * @return The count of key.
+ */
+ int getKeyCount();
+ /**
+ * repeated double key = 10;
+ * @param index The index of the element to return.
+ * @return The key at the given index.
+ */
+ double getKey(int index);
+
+ /**
+ * repeated int64 value = 11;
+ * @return A list containing the value.
+ */
+ java.util.List getValueList();
+ /**
+ * repeated int64 value = 11;
+ * @return The count of value.
+ */
+ int getValueCount();
+ /**
+ * repeated int64 value = 11;
+ * @param index The index of the element to return.
+ * @return The value at the given index.
+ */
+ long getValue(int index);
+
+ /**
+ * double observed_value = 12;
+ * @return The observedValue.
+ */
+ double getObservedValue();
+
+ /**
+ * int64 observed_count = 13;
+ * @return The observedCount.
+ */
+ long getObservedCount();
+}
diff --git a/Core/src/main/java/org/tribuo/protos/core/DatasetProto.java b/Core/src/main/java/org/tribuo/protos/core/DatasetProto.java
new file mode 100644
index 000000000..294b42e69
--- /dev/null
+++ b/Core/src/main/java/org/tribuo/protos/core/DatasetProto.java
@@ -0,0 +1,1734 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: tribuo-core.proto
+
+package org.tribuo.protos.core;
+
+/**
+ *
+ *Dataset proto
+ *
+ *
+ * Protobuf type {@code tribuo.core.DatasetProto}
+ */
+public final class DatasetProto extends
+ com.google.protobuf.GeneratedMessageV3 implements
+ // @@protoc_insertion_point(message_implements:tribuo.core.DatasetProto)
+ DatasetProtoOrBuilder {
+private static final long serialVersionUID = 0L;
+ // Use DatasetProto.newBuilder() to construct.
+ private DatasetProto(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
+ super(builder);
+ }
+ private DatasetProto() {
+ className_ = "";
+ examples_ = java.util.Collections.emptyList();
+ }
+
+ @java.lang.Override
+ @SuppressWarnings({"unused"})
+ protected java.lang.Object newInstance(
+ UnusedPrivateParameter unused) {
+ return new DatasetProto();
+ }
+
+ @java.lang.Override
+ public final com.google.protobuf.UnknownFieldSet
+ getUnknownFields() {
+ return this.unknownFields;
+ }
+ private DatasetProto(
+ 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: {
+
+ version_ = input.readInt32();
+ break;
+ }
+ case 18: {
+ java.lang.String s = input.readStringRequireUtf8();
+
+ className_ = s;
+ break;
+ }
+ case 26: {
+ com.oracle.labs.mlrg.olcut.config.protobuf.protos.RootProvenanceProto.Builder subBuilder = null;
+ if (provenance_ != null) {
+ subBuilder = provenance_.toBuilder();
+ }
+ provenance_ = input.readMessage(com.oracle.labs.mlrg.olcut.config.protobuf.protos.RootProvenanceProto.parser(), extensionRegistry);
+ if (subBuilder != null) {
+ subBuilder.mergeFrom(provenance_);
+ provenance_ = subBuilder.buildPartial();
+ }
+
+ break;
+ }
+ case 34: {
+ org.tribuo.protos.core.FeatureDomainProto.Builder subBuilder = null;
+ if (featureDomain_ != null) {
+ subBuilder = featureDomain_.toBuilder();
+ }
+ featureDomain_ = input.readMessage(org.tribuo.protos.core.FeatureDomainProto.parser(), extensionRegistry);
+ if (subBuilder != null) {
+ subBuilder.mergeFrom(featureDomain_);
+ featureDomain_ = subBuilder.buildPartial();
+ }
+
+ break;
+ }
+ case 42: {
+ org.tribuo.protos.core.OutputDomainProto.Builder subBuilder = null;
+ if (outputDomain_ != null) {
+ subBuilder = outputDomain_.toBuilder();
+ }
+ outputDomain_ = input.readMessage(org.tribuo.protos.core.OutputDomainProto.parser(), extensionRegistry);
+ if (subBuilder != null) {
+ subBuilder.mergeFrom(outputDomain_);
+ outputDomain_ = subBuilder.buildPartial();
+ }
+
+ break;
+ }
+ case 50: {
+ if (!((mutable_bitField0_ & 0x00000001) != 0)) {
+ examples_ = new java.util.ArrayList();
+ mutable_bitField0_ |= 0x00000001;
+ }
+ examples_.add(
+ input.readMessage(org.tribuo.protos.core.ExampleProto.parser(), extensionRegistry));
+ break;
+ }
+ case 58: {
+ com.oracle.labs.mlrg.olcut.config.protobuf.protos.ListProvenanceProto.Builder subBuilder = null;
+ if (transformProvenance_ != null) {
+ subBuilder = transformProvenance_.toBuilder();
+ }
+ transformProvenance_ = input.readMessage(com.oracle.labs.mlrg.olcut.config.protobuf.protos.ListProvenanceProto.parser(), extensionRegistry);
+ if (subBuilder != null) {
+ subBuilder.mergeFrom(transformProvenance_);
+ transformProvenance_ = subBuilder.buildPartial();
+ }
+
+ 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)) {
+ examples_ = java.util.Collections.unmodifiableList(examples_);
+ }
+ this.unknownFields = unknownFields.build();
+ makeExtensionsImmutable();
+ }
+ }
+ public static final com.google.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return org.tribuo.protos.core.TribuoCore.internal_static_tribuo_core_DatasetProto_descriptor;
+ }
+
+ @java.lang.Override
+ protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return org.tribuo.protos.core.TribuoCore.internal_static_tribuo_core_DatasetProto_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ org.tribuo.protos.core.DatasetProto.class, org.tribuo.protos.core.DatasetProto.Builder.class);
+ }
+
+ public static final int VERSION_FIELD_NUMBER = 1;
+ private int version_;
+ /**
+ * int32 version = 1;
+ * @return The version.
+ */
+ @java.lang.Override
+ public int getVersion() {
+ return version_;
+ }
+
+ public static final int CLASS_NAME_FIELD_NUMBER = 2;
+ private volatile java.lang.Object className_;
+ /**
+ * string class_name = 2;
+ * @return The className.
+ */
+ @java.lang.Override
+ public java.lang.String getClassName() {
+ java.lang.Object ref = className_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ className_ = s;
+ return s;
+ }
+ }
+ /**
+ * string class_name = 2;
+ * @return The bytes for className.
+ */
+ @java.lang.Override
+ public com.google.protobuf.ByteString
+ getClassNameBytes() {
+ java.lang.Object ref = className_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ className_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int PROVENANCE_FIELD_NUMBER = 3;
+ private com.oracle.labs.mlrg.olcut.config.protobuf.protos.RootProvenanceProto provenance_;
+ /**
+ * .olcut.RootProvenanceProto provenance = 3;
+ * @return Whether the provenance field is set.
+ */
+ @java.lang.Override
+ public boolean hasProvenance() {
+ return provenance_ != null;
+ }
+ /**
+ * .olcut.RootProvenanceProto provenance = 3;
+ * @return The provenance.
+ */
+ @java.lang.Override
+ public com.oracle.labs.mlrg.olcut.config.protobuf.protos.RootProvenanceProto getProvenance() {
+ return provenance_ == null ? com.oracle.labs.mlrg.olcut.config.protobuf.protos.RootProvenanceProto.getDefaultInstance() : provenance_;
+ }
+ /**
+ * .olcut.RootProvenanceProto provenance = 3;
+ */
+ @java.lang.Override
+ public com.oracle.labs.mlrg.olcut.config.protobuf.protos.RootProvenanceProtoOrBuilder getProvenanceOrBuilder() {
+ return getProvenance();
+ }
+
+ public static final int FEATURE_DOMAIN_FIELD_NUMBER = 4;
+ private org.tribuo.protos.core.FeatureDomainProto featureDomain_;
+ /**
+ * .tribuo.core.FeatureDomainProto feature_domain = 4;
+ * @return Whether the featureDomain field is set.
+ */
+ @java.lang.Override
+ public boolean hasFeatureDomain() {
+ return featureDomain_ != null;
+ }
+ /**
+ * .tribuo.core.FeatureDomainProto feature_domain = 4;
+ * @return The featureDomain.
+ */
+ @java.lang.Override
+ public org.tribuo.protos.core.FeatureDomainProto getFeatureDomain() {
+ return featureDomain_ == null ? org.tribuo.protos.core.FeatureDomainProto.getDefaultInstance() : featureDomain_;
+ }
+ /**
+ * .tribuo.core.FeatureDomainProto feature_domain = 4;
+ */
+ @java.lang.Override
+ public org.tribuo.protos.core.FeatureDomainProtoOrBuilder getFeatureDomainOrBuilder() {
+ return getFeatureDomain();
+ }
+
+ public static final int OUTPUT_DOMAIN_FIELD_NUMBER = 5;
+ private org.tribuo.protos.core.OutputDomainProto outputDomain_;
+ /**
+ * .tribuo.core.OutputDomainProto output_domain = 5;
+ * @return Whether the outputDomain field is set.
+ */
+ @java.lang.Override
+ public boolean hasOutputDomain() {
+ return outputDomain_ != null;
+ }
+ /**
+ * .tribuo.core.OutputDomainProto output_domain = 5;
+ * @return The outputDomain.
+ */
+ @java.lang.Override
+ public org.tribuo.protos.core.OutputDomainProto getOutputDomain() {
+ return outputDomain_ == null ? org.tribuo.protos.core.OutputDomainProto.getDefaultInstance() : outputDomain_;
+ }
+ /**
+ * .tribuo.core.OutputDomainProto output_domain = 5;
+ */
+ @java.lang.Override
+ public org.tribuo.protos.core.OutputDomainProtoOrBuilder getOutputDomainOrBuilder() {
+ return getOutputDomain();
+ }
+
+ public static final int EXAMPLES_FIELD_NUMBER = 6;
+ private java.util.List examples_;
+ /**
+ * repeated .tribuo.core.ExampleProto examples = 6;
+ */
+ @java.lang.Override
+ public java.util.List getExamplesList() {
+ return examples_;
+ }
+ /**
+ * repeated .tribuo.core.ExampleProto examples = 6;
+ */
+ @java.lang.Override
+ public java.util.List extends org.tribuo.protos.core.ExampleProtoOrBuilder>
+ getExamplesOrBuilderList() {
+ return examples_;
+ }
+ /**
+ * repeated .tribuo.core.ExampleProto examples = 6;
+ */
+ @java.lang.Override
+ public int getExamplesCount() {
+ return examples_.size();
+ }
+ /**
+ * repeated .tribuo.core.ExampleProto examples = 6;
+ */
+ @java.lang.Override
+ public org.tribuo.protos.core.ExampleProto getExamples(int index) {
+ return examples_.get(index);
+ }
+ /**
+ * repeated .tribuo.core.ExampleProto examples = 6;
+ */
+ @java.lang.Override
+ public org.tribuo.protos.core.ExampleProtoOrBuilder getExamplesOrBuilder(
+ int index) {
+ return examples_.get(index);
+ }
+
+ public static final int TRANSFORM_PROVENANCE_FIELD_NUMBER = 7;
+ private com.oracle.labs.mlrg.olcut.config.protobuf.protos.ListProvenanceProto transformProvenance_;
+ /**
+ * .olcut.ListProvenanceProto transform_provenance = 7;
+ * @return Whether the transformProvenance field is set.
+ */
+ @java.lang.Override
+ public boolean hasTransformProvenance() {
+ return transformProvenance_ != null;
+ }
+ /**
+ * .olcut.ListProvenanceProto transform_provenance = 7;
+ * @return The transformProvenance.
+ */
+ @java.lang.Override
+ public com.oracle.labs.mlrg.olcut.config.protobuf.protos.ListProvenanceProto getTransformProvenance() {
+ return transformProvenance_ == null ? com.oracle.labs.mlrg.olcut.config.protobuf.protos.ListProvenanceProto.getDefaultInstance() : transformProvenance_;
+ }
+ /**
+ * .olcut.ListProvenanceProto transform_provenance = 7;
+ */
+ @java.lang.Override
+ public com.oracle.labs.mlrg.olcut.config.protobuf.protos.ListProvenanceProtoOrBuilder getTransformProvenanceOrBuilder() {
+ return getTransformProvenance();
+ }
+
+ 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 (version_ != 0) {
+ output.writeInt32(1, version_);
+ }
+ if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(className_)) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 2, className_);
+ }
+ if (provenance_ != null) {
+ output.writeMessage(3, getProvenance());
+ }
+ if (featureDomain_ != null) {
+ output.writeMessage(4, getFeatureDomain());
+ }
+ if (outputDomain_ != null) {
+ output.writeMessage(5, getOutputDomain());
+ }
+ for (int i = 0; i < examples_.size(); i++) {
+ output.writeMessage(6, examples_.get(i));
+ }
+ if (transformProvenance_ != null) {
+ output.writeMessage(7, getTransformProvenance());
+ }
+ unknownFields.writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (version_ != 0) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeInt32Size(1, version_);
+ }
+ if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(className_)) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, className_);
+ }
+ if (provenance_ != null) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeMessageSize(3, getProvenance());
+ }
+ if (featureDomain_ != null) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeMessageSize(4, getFeatureDomain());
+ }
+ if (outputDomain_ != null) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeMessageSize(5, getOutputDomain());
+ }
+ for (int i = 0; i < examples_.size(); i++) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeMessageSize(6, examples_.get(i));
+ }
+ if (transformProvenance_ != null) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeMessageSize(7, getTransformProvenance());
+ }
+ 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.protos.core.DatasetProto)) {
+ return super.equals(obj);
+ }
+ org.tribuo.protos.core.DatasetProto other = (org.tribuo.protos.core.DatasetProto) obj;
+
+ if (getVersion()
+ != other.getVersion()) return false;
+ if (!getClassName()
+ .equals(other.getClassName())) return false;
+ if (hasProvenance() != other.hasProvenance()) return false;
+ if (hasProvenance()) {
+ if (!getProvenance()
+ .equals(other.getProvenance())) return false;
+ }
+ if (hasFeatureDomain() != other.hasFeatureDomain()) return false;
+ if (hasFeatureDomain()) {
+ if (!getFeatureDomain()
+ .equals(other.getFeatureDomain())) return false;
+ }
+ if (hasOutputDomain() != other.hasOutputDomain()) return false;
+ if (hasOutputDomain()) {
+ if (!getOutputDomain()
+ .equals(other.getOutputDomain())) return false;
+ }
+ if (!getExamplesList()
+ .equals(other.getExamplesList())) return false;
+ if (hasTransformProvenance() != other.hasTransformProvenance()) return false;
+ if (hasTransformProvenance()) {
+ if (!getTransformProvenance()
+ .equals(other.getTransformProvenance())) 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) + VERSION_FIELD_NUMBER;
+ hash = (53 * hash) + getVersion();
+ hash = (37 * hash) + CLASS_NAME_FIELD_NUMBER;
+ hash = (53 * hash) + getClassName().hashCode();
+ if (hasProvenance()) {
+ hash = (37 * hash) + PROVENANCE_FIELD_NUMBER;
+ hash = (53 * hash) + getProvenance().hashCode();
+ }
+ if (hasFeatureDomain()) {
+ hash = (37 * hash) + FEATURE_DOMAIN_FIELD_NUMBER;
+ hash = (53 * hash) + getFeatureDomain().hashCode();
+ }
+ if (hasOutputDomain()) {
+ hash = (37 * hash) + OUTPUT_DOMAIN_FIELD_NUMBER;
+ hash = (53 * hash) + getOutputDomain().hashCode();
+ }
+ if (getExamplesCount() > 0) {
+ hash = (37 * hash) + EXAMPLES_FIELD_NUMBER;
+ hash = (53 * hash) + getExamplesList().hashCode();
+ }
+ if (hasTransformProvenance()) {
+ hash = (37 * hash) + TRANSFORM_PROVENANCE_FIELD_NUMBER;
+ hash = (53 * hash) + getTransformProvenance().hashCode();
+ }
+ hash = (29 * hash) + unknownFields.hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static org.tribuo.protos.core.DatasetProto parseFrom(
+ java.nio.ByteBuffer data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static org.tribuo.protos.core.DatasetProto parseFrom(
+ java.nio.ByteBuffer data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static org.tribuo.protos.core.DatasetProto parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static org.tribuo.protos.core.DatasetProto 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.protos.core.DatasetProto parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static org.tribuo.protos.core.DatasetProto parseFrom(
+ byte[] data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static org.tribuo.protos.core.DatasetProto parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input);
+ }
+ public static org.tribuo.protos.core.DatasetProto 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.protos.core.DatasetProto parseDelimitedFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseDelimitedWithIOException(PARSER, input);
+ }
+ public static org.tribuo.protos.core.DatasetProto 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.protos.core.DatasetProto parseFrom(
+ com.google.protobuf.CodedInputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input);
+ }
+ public static org.tribuo.protos.core.DatasetProto 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.protos.core.DatasetProto 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;
+ }
+ /**
+ *
+ *Dataset proto
+ *
+ *
+ * Protobuf type {@code tribuo.core.DatasetProto}
+ */
+ public static final class Builder extends
+ com.google.protobuf.GeneratedMessageV3.Builder implements
+ // @@protoc_insertion_point(builder_implements:tribuo.core.DatasetProto)
+ org.tribuo.protos.core.DatasetProtoOrBuilder {
+ public static final com.google.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return org.tribuo.protos.core.TribuoCore.internal_static_tribuo_core_DatasetProto_descriptor;
+ }
+
+ @java.lang.Override
+ protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return org.tribuo.protos.core.TribuoCore.internal_static_tribuo_core_DatasetProto_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ org.tribuo.protos.core.DatasetProto.class, org.tribuo.protos.core.DatasetProto.Builder.class);
+ }
+
+ // Construct using org.tribuo.protos.core.DatasetProto.newBuilder()
+ private Builder() {
+ maybeForceBuilderInitialization();
+ }
+
+ private Builder(
+ com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+ super(parent);
+ maybeForceBuilderInitialization();
+ }
+ private void maybeForceBuilderInitialization() {
+ if (com.google.protobuf.GeneratedMessageV3
+ .alwaysUseFieldBuilders) {
+ getExamplesFieldBuilder();
+ }
+ }
+ @java.lang.Override
+ public Builder clear() {
+ super.clear();
+ version_ = 0;
+
+ className_ = "";
+
+ if (provenanceBuilder_ == null) {
+ provenance_ = null;
+ } else {
+ provenance_ = null;
+ provenanceBuilder_ = null;
+ }
+ if (featureDomainBuilder_ == null) {
+ featureDomain_ = null;
+ } else {
+ featureDomain_ = null;
+ featureDomainBuilder_ = null;
+ }
+ if (outputDomainBuilder_ == null) {
+ outputDomain_ = null;
+ } else {
+ outputDomain_ = null;
+ outputDomainBuilder_ = null;
+ }
+ if (examplesBuilder_ == null) {
+ examples_ = java.util.Collections.emptyList();
+ bitField0_ = (bitField0_ & ~0x00000001);
+ } else {
+ examplesBuilder_.clear();
+ }
+ if (transformProvenanceBuilder_ == null) {
+ transformProvenance_ = null;
+ } else {
+ transformProvenance_ = null;
+ transformProvenanceBuilder_ = null;
+ }
+ return this;
+ }
+
+ @java.lang.Override
+ public com.google.protobuf.Descriptors.Descriptor
+ getDescriptorForType() {
+ return org.tribuo.protos.core.TribuoCore.internal_static_tribuo_core_DatasetProto_descriptor;
+ }
+
+ @java.lang.Override
+ public org.tribuo.protos.core.DatasetProto getDefaultInstanceForType() {
+ return org.tribuo.protos.core.DatasetProto.getDefaultInstance();
+ }
+
+ @java.lang.Override
+ public org.tribuo.protos.core.DatasetProto build() {
+ org.tribuo.protos.core.DatasetProto result = buildPartial();
+ if (!result.isInitialized()) {
+ throw newUninitializedMessageException(result);
+ }
+ return result;
+ }
+
+ @java.lang.Override
+ public org.tribuo.protos.core.DatasetProto buildPartial() {
+ org.tribuo.protos.core.DatasetProto result = new org.tribuo.protos.core.DatasetProto(this);
+ int from_bitField0_ = bitField0_;
+ result.version_ = version_;
+ result.className_ = className_;
+ if (provenanceBuilder_ == null) {
+ result.provenance_ = provenance_;
+ } else {
+ result.provenance_ = provenanceBuilder_.build();
+ }
+ if (featureDomainBuilder_ == null) {
+ result.featureDomain_ = featureDomain_;
+ } else {
+ result.featureDomain_ = featureDomainBuilder_.build();
+ }
+ if (outputDomainBuilder_ == null) {
+ result.outputDomain_ = outputDomain_;
+ } else {
+ result.outputDomain_ = outputDomainBuilder_.build();
+ }
+ if (examplesBuilder_ == null) {
+ if (((bitField0_ & 0x00000001) != 0)) {
+ examples_ = java.util.Collections.unmodifiableList(examples_);
+ bitField0_ = (bitField0_ & ~0x00000001);
+ }
+ result.examples_ = examples_;
+ } else {
+ result.examples_ = examplesBuilder_.build();
+ }
+ if (transformProvenanceBuilder_ == null) {
+ result.transformProvenance_ = transformProvenance_;
+ } else {
+ result.transformProvenance_ = transformProvenanceBuilder_.build();
+ }
+ 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.protos.core.DatasetProto) {
+ return mergeFrom((org.tribuo.protos.core.DatasetProto)other);
+ } else {
+ super.mergeFrom(other);
+ return this;
+ }
+ }
+
+ public Builder mergeFrom(org.tribuo.protos.core.DatasetProto other) {
+ if (other == org.tribuo.protos.core.DatasetProto.getDefaultInstance()) return this;
+ if (other.getVersion() != 0) {
+ setVersion(other.getVersion());
+ }
+ if (!other.getClassName().isEmpty()) {
+ className_ = other.className_;
+ onChanged();
+ }
+ if (other.hasProvenance()) {
+ mergeProvenance(other.getProvenance());
+ }
+ if (other.hasFeatureDomain()) {
+ mergeFeatureDomain(other.getFeatureDomain());
+ }
+ if (other.hasOutputDomain()) {
+ mergeOutputDomain(other.getOutputDomain());
+ }
+ if (examplesBuilder_ == null) {
+ if (!other.examples_.isEmpty()) {
+ if (examples_.isEmpty()) {
+ examples_ = other.examples_;
+ bitField0_ = (bitField0_ & ~0x00000001);
+ } else {
+ ensureExamplesIsMutable();
+ examples_.addAll(other.examples_);
+ }
+ onChanged();
+ }
+ } else {
+ if (!other.examples_.isEmpty()) {
+ if (examplesBuilder_.isEmpty()) {
+ examplesBuilder_.dispose();
+ examplesBuilder_ = null;
+ examples_ = other.examples_;
+ bitField0_ = (bitField0_ & ~0x00000001);
+ examplesBuilder_ =
+ com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
+ getExamplesFieldBuilder() : null;
+ } else {
+ examplesBuilder_.addAllMessages(other.examples_);
+ }
+ }
+ }
+ if (other.hasTransformProvenance()) {
+ mergeTransformProvenance(other.getTransformProvenance());
+ }
+ 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.protos.core.DatasetProto parsedMessage = null;
+ try {
+ parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ parsedMessage = (org.tribuo.protos.core.DatasetProto) e.getUnfinishedMessage();
+ throw e.unwrapIOException();
+ } finally {
+ if (parsedMessage != null) {
+ mergeFrom(parsedMessage);
+ }
+ }
+ return this;
+ }
+ private int bitField0_;
+
+ private int version_ ;
+ /**
+ * int32 version = 1;
+ * @return The version.
+ */
+ @java.lang.Override
+ public int getVersion() {
+ return version_;
+ }
+ /**
+ * int32 version = 1;
+ * @param value The version to set.
+ * @return This builder for chaining.
+ */
+ public Builder setVersion(int value) {
+
+ version_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * int32 version = 1;
+ * @return This builder for chaining.
+ */
+ public Builder clearVersion() {
+
+ version_ = 0;
+ onChanged();
+ return this;
+ }
+
+ private java.lang.Object className_ = "";
+ /**
+ * string class_name = 2;
+ * @return The className.
+ */
+ public java.lang.String getClassName() {
+ java.lang.Object ref = className_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ className_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ * string class_name = 2;
+ * @return The bytes for className.
+ */
+ public com.google.protobuf.ByteString
+ getClassNameBytes() {
+ java.lang.Object ref = className_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ className_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ * string class_name = 2;
+ * @param value The className to set.
+ * @return This builder for chaining.
+ */
+ public Builder setClassName(
+ java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ className_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * string class_name = 2;
+ * @return This builder for chaining.
+ */
+ public Builder clearClassName() {
+
+ className_ = getDefaultInstance().getClassName();
+ onChanged();
+ return this;
+ }
+ /**
+ * string class_name = 2;
+ * @param value The bytes for className to set.
+ * @return This builder for chaining.
+ */
+ public Builder setClassNameBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ className_ = value;
+ onChanged();
+ return this;
+ }
+
+ private com.oracle.labs.mlrg.olcut.config.protobuf.protos.RootProvenanceProto provenance_;
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.oracle.labs.mlrg.olcut.config.protobuf.protos.RootProvenanceProto, com.oracle.labs.mlrg.olcut.config.protobuf.protos.RootProvenanceProto.Builder, com.oracle.labs.mlrg.olcut.config.protobuf.protos.RootProvenanceProtoOrBuilder> provenanceBuilder_;
+ /**
+ * .olcut.RootProvenanceProto provenance = 3;
+ * @return Whether the provenance field is set.
+ */
+ public boolean hasProvenance() {
+ return provenanceBuilder_ != null || provenance_ != null;
+ }
+ /**
+ * .olcut.RootProvenanceProto provenance = 3;
+ * @return The provenance.
+ */
+ public com.oracle.labs.mlrg.olcut.config.protobuf.protos.RootProvenanceProto getProvenance() {
+ if (provenanceBuilder_ == null) {
+ return provenance_ == null ? com.oracle.labs.mlrg.olcut.config.protobuf.protos.RootProvenanceProto.getDefaultInstance() : provenance_;
+ } else {
+ return provenanceBuilder_.getMessage();
+ }
+ }
+ /**
+ * .olcut.RootProvenanceProto provenance = 3;
+ */
+ public Builder setProvenance(com.oracle.labs.mlrg.olcut.config.protobuf.protos.RootProvenanceProto value) {
+ if (provenanceBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ provenance_ = value;
+ onChanged();
+ } else {
+ provenanceBuilder_.setMessage(value);
+ }
+
+ return this;
+ }
+ /**
+ * .olcut.RootProvenanceProto provenance = 3;
+ */
+ public Builder setProvenance(
+ com.oracle.labs.mlrg.olcut.config.protobuf.protos.RootProvenanceProto.Builder builderForValue) {
+ if (provenanceBuilder_ == null) {
+ provenance_ = builderForValue.build();
+ onChanged();
+ } else {
+ provenanceBuilder_.setMessage(builderForValue.build());
+ }
+
+ return this;
+ }
+ /**
+ * .olcut.RootProvenanceProto provenance = 3;
+ */
+ public Builder mergeProvenance(com.oracle.labs.mlrg.olcut.config.protobuf.protos.RootProvenanceProto value) {
+ if (provenanceBuilder_ == null) {
+ if (provenance_ != null) {
+ provenance_ =
+ com.oracle.labs.mlrg.olcut.config.protobuf.protos.RootProvenanceProto.newBuilder(provenance_).mergeFrom(value).buildPartial();
+ } else {
+ provenance_ = value;
+ }
+ onChanged();
+ } else {
+ provenanceBuilder_.mergeFrom(value);
+ }
+
+ return this;
+ }
+ /**
+ * .olcut.RootProvenanceProto provenance = 3;
+ */
+ public Builder clearProvenance() {
+ if (provenanceBuilder_ == null) {
+ provenance_ = null;
+ onChanged();
+ } else {
+ provenance_ = null;
+ provenanceBuilder_ = null;
+ }
+
+ return this;
+ }
+ /**
+ * .olcut.RootProvenanceProto provenance = 3;
+ */
+ public com.oracle.labs.mlrg.olcut.config.protobuf.protos.RootProvenanceProto.Builder getProvenanceBuilder() {
+
+ onChanged();
+ return getProvenanceFieldBuilder().getBuilder();
+ }
+ /**
+ * .olcut.RootProvenanceProto provenance = 3;
+ */
+ public com.oracle.labs.mlrg.olcut.config.protobuf.protos.RootProvenanceProtoOrBuilder getProvenanceOrBuilder() {
+ if (provenanceBuilder_ != null) {
+ return provenanceBuilder_.getMessageOrBuilder();
+ } else {
+ return provenance_ == null ?
+ com.oracle.labs.mlrg.olcut.config.protobuf.protos.RootProvenanceProto.getDefaultInstance() : provenance_;
+ }
+ }
+ /**
+ * .olcut.RootProvenanceProto provenance = 3;
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.oracle.labs.mlrg.olcut.config.protobuf.protos.RootProvenanceProto, com.oracle.labs.mlrg.olcut.config.protobuf.protos.RootProvenanceProto.Builder, com.oracle.labs.mlrg.olcut.config.protobuf.protos.RootProvenanceProtoOrBuilder>
+ getProvenanceFieldBuilder() {
+ if (provenanceBuilder_ == null) {
+ provenanceBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
+ com.oracle.labs.mlrg.olcut.config.protobuf.protos.RootProvenanceProto, com.oracle.labs.mlrg.olcut.config.protobuf.protos.RootProvenanceProto.Builder, com.oracle.labs.mlrg.olcut.config.protobuf.protos.RootProvenanceProtoOrBuilder>(
+ getProvenance(),
+ getParentForChildren(),
+ isClean());
+ provenance_ = null;
+ }
+ return provenanceBuilder_;
+ }
+
+ private org.tribuo.protos.core.FeatureDomainProto featureDomain_;
+ private com.google.protobuf.SingleFieldBuilderV3<
+ org.tribuo.protos.core.FeatureDomainProto, org.tribuo.protos.core.FeatureDomainProto.Builder, org.tribuo.protos.core.FeatureDomainProtoOrBuilder> featureDomainBuilder_;
+ /**
+ * .tribuo.core.FeatureDomainProto feature_domain = 4;
+ * @return Whether the featureDomain field is set.
+ */
+ public boolean hasFeatureDomain() {
+ return featureDomainBuilder_ != null || featureDomain_ != null;
+ }
+ /**
+ * .tribuo.core.FeatureDomainProto feature_domain = 4;
+ * @return The featureDomain.
+ */
+ public org.tribuo.protos.core.FeatureDomainProto getFeatureDomain() {
+ if (featureDomainBuilder_ == null) {
+ return featureDomain_ == null ? org.tribuo.protos.core.FeatureDomainProto.getDefaultInstance() : featureDomain_;
+ } else {
+ return featureDomainBuilder_.getMessage();
+ }
+ }
+ /**
+ * .tribuo.core.FeatureDomainProto feature_domain = 4;
+ */
+ public Builder setFeatureDomain(org.tribuo.protos.core.FeatureDomainProto value) {
+ if (featureDomainBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ featureDomain_ = value;
+ onChanged();
+ } else {
+ featureDomainBuilder_.setMessage(value);
+ }
+
+ return this;
+ }
+ /**
+ * .tribuo.core.FeatureDomainProto feature_domain = 4;
+ */
+ public Builder setFeatureDomain(
+ org.tribuo.protos.core.FeatureDomainProto.Builder builderForValue) {
+ if (featureDomainBuilder_ == null) {
+ featureDomain_ = builderForValue.build();
+ onChanged();
+ } else {
+ featureDomainBuilder_.setMessage(builderForValue.build());
+ }
+
+ return this;
+ }
+ /**
+ * .tribuo.core.FeatureDomainProto feature_domain = 4;
+ */
+ public Builder mergeFeatureDomain(org.tribuo.protos.core.FeatureDomainProto value) {
+ if (featureDomainBuilder_ == null) {
+ if (featureDomain_ != null) {
+ featureDomain_ =
+ org.tribuo.protos.core.FeatureDomainProto.newBuilder(featureDomain_).mergeFrom(value).buildPartial();
+ } else {
+ featureDomain_ = value;
+ }
+ onChanged();
+ } else {
+ featureDomainBuilder_.mergeFrom(value);
+ }
+
+ return this;
+ }
+ /**
+ * .tribuo.core.FeatureDomainProto feature_domain = 4;
+ */
+ public Builder clearFeatureDomain() {
+ if (featureDomainBuilder_ == null) {
+ featureDomain_ = null;
+ onChanged();
+ } else {
+ featureDomain_ = null;
+ featureDomainBuilder_ = null;
+ }
+
+ return this;
+ }
+ /**
+ * .tribuo.core.FeatureDomainProto feature_domain = 4;
+ */
+ public org.tribuo.protos.core.FeatureDomainProto.Builder getFeatureDomainBuilder() {
+
+ onChanged();
+ return getFeatureDomainFieldBuilder().getBuilder();
+ }
+ /**
+ * .tribuo.core.FeatureDomainProto feature_domain = 4;
+ */
+ public org.tribuo.protos.core.FeatureDomainProtoOrBuilder getFeatureDomainOrBuilder() {
+ if (featureDomainBuilder_ != null) {
+ return featureDomainBuilder_.getMessageOrBuilder();
+ } else {
+ return featureDomain_ == null ?
+ org.tribuo.protos.core.FeatureDomainProto.getDefaultInstance() : featureDomain_;
+ }
+ }
+ /**
+ * .tribuo.core.FeatureDomainProto feature_domain = 4;
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ org.tribuo.protos.core.FeatureDomainProto, org.tribuo.protos.core.FeatureDomainProto.Builder, org.tribuo.protos.core.FeatureDomainProtoOrBuilder>
+ getFeatureDomainFieldBuilder() {
+ if (featureDomainBuilder_ == null) {
+ featureDomainBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
+ org.tribuo.protos.core.FeatureDomainProto, org.tribuo.protos.core.FeatureDomainProto.Builder, org.tribuo.protos.core.FeatureDomainProtoOrBuilder>(
+ getFeatureDomain(),
+ getParentForChildren(),
+ isClean());
+ featureDomain_ = null;
+ }
+ return featureDomainBuilder_;
+ }
+
+ private org.tribuo.protos.core.OutputDomainProto outputDomain_;
+ private com.google.protobuf.SingleFieldBuilderV3<
+ org.tribuo.protos.core.OutputDomainProto, org.tribuo.protos.core.OutputDomainProto.Builder, org.tribuo.protos.core.OutputDomainProtoOrBuilder> outputDomainBuilder_;
+ /**
+ * .tribuo.core.OutputDomainProto output_domain = 5;
+ * @return Whether the outputDomain field is set.
+ */
+ public boolean hasOutputDomain() {
+ return outputDomainBuilder_ != null || outputDomain_ != null;
+ }
+ /**
+ * .tribuo.core.OutputDomainProto output_domain = 5;
+ * @return The outputDomain.
+ */
+ public org.tribuo.protos.core.OutputDomainProto getOutputDomain() {
+ if (outputDomainBuilder_ == null) {
+ return outputDomain_ == null ? org.tribuo.protos.core.OutputDomainProto.getDefaultInstance() : outputDomain_;
+ } else {
+ return outputDomainBuilder_.getMessage();
+ }
+ }
+ /**
+ * .tribuo.core.OutputDomainProto output_domain = 5;
+ */
+ public Builder setOutputDomain(org.tribuo.protos.core.OutputDomainProto value) {
+ if (outputDomainBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ outputDomain_ = value;
+ onChanged();
+ } else {
+ outputDomainBuilder_.setMessage(value);
+ }
+
+ return this;
+ }
+ /**
+ * .tribuo.core.OutputDomainProto output_domain = 5;
+ */
+ public Builder setOutputDomain(
+ org.tribuo.protos.core.OutputDomainProto.Builder builderForValue) {
+ if (outputDomainBuilder_ == null) {
+ outputDomain_ = builderForValue.build();
+ onChanged();
+ } else {
+ outputDomainBuilder_.setMessage(builderForValue.build());
+ }
+
+ return this;
+ }
+ /**
+ * .tribuo.core.OutputDomainProto output_domain = 5;
+ */
+ public Builder mergeOutputDomain(org.tribuo.protos.core.OutputDomainProto value) {
+ if (outputDomainBuilder_ == null) {
+ if (outputDomain_ != null) {
+ outputDomain_ =
+ org.tribuo.protos.core.OutputDomainProto.newBuilder(outputDomain_).mergeFrom(value).buildPartial();
+ } else {
+ outputDomain_ = value;
+ }
+ onChanged();
+ } else {
+ outputDomainBuilder_.mergeFrom(value);
+ }
+
+ return this;
+ }
+ /**
+ * .tribuo.core.OutputDomainProto output_domain = 5;
+ */
+ public Builder clearOutputDomain() {
+ if (outputDomainBuilder_ == null) {
+ outputDomain_ = null;
+ onChanged();
+ } else {
+ outputDomain_ = null;
+ outputDomainBuilder_ = null;
+ }
+
+ return this;
+ }
+ /**
+ * .tribuo.core.OutputDomainProto output_domain = 5;
+ */
+ public org.tribuo.protos.core.OutputDomainProto.Builder getOutputDomainBuilder() {
+
+ onChanged();
+ return getOutputDomainFieldBuilder().getBuilder();
+ }
+ /**
+ * .tribuo.core.OutputDomainProto output_domain = 5;
+ */
+ public org.tribuo.protos.core.OutputDomainProtoOrBuilder getOutputDomainOrBuilder() {
+ if (outputDomainBuilder_ != null) {
+ return outputDomainBuilder_.getMessageOrBuilder();
+ } else {
+ return outputDomain_ == null ?
+ org.tribuo.protos.core.OutputDomainProto.getDefaultInstance() : outputDomain_;
+ }
+ }
+ /**
+ * .tribuo.core.OutputDomainProto output_domain = 5;
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ org.tribuo.protos.core.OutputDomainProto, org.tribuo.protos.core.OutputDomainProto.Builder, org.tribuo.protos.core.OutputDomainProtoOrBuilder>
+ getOutputDomainFieldBuilder() {
+ if (outputDomainBuilder_ == null) {
+ outputDomainBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
+ org.tribuo.protos.core.OutputDomainProto, org.tribuo.protos.core.OutputDomainProto.Builder, org.tribuo.protos.core.OutputDomainProtoOrBuilder>(
+ getOutputDomain(),
+ getParentForChildren(),
+ isClean());
+ outputDomain_ = null;
+ }
+ return outputDomainBuilder_;
+ }
+
+ private java.util.List examples_ =
+ java.util.Collections.emptyList();
+ private void ensureExamplesIsMutable() {
+ if (!((bitField0_ & 0x00000001) != 0)) {
+ examples_ = new java.util.ArrayList(examples_);
+ bitField0_ |= 0x00000001;
+ }
+ }
+
+ private com.google.protobuf.RepeatedFieldBuilderV3<
+ org.tribuo.protos.core.ExampleProto, org.tribuo.protos.core.ExampleProto.Builder, org.tribuo.protos.core.ExampleProtoOrBuilder> examplesBuilder_;
+
+ /**
+ * repeated .tribuo.core.ExampleProto examples = 6;
+ */
+ public java.util.List getExamplesList() {
+ if (examplesBuilder_ == null) {
+ return java.util.Collections.unmodifiableList(examples_);
+ } else {
+ return examplesBuilder_.getMessageList();
+ }
+ }
+ /**
+ * repeated .tribuo.core.ExampleProto examples = 6;
+ */
+ public int getExamplesCount() {
+ if (examplesBuilder_ == null) {
+ return examples_.size();
+ } else {
+ return examplesBuilder_.getCount();
+ }
+ }
+ /**
+ * repeated .tribuo.core.ExampleProto examples = 6;
+ */
+ public org.tribuo.protos.core.ExampleProto getExamples(int index) {
+ if (examplesBuilder_ == null) {
+ return examples_.get(index);
+ } else {
+ return examplesBuilder_.getMessage(index);
+ }
+ }
+ /**
+ * repeated .tribuo.core.ExampleProto examples = 6;
+ */
+ public Builder setExamples(
+ int index, org.tribuo.protos.core.ExampleProto value) {
+ if (examplesBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureExamplesIsMutable();
+ examples_.set(index, value);
+ onChanged();
+ } else {
+ examplesBuilder_.setMessage(index, value);
+ }
+ return this;
+ }
+ /**
+ * repeated .tribuo.core.ExampleProto examples = 6;
+ */
+ public Builder setExamples(
+ int index, org.tribuo.protos.core.ExampleProto.Builder builderForValue) {
+ if (examplesBuilder_ == null) {
+ ensureExamplesIsMutable();
+ examples_.set(index, builderForValue.build());
+ onChanged();
+ } else {
+ examplesBuilder_.setMessage(index, builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ * repeated .tribuo.core.ExampleProto examples = 6;
+ */
+ public Builder addExamples(org.tribuo.protos.core.ExampleProto value) {
+ if (examplesBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureExamplesIsMutable();
+ examples_.add(value);
+ onChanged();
+ } else {
+ examplesBuilder_.addMessage(value);
+ }
+ return this;
+ }
+ /**
+ * repeated .tribuo.core.ExampleProto examples = 6;
+ */
+ public Builder addExamples(
+ int index, org.tribuo.protos.core.ExampleProto value) {
+ if (examplesBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureExamplesIsMutable();
+ examples_.add(index, value);
+ onChanged();
+ } else {
+ examplesBuilder_.addMessage(index, value);
+ }
+ return this;
+ }
+ /**
+ * repeated .tribuo.core.ExampleProto examples = 6;
+ */
+ public Builder addExamples(
+ org.tribuo.protos.core.ExampleProto.Builder builderForValue) {
+ if (examplesBuilder_ == null) {
+ ensureExamplesIsMutable();
+ examples_.add(builderForValue.build());
+ onChanged();
+ } else {
+ examplesBuilder_.addMessage(builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ * repeated .tribuo.core.ExampleProto examples = 6;
+ */
+ public Builder addExamples(
+ int index, org.tribuo.protos.core.ExampleProto.Builder builderForValue) {
+ if (examplesBuilder_ == null) {
+ ensureExamplesIsMutable();
+ examples_.add(index, builderForValue.build());
+ onChanged();
+ } else {
+ examplesBuilder_.addMessage(index, builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ * repeated .tribuo.core.ExampleProto examples = 6;
+ */
+ public Builder addAllExamples(
+ java.lang.Iterable extends org.tribuo.protos.core.ExampleProto> values) {
+ if (examplesBuilder_ == null) {
+ ensureExamplesIsMutable();
+ com.google.protobuf.AbstractMessageLite.Builder.addAll(
+ values, examples_);
+ onChanged();
+ } else {
+ examplesBuilder_.addAllMessages(values);
+ }
+ return this;
+ }
+ /**
+ * repeated .tribuo.core.ExampleProto examples = 6;
+ */
+ public Builder clearExamples() {
+ if (examplesBuilder_ == null) {
+ examples_ = java.util.Collections.emptyList();
+ bitField0_ = (bitField0_ & ~0x00000001);
+ onChanged();
+ } else {
+ examplesBuilder_.clear();
+ }
+ return this;
+ }
+ /**
+ * repeated .tribuo.core.ExampleProto examples = 6;
+ */
+ public Builder removeExamples(int index) {
+ if (examplesBuilder_ == null) {
+ ensureExamplesIsMutable();
+ examples_.remove(index);
+ onChanged();
+ } else {
+ examplesBuilder_.remove(index);
+ }
+ return this;
+ }
+ /**
+ * repeated .tribuo.core.ExampleProto examples = 6;
+ */
+ public org.tribuo.protos.core.ExampleProto.Builder getExamplesBuilder(
+ int index) {
+ return getExamplesFieldBuilder().getBuilder(index);
+ }
+ /**
+ * repeated .tribuo.core.ExampleProto examples = 6;
+ */
+ public org.tribuo.protos.core.ExampleProtoOrBuilder getExamplesOrBuilder(
+ int index) {
+ if (examplesBuilder_ == null) {
+ return examples_.get(index); } else {
+ return examplesBuilder_.getMessageOrBuilder(index);
+ }
+ }
+ /**
+ * repeated .tribuo.core.ExampleProto examples = 6;
+ */
+ public java.util.List extends org.tribuo.protos.core.ExampleProtoOrBuilder>
+ getExamplesOrBuilderList() {
+ if (examplesBuilder_ != null) {
+ return examplesBuilder_.getMessageOrBuilderList();
+ } else {
+ return java.util.Collections.unmodifiableList(examples_);
+ }
+ }
+ /**
+ * repeated .tribuo.core.ExampleProto examples = 6;
+ */
+ public org.tribuo.protos.core.ExampleProto.Builder addExamplesBuilder() {
+ return getExamplesFieldBuilder().addBuilder(
+ org.tribuo.protos.core.ExampleProto.getDefaultInstance());
+ }
+ /**
+ * repeated .tribuo.core.ExampleProto examples = 6;
+ */
+ public org.tribuo.protos.core.ExampleProto.Builder addExamplesBuilder(
+ int index) {
+ return getExamplesFieldBuilder().addBuilder(
+ index, org.tribuo.protos.core.ExampleProto.getDefaultInstance());
+ }
+ /**
+ * repeated .tribuo.core.ExampleProto examples = 6;
+ */
+ public java.util.List
+ getExamplesBuilderList() {
+ return getExamplesFieldBuilder().getBuilderList();
+ }
+ private com.google.protobuf.RepeatedFieldBuilderV3<
+ org.tribuo.protos.core.ExampleProto, org.tribuo.protos.core.ExampleProto.Builder, org.tribuo.protos.core.ExampleProtoOrBuilder>
+ getExamplesFieldBuilder() {
+ if (examplesBuilder_ == null) {
+ examplesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
+ org.tribuo.protos.core.ExampleProto, org.tribuo.protos.core.ExampleProto.Builder, org.tribuo.protos.core.ExampleProtoOrBuilder>(
+ examples_,
+ ((bitField0_ & 0x00000001) != 0),
+ getParentForChildren(),
+ isClean());
+ examples_ = null;
+ }
+ return examplesBuilder_;
+ }
+
+ private com.oracle.labs.mlrg.olcut.config.protobuf.protos.ListProvenanceProto transformProvenance_;
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.oracle.labs.mlrg.olcut.config.protobuf.protos.ListProvenanceProto, com.oracle.labs.mlrg.olcut.config.protobuf.protos.ListProvenanceProto.Builder, com.oracle.labs.mlrg.olcut.config.protobuf.protos.ListProvenanceProtoOrBuilder> transformProvenanceBuilder_;
+ /**
+ * .olcut.ListProvenanceProto transform_provenance = 7;
+ * @return Whether the transformProvenance field is set.
+ */
+ public boolean hasTransformProvenance() {
+ return transformProvenanceBuilder_ != null || transformProvenance_ != null;
+ }
+ /**
+ * .olcut.ListProvenanceProto transform_provenance = 7;
+ * @return The transformProvenance.
+ */
+ public com.oracle.labs.mlrg.olcut.config.protobuf.protos.ListProvenanceProto getTransformProvenance() {
+ if (transformProvenanceBuilder_ == null) {
+ return transformProvenance_ == null ? com.oracle.labs.mlrg.olcut.config.protobuf.protos.ListProvenanceProto.getDefaultInstance() : transformProvenance_;
+ } else {
+ return transformProvenanceBuilder_.getMessage();
+ }
+ }
+ /**
+ * .olcut.ListProvenanceProto transform_provenance = 7;
+ */
+ public Builder setTransformProvenance(com.oracle.labs.mlrg.olcut.config.protobuf.protos.ListProvenanceProto value) {
+ if (transformProvenanceBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ transformProvenance_ = value;
+ onChanged();
+ } else {
+ transformProvenanceBuilder_.setMessage(value);
+ }
+
+ return this;
+ }
+ /**
+ * .olcut.ListProvenanceProto transform_provenance = 7;
+ */
+ public Builder setTransformProvenance(
+ com.oracle.labs.mlrg.olcut.config.protobuf.protos.ListProvenanceProto.Builder builderForValue) {
+ if (transformProvenanceBuilder_ == null) {
+ transformProvenance_ = builderForValue.build();
+ onChanged();
+ } else {
+ transformProvenanceBuilder_.setMessage(builderForValue.build());
+ }
+
+ return this;
+ }
+ /**
+ * .olcut.ListProvenanceProto transform_provenance = 7;
+ */
+ public Builder mergeTransformProvenance(com.oracle.labs.mlrg.olcut.config.protobuf.protos.ListProvenanceProto value) {
+ if (transformProvenanceBuilder_ == null) {
+ if (transformProvenance_ != null) {
+ transformProvenance_ =
+ com.oracle.labs.mlrg.olcut.config.protobuf.protos.ListProvenanceProto.newBuilder(transformProvenance_).mergeFrom(value).buildPartial();
+ } else {
+ transformProvenance_ = value;
+ }
+ onChanged();
+ } else {
+ transformProvenanceBuilder_.mergeFrom(value);
+ }
+
+ return this;
+ }
+ /**
+ * .olcut.ListProvenanceProto transform_provenance = 7;
+ */
+ public Builder clearTransformProvenance() {
+ if (transformProvenanceBuilder_ == null) {
+ transformProvenance_ = null;
+ onChanged();
+ } else {
+ transformProvenance_ = null;
+ transformProvenanceBuilder_ = null;
+ }
+
+ return this;
+ }
+ /**
+ * .olcut.ListProvenanceProto transform_provenance = 7;
+ */
+ public com.oracle.labs.mlrg.olcut.config.protobuf.protos.ListProvenanceProto.Builder getTransformProvenanceBuilder() {
+
+ onChanged();
+ return getTransformProvenanceFieldBuilder().getBuilder();
+ }
+ /**
+ * .olcut.ListProvenanceProto transform_provenance = 7;
+ */
+ public com.oracle.labs.mlrg.olcut.config.protobuf.protos.ListProvenanceProtoOrBuilder getTransformProvenanceOrBuilder() {
+ if (transformProvenanceBuilder_ != null) {
+ return transformProvenanceBuilder_.getMessageOrBuilder();
+ } else {
+ return transformProvenance_ == null ?
+ com.oracle.labs.mlrg.olcut.config.protobuf.protos.ListProvenanceProto.getDefaultInstance() : transformProvenance_;
+ }
+ }
+ /**
+ * .olcut.ListProvenanceProto transform_provenance = 7;
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.oracle.labs.mlrg.olcut.config.protobuf.protos.ListProvenanceProto, com.oracle.labs.mlrg.olcut.config.protobuf.protos.ListProvenanceProto.Builder, com.oracle.labs.mlrg.olcut.config.protobuf.protos.ListProvenanceProtoOrBuilder>
+ getTransformProvenanceFieldBuilder() {
+ if (transformProvenanceBuilder_ == null) {
+ transformProvenanceBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
+ com.oracle.labs.mlrg.olcut.config.protobuf.protos.ListProvenanceProto, com.oracle.labs.mlrg.olcut.config.protobuf.protos.ListProvenanceProto.Builder, com.oracle.labs.mlrg.olcut.config.protobuf.protos.ListProvenanceProtoOrBuilder>(
+ getTransformProvenance(),
+ getParentForChildren(),
+ isClean());
+ transformProvenance_ = null;
+ }
+ return transformProvenanceBuilder_;
+ }
+ @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.core.DatasetProto)
+ }
+
+ // @@protoc_insertion_point(class_scope:tribuo.core.DatasetProto)
+ private static final org.tribuo.protos.core.DatasetProto DEFAULT_INSTANCE;
+ static {
+ DEFAULT_INSTANCE = new org.tribuo.protos.core.DatasetProto();
+ }
+
+ public static org.tribuo.protos.core.DatasetProto getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser
+ PARSER = new com.google.protobuf.AbstractParser() {
+ @java.lang.Override
+ public DatasetProto parsePartialFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return new DatasetProto(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.tribuo.protos.core.DatasetProto getDefaultInstanceForType() {
+ return DEFAULT_INSTANCE;
+ }
+
+}
+
diff --git a/Core/src/main/java/org/tribuo/protos/core/DatasetProtoOrBuilder.java b/Core/src/main/java/org/tribuo/protos/core/DatasetProtoOrBuilder.java
new file mode 100644
index 000000000..474e9bc33
--- /dev/null
+++ b/Core/src/main/java/org/tribuo/protos/core/DatasetProtoOrBuilder.java
@@ -0,0 +1,111 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: tribuo-core.proto
+
+package org.tribuo.protos.core;
+
+public interface DatasetProtoOrBuilder extends
+ // @@protoc_insertion_point(interface_extends:tribuo.core.DatasetProto)
+ com.google.protobuf.MessageOrBuilder {
+
+ /**
+ * int32 version = 1;
+ * @return The version.
+ */
+ int getVersion();
+
+ /**
+ * string class_name = 2;
+ * @return The className.
+ */
+ java.lang.String getClassName();
+ /**
+ * string class_name = 2;
+ * @return The bytes for className.
+ */
+ com.google.protobuf.ByteString
+ getClassNameBytes();
+
+ /**
+ * .olcut.RootProvenanceProto provenance = 3;
+ * @return Whether the provenance field is set.
+ */
+ boolean hasProvenance();
+ /**
+ * .olcut.RootProvenanceProto provenance = 3;
+ * @return The provenance.
+ */
+ com.oracle.labs.mlrg.olcut.config.protobuf.protos.RootProvenanceProto getProvenance();
+ /**
+ * .olcut.RootProvenanceProto provenance = 3;
+ */
+ com.oracle.labs.mlrg.olcut.config.protobuf.protos.RootProvenanceProtoOrBuilder getProvenanceOrBuilder();
+
+ /**
+ * .tribuo.core.FeatureDomainProto feature_domain = 4;
+ * @return Whether the featureDomain field is set.
+ */
+ boolean hasFeatureDomain();
+ /**
+ * .tribuo.core.FeatureDomainProto feature_domain = 4;
+ * @return The featureDomain.
+ */
+ org.tribuo.protos.core.FeatureDomainProto getFeatureDomain();
+ /**
+ * .tribuo.core.FeatureDomainProto feature_domain = 4;
+ */
+ org.tribuo.protos.core.FeatureDomainProtoOrBuilder getFeatureDomainOrBuilder();
+
+ /**
+ * .tribuo.core.OutputDomainProto output_domain = 5;
+ * @return Whether the outputDomain field is set.
+ */
+ boolean hasOutputDomain();
+ /**
+ * .tribuo.core.OutputDomainProto output_domain = 5;
+ * @return The outputDomain.
+ */
+ org.tribuo.protos.core.OutputDomainProto getOutputDomain();
+ /**
+ * .tribuo.core.OutputDomainProto output_domain = 5;
+ */
+ org.tribuo.protos.core.OutputDomainProtoOrBuilder getOutputDomainOrBuilder();
+
+ /**
+ * repeated .tribuo.core.ExampleProto examples = 6;
+ */
+ java.util.List
+ getExamplesList();
+ /**
+ * repeated .tribuo.core.ExampleProto examples = 6;
+ */
+ org.tribuo.protos.core.ExampleProto getExamples(int index);
+ /**
+ * repeated .tribuo.core.ExampleProto examples = 6;
+ */
+ int getExamplesCount();
+ /**
+ * repeated .tribuo.core.ExampleProto examples = 6;
+ */
+ java.util.List extends org.tribuo.protos.core.ExampleProtoOrBuilder>
+ getExamplesOrBuilderList();
+ /**
+ * repeated .tribuo.core.ExampleProto examples = 6;
+ */
+ org.tribuo.protos.core.ExampleProtoOrBuilder getExamplesOrBuilder(
+ int index);
+
+ /**
+ * .olcut.ListProvenanceProto transform_provenance = 7;
+ * @return Whether the transformProvenance field is set.
+ */
+ boolean hasTransformProvenance();
+ /**
+ * .olcut.ListProvenanceProto transform_provenance = 7;
+ * @return The transformProvenance.
+ */
+ com.oracle.labs.mlrg.olcut.config.protobuf.protos.ListProvenanceProto getTransformProvenance();
+ /**
+ * .olcut.ListProvenanceProto transform_provenance = 7;
+ */
+ com.oracle.labs.mlrg.olcut.config.protobuf.protos.ListProvenanceProtoOrBuilder getTransformProvenanceOrBuilder();
+}
diff --git a/Core/src/main/java/org/tribuo/protos/core/EnsembleCombinerProto.java b/Core/src/main/java/org/tribuo/protos/core/EnsembleCombinerProto.java
new file mode 100644
index 000000000..1ce7060cd
--- /dev/null
+++ b/Core/src/main/java/org/tribuo/protos/core/EnsembleCombinerProto.java
@@ -0,0 +1,819 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: tribuo-core.proto
+
+package org.tribuo.protos.core;
+
+/**
+ *
+ *Combiner redirection proto
+ *
+ *
+ * Protobuf type {@code tribuo.core.EnsembleCombinerProto}
+ */
+public final class EnsembleCombinerProto extends
+ com.google.protobuf.GeneratedMessageV3 implements
+ // @@protoc_insertion_point(message_implements:tribuo.core.EnsembleCombinerProto)
+ EnsembleCombinerProtoOrBuilder {
+private static final long serialVersionUID = 0L;
+ // Use EnsembleCombinerProto.newBuilder() to construct.
+ private EnsembleCombinerProto(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
+ super(builder);
+ }
+ private EnsembleCombinerProto() {
+ className_ = "";
+ }
+
+ @java.lang.Override
+ @SuppressWarnings({"unused"})
+ protected java.lang.Object newInstance(
+ UnusedPrivateParameter unused) {
+ return new EnsembleCombinerProto();
+ }
+
+ @java.lang.Override
+ public final com.google.protobuf.UnknownFieldSet
+ getUnknownFields() {
+ return this.unknownFields;
+ }
+ private EnsembleCombinerProto(
+ 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: {
+
+ version_ = input.readInt32();
+ break;
+ }
+ case 18: {
+ java.lang.String s = input.readStringRequireUtf8();
+
+ className_ = s;
+ break;
+ }
+ case 26: {
+ com.google.protobuf.Any.Builder subBuilder = null;
+ if (serializedData_ != null) {
+ subBuilder = serializedData_.toBuilder();
+ }
+ serializedData_ = input.readMessage(com.google.protobuf.Any.parser(), extensionRegistry);
+ if (subBuilder != null) {
+ subBuilder.mergeFrom(serializedData_);
+ serializedData_ = subBuilder.buildPartial();
+ }
+
+ 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 {
+ this.unknownFields = unknownFields.build();
+ makeExtensionsImmutable();
+ }
+ }
+ public static final com.google.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return org.tribuo.protos.core.TribuoCore.internal_static_tribuo_core_EnsembleCombinerProto_descriptor;
+ }
+
+ @java.lang.Override
+ protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return org.tribuo.protos.core.TribuoCore.internal_static_tribuo_core_EnsembleCombinerProto_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ org.tribuo.protos.core.EnsembleCombinerProto.class, org.tribuo.protos.core.EnsembleCombinerProto.Builder.class);
+ }
+
+ public static final int VERSION_FIELD_NUMBER = 1;
+ private int version_;
+ /**
+ * int32 version = 1;
+ * @return The version.
+ */
+ @java.lang.Override
+ public int getVersion() {
+ return version_;
+ }
+
+ public static final int CLASS_NAME_FIELD_NUMBER = 2;
+ private volatile java.lang.Object className_;
+ /**
+ * string class_name = 2;
+ * @return The className.
+ */
+ @java.lang.Override
+ public java.lang.String getClassName() {
+ java.lang.Object ref = className_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ className_ = s;
+ return s;
+ }
+ }
+ /**
+ * string class_name = 2;
+ * @return The bytes for className.
+ */
+ @java.lang.Override
+ public com.google.protobuf.ByteString
+ getClassNameBytes() {
+ java.lang.Object ref = className_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ className_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int SERIALIZED_DATA_FIELD_NUMBER = 3;
+ private com.google.protobuf.Any serializedData_;
+ /**
+ * .google.protobuf.Any serialized_data = 3;
+ * @return Whether the serializedData field is set.
+ */
+ @java.lang.Override
+ public boolean hasSerializedData() {
+ return serializedData_ != null;
+ }
+ /**
+ * .google.protobuf.Any serialized_data = 3;
+ * @return The serializedData.
+ */
+ @java.lang.Override
+ public com.google.protobuf.Any getSerializedData() {
+ return serializedData_ == null ? com.google.protobuf.Any.getDefaultInstance() : serializedData_;
+ }
+ /**
+ * .google.protobuf.Any serialized_data = 3;
+ */
+ @java.lang.Override
+ public com.google.protobuf.AnyOrBuilder getSerializedDataOrBuilder() {
+ return getSerializedData();
+ }
+
+ 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 (version_ != 0) {
+ output.writeInt32(1, version_);
+ }
+ if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(className_)) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 2, className_);
+ }
+ if (serializedData_ != null) {
+ output.writeMessage(3, getSerializedData());
+ }
+ unknownFields.writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (version_ != 0) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeInt32Size(1, version_);
+ }
+ if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(className_)) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, className_);
+ }
+ if (serializedData_ != null) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeMessageSize(3, getSerializedData());
+ }
+ 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.protos.core.EnsembleCombinerProto)) {
+ return super.equals(obj);
+ }
+ org.tribuo.protos.core.EnsembleCombinerProto other = (org.tribuo.protos.core.EnsembleCombinerProto) obj;
+
+ if (getVersion()
+ != other.getVersion()) return false;
+ if (!getClassName()
+ .equals(other.getClassName())) return false;
+ if (hasSerializedData() != other.hasSerializedData()) return false;
+ if (hasSerializedData()) {
+ if (!getSerializedData()
+ .equals(other.getSerializedData())) 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) + VERSION_FIELD_NUMBER;
+ hash = (53 * hash) + getVersion();
+ hash = (37 * hash) + CLASS_NAME_FIELD_NUMBER;
+ hash = (53 * hash) + getClassName().hashCode();
+ if (hasSerializedData()) {
+ hash = (37 * hash) + SERIALIZED_DATA_FIELD_NUMBER;
+ hash = (53 * hash) + getSerializedData().hashCode();
+ }
+ hash = (29 * hash) + unknownFields.hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static org.tribuo.protos.core.EnsembleCombinerProto parseFrom(
+ java.nio.ByteBuffer data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static org.tribuo.protos.core.EnsembleCombinerProto parseFrom(
+ java.nio.ByteBuffer data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static org.tribuo.protos.core.EnsembleCombinerProto parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static org.tribuo.protos.core.EnsembleCombinerProto 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.protos.core.EnsembleCombinerProto parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static org.tribuo.protos.core.EnsembleCombinerProto parseFrom(
+ byte[] data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static org.tribuo.protos.core.EnsembleCombinerProto parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input);
+ }
+ public static org.tribuo.protos.core.EnsembleCombinerProto 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.protos.core.EnsembleCombinerProto parseDelimitedFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseDelimitedWithIOException(PARSER, input);
+ }
+ public static org.tribuo.protos.core.EnsembleCombinerProto 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.protos.core.EnsembleCombinerProto parseFrom(
+ com.google.protobuf.CodedInputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input);
+ }
+ public static org.tribuo.protos.core.EnsembleCombinerProto 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.protos.core.EnsembleCombinerProto 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;
+ }
+ /**
+ *
+ *Combiner redirection proto
+ *
+ *
+ * Protobuf type {@code tribuo.core.EnsembleCombinerProto}
+ */
+ public static final class Builder extends
+ com.google.protobuf.GeneratedMessageV3.Builder implements
+ // @@protoc_insertion_point(builder_implements:tribuo.core.EnsembleCombinerProto)
+ org.tribuo.protos.core.EnsembleCombinerProtoOrBuilder {
+ public static final com.google.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return org.tribuo.protos.core.TribuoCore.internal_static_tribuo_core_EnsembleCombinerProto_descriptor;
+ }
+
+ @java.lang.Override
+ protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return org.tribuo.protos.core.TribuoCore.internal_static_tribuo_core_EnsembleCombinerProto_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ org.tribuo.protos.core.EnsembleCombinerProto.class, org.tribuo.protos.core.EnsembleCombinerProto.Builder.class);
+ }
+
+ // Construct using org.tribuo.protos.core.EnsembleCombinerProto.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();
+ version_ = 0;
+
+ className_ = "";
+
+ if (serializedDataBuilder_ == null) {
+ serializedData_ = null;
+ } else {
+ serializedData_ = null;
+ serializedDataBuilder_ = null;
+ }
+ return this;
+ }
+
+ @java.lang.Override
+ public com.google.protobuf.Descriptors.Descriptor
+ getDescriptorForType() {
+ return org.tribuo.protos.core.TribuoCore.internal_static_tribuo_core_EnsembleCombinerProto_descriptor;
+ }
+
+ @java.lang.Override
+ public org.tribuo.protos.core.EnsembleCombinerProto getDefaultInstanceForType() {
+ return org.tribuo.protos.core.EnsembleCombinerProto.getDefaultInstance();
+ }
+
+ @java.lang.Override
+ public org.tribuo.protos.core.EnsembleCombinerProto build() {
+ org.tribuo.protos.core.EnsembleCombinerProto result = buildPartial();
+ if (!result.isInitialized()) {
+ throw newUninitializedMessageException(result);
+ }
+ return result;
+ }
+
+ @java.lang.Override
+ public org.tribuo.protos.core.EnsembleCombinerProto buildPartial() {
+ org.tribuo.protos.core.EnsembleCombinerProto result = new org.tribuo.protos.core.EnsembleCombinerProto(this);
+ result.version_ = version_;
+ result.className_ = className_;
+ if (serializedDataBuilder_ == null) {
+ result.serializedData_ = serializedData_;
+ } else {
+ result.serializedData_ = serializedDataBuilder_.build();
+ }
+ 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.protos.core.EnsembleCombinerProto) {
+ return mergeFrom((org.tribuo.protos.core.EnsembleCombinerProto)other);
+ } else {
+ super.mergeFrom(other);
+ return this;
+ }
+ }
+
+ public Builder mergeFrom(org.tribuo.protos.core.EnsembleCombinerProto other) {
+ if (other == org.tribuo.protos.core.EnsembleCombinerProto.getDefaultInstance()) return this;
+ if (other.getVersion() != 0) {
+ setVersion(other.getVersion());
+ }
+ if (!other.getClassName().isEmpty()) {
+ className_ = other.className_;
+ onChanged();
+ }
+ if (other.hasSerializedData()) {
+ mergeSerializedData(other.getSerializedData());
+ }
+ 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.protos.core.EnsembleCombinerProto parsedMessage = null;
+ try {
+ parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ parsedMessage = (org.tribuo.protos.core.EnsembleCombinerProto) e.getUnfinishedMessage();
+ throw e.unwrapIOException();
+ } finally {
+ if (parsedMessage != null) {
+ mergeFrom(parsedMessage);
+ }
+ }
+ return this;
+ }
+
+ private int version_ ;
+ /**
+ * int32 version = 1;
+ * @return The version.
+ */
+ @java.lang.Override
+ public int getVersion() {
+ return version_;
+ }
+ /**
+ * int32 version = 1;
+ * @param value The version to set.
+ * @return This builder for chaining.
+ */
+ public Builder setVersion(int value) {
+
+ version_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * int32 version = 1;
+ * @return This builder for chaining.
+ */
+ public Builder clearVersion() {
+
+ version_ = 0;
+ onChanged();
+ return this;
+ }
+
+ private java.lang.Object className_ = "";
+ /**
+ * string class_name = 2;
+ * @return The className.
+ */
+ public java.lang.String getClassName() {
+ java.lang.Object ref = className_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ className_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ * string class_name = 2;
+ * @return The bytes for className.
+ */
+ public com.google.protobuf.ByteString
+ getClassNameBytes() {
+ java.lang.Object ref = className_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ className_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ * string class_name = 2;
+ * @param value The className to set.
+ * @return This builder for chaining.
+ */
+ public Builder setClassName(
+ java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ className_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * string class_name = 2;
+ * @return This builder for chaining.
+ */
+ public Builder clearClassName() {
+
+ className_ = getDefaultInstance().getClassName();
+ onChanged();
+ return this;
+ }
+ /**
+ * string class_name = 2;
+ * @param value The bytes for className to set.
+ * @return This builder for chaining.
+ */
+ public Builder setClassNameBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ className_ = value;
+ onChanged();
+ return this;
+ }
+
+ private com.google.protobuf.Any serializedData_;
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder> serializedDataBuilder_;
+ /**
+ * .google.protobuf.Any serialized_data = 3;
+ * @return Whether the serializedData field is set.
+ */
+ public boolean hasSerializedData() {
+ return serializedDataBuilder_ != null || serializedData_ != null;
+ }
+ /**
+ * .google.protobuf.Any serialized_data = 3;
+ * @return The serializedData.
+ */
+ public com.google.protobuf.Any getSerializedData() {
+ if (serializedDataBuilder_ == null) {
+ return serializedData_ == null ? com.google.protobuf.Any.getDefaultInstance() : serializedData_;
+ } else {
+ return serializedDataBuilder_.getMessage();
+ }
+ }
+ /**
+ * .google.protobuf.Any serialized_data = 3;
+ */
+ public Builder setSerializedData(com.google.protobuf.Any value) {
+ if (serializedDataBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ serializedData_ = value;
+ onChanged();
+ } else {
+ serializedDataBuilder_.setMessage(value);
+ }
+
+ return this;
+ }
+ /**
+ * .google.protobuf.Any serialized_data = 3;
+ */
+ public Builder setSerializedData(
+ com.google.protobuf.Any.Builder builderForValue) {
+ if (serializedDataBuilder_ == null) {
+ serializedData_ = builderForValue.build();
+ onChanged();
+ } else {
+ serializedDataBuilder_.setMessage(builderForValue.build());
+ }
+
+ return this;
+ }
+ /**
+ * .google.protobuf.Any serialized_data = 3;
+ */
+ public Builder mergeSerializedData(com.google.protobuf.Any value) {
+ if (serializedDataBuilder_ == null) {
+ if (serializedData_ != null) {
+ serializedData_ =
+ com.google.protobuf.Any.newBuilder(serializedData_).mergeFrom(value).buildPartial();
+ } else {
+ serializedData_ = value;
+ }
+ onChanged();
+ } else {
+ serializedDataBuilder_.mergeFrom(value);
+ }
+
+ return this;
+ }
+ /**
+ * .google.protobuf.Any serialized_data = 3;
+ */
+ public Builder clearSerializedData() {
+ if (serializedDataBuilder_ == null) {
+ serializedData_ = null;
+ onChanged();
+ } else {
+ serializedData_ = null;
+ serializedDataBuilder_ = null;
+ }
+
+ return this;
+ }
+ /**
+ * .google.protobuf.Any serialized_data = 3;
+ */
+ public com.google.protobuf.Any.Builder getSerializedDataBuilder() {
+
+ onChanged();
+ return getSerializedDataFieldBuilder().getBuilder();
+ }
+ /**
+ * .google.protobuf.Any serialized_data = 3;
+ */
+ public com.google.protobuf.AnyOrBuilder getSerializedDataOrBuilder() {
+ if (serializedDataBuilder_ != null) {
+ return serializedDataBuilder_.getMessageOrBuilder();
+ } else {
+ return serializedData_ == null ?
+ com.google.protobuf.Any.getDefaultInstance() : serializedData_;
+ }
+ }
+ /**
+ * .google.protobuf.Any serialized_data = 3;
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder>
+ getSerializedDataFieldBuilder() {
+ if (serializedDataBuilder_ == null) {
+ serializedDataBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder>(
+ getSerializedData(),
+ getParentForChildren(),
+ isClean());
+ serializedData_ = null;
+ }
+ return serializedDataBuilder_;
+ }
+ @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.core.EnsembleCombinerProto)
+ }
+
+ // @@protoc_insertion_point(class_scope:tribuo.core.EnsembleCombinerProto)
+ private static final org.tribuo.protos.core.EnsembleCombinerProto DEFAULT_INSTANCE;
+ static {
+ DEFAULT_INSTANCE = new org.tribuo.protos.core.EnsembleCombinerProto();
+ }
+
+ public static org.tribuo.protos.core.EnsembleCombinerProto getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser
+ PARSER = new com.google.protobuf.AbstractParser() {
+ @java.lang.Override
+ public EnsembleCombinerProto parsePartialFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return new EnsembleCombinerProto(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.tribuo.protos.core.EnsembleCombinerProto getDefaultInstanceForType() {
+ return DEFAULT_INSTANCE;
+ }
+
+}
+
diff --git a/Core/src/main/java/org/tribuo/protos/core/EnsembleCombinerProtoOrBuilder.java b/Core/src/main/java/org/tribuo/protos/core/EnsembleCombinerProtoOrBuilder.java
new file mode 100644
index 000000000..55e9d6ea0
--- /dev/null
+++ b/Core/src/main/java/org/tribuo/protos/core/EnsembleCombinerProtoOrBuilder.java
@@ -0,0 +1,42 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: tribuo-core.proto
+
+package org.tribuo.protos.core;
+
+public interface EnsembleCombinerProtoOrBuilder extends
+ // @@protoc_insertion_point(interface_extends:tribuo.core.EnsembleCombinerProto)
+ com.google.protobuf.MessageOrBuilder {
+
+ /**
+ * int32 version = 1;
+ * @return The version.
+ */
+ int getVersion();
+
+ /**
+ * string class_name = 2;
+ * @return The className.
+ */
+ java.lang.String getClassName();
+ /**
+ * string class_name = 2;
+ * @return The bytes for className.
+ */
+ com.google.protobuf.ByteString
+ getClassNameBytes();
+
+ /**
+ * .google.protobuf.Any serialized_data = 3;
+ * @return Whether the serializedData field is set.
+ */
+ boolean hasSerializedData();
+ /**
+ * .google.protobuf.Any serialized_data = 3;
+ * @return The serializedData.
+ */
+ com.google.protobuf.Any getSerializedData();
+ /**
+ * .google.protobuf.Any serialized_data = 3;
+ */
+ com.google.protobuf.AnyOrBuilder getSerializedDataOrBuilder();
+}
diff --git a/Core/src/main/java/org/tribuo/protos/core/ExampleProto.java b/Core/src/main/java/org/tribuo/protos/core/ExampleProto.java
new file mode 100644
index 000000000..1770b36b4
--- /dev/null
+++ b/Core/src/main/java/org/tribuo/protos/core/ExampleProto.java
@@ -0,0 +1,1474 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: tribuo-core.proto
+
+package org.tribuo.protos.core;
+
+/**
+ *
+ *Example proto
+ *
+ *
+ * Protobuf type {@code tribuo.core.ExampleProto}
+ */
+public final class ExampleProto extends
+ com.google.protobuf.GeneratedMessageV3 implements
+ // @@protoc_insertion_point(message_implements:tribuo.core.ExampleProto)
+ ExampleProtoOrBuilder {
+private static final long serialVersionUID = 0L;
+ // Use ExampleProto.newBuilder() to construct.
+ private ExampleProto(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
+ super(builder);
+ }
+ private ExampleProto() {
+ className_ = "";
+ featureName_ = com.google.protobuf.LazyStringArrayList.EMPTY;
+ featureValue_ = emptyDoubleList();
+ }
+
+ @java.lang.Override
+ @SuppressWarnings({"unused"})
+ protected java.lang.Object newInstance(
+ UnusedPrivateParameter unused) {
+ return new ExampleProto();
+ }
+
+ @java.lang.Override
+ public final com.google.protobuf.UnknownFieldSet
+ getUnknownFields() {
+ return this.unknownFields;
+ }
+ private ExampleProto(
+ 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: {
+
+ version_ = input.readInt32();
+ break;
+ }
+ case 18: {
+ java.lang.String s = input.readStringRequireUtf8();
+
+ className_ = s;
+ break;
+ }
+ case 26: {
+ org.tribuo.protos.core.OutputProto.Builder subBuilder = null;
+ if (output_ != null) {
+ subBuilder = output_.toBuilder();
+ }
+ output_ = input.readMessage(org.tribuo.protos.core.OutputProto.parser(), extensionRegistry);
+ if (subBuilder != null) {
+ subBuilder.mergeFrom(output_);
+ output_ = subBuilder.buildPartial();
+ }
+
+ break;
+ }
+ case 34: {
+ java.lang.String s = input.readStringRequireUtf8();
+ if (!((mutable_bitField0_ & 0x00000001) != 0)) {
+ featureName_ = new com.google.protobuf.LazyStringArrayList();
+ mutable_bitField0_ |= 0x00000001;
+ }
+ featureName_.add(s);
+ break;
+ }
+ case 41: {
+ if (!((mutable_bitField0_ & 0x00000002) != 0)) {
+ featureValue_ = newDoubleList();
+ mutable_bitField0_ |= 0x00000002;
+ }
+ featureValue_.addDouble(input.readDouble());
+ break;
+ }
+ case 42: {
+ int length = input.readRawVarint32();
+ int limit = input.pushLimit(length);
+ if (!((mutable_bitField0_ & 0x00000002) != 0) && input.getBytesUntilLimit() > 0) {
+ featureValue_ = newDoubleList();
+ mutable_bitField0_ |= 0x00000002;
+ }
+ while (input.getBytesUntilLimit() > 0) {
+ featureValue_.addDouble(input.readDouble());
+ }
+ input.popLimit(limit);
+ break;
+ }
+ case 50: {
+ if (!((mutable_bitField0_ & 0x00000004) != 0)) {
+ metadata_ = com.google.protobuf.MapField.newMapField(
+ MetadataDefaultEntryHolder.defaultEntry);
+ mutable_bitField0_ |= 0x00000004;
+ }
+ com.google.protobuf.MapEntry
+ metadata__ = input.readMessage(
+ MetadataDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry);
+ metadata_.getMutableMap().put(
+ metadata__.getKey(), metadata__.getValue());
+ 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)) {
+ featureName_ = featureName_.getUnmodifiableView();
+ }
+ if (((mutable_bitField0_ & 0x00000002) != 0)) {
+ featureValue_.makeImmutable(); // C
+ }
+ this.unknownFields = unknownFields.build();
+ makeExtensionsImmutable();
+ }
+ }
+ public static final com.google.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return org.tribuo.protos.core.TribuoCore.internal_static_tribuo_core_ExampleProto_descriptor;
+ }
+
+ @SuppressWarnings({"rawtypes"})
+ @java.lang.Override
+ protected com.google.protobuf.MapField internalGetMapField(
+ int number) {
+ switch (number) {
+ case 6:
+ return internalGetMetadata();
+ default:
+ throw new RuntimeException(
+ "Invalid map field number: " + number);
+ }
+ }
+ @java.lang.Override
+ protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return org.tribuo.protos.core.TribuoCore.internal_static_tribuo_core_ExampleProto_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ org.tribuo.protos.core.ExampleProto.class, org.tribuo.protos.core.ExampleProto.Builder.class);
+ }
+
+ public static final int VERSION_FIELD_NUMBER = 1;
+ private int version_;
+ /**
+ * int32 version = 1;
+ * @return The version.
+ */
+ @java.lang.Override
+ public int getVersion() {
+ return version_;
+ }
+
+ public static final int CLASS_NAME_FIELD_NUMBER = 2;
+ private volatile java.lang.Object className_;
+ /**
+ * string class_name = 2;
+ * @return The className.
+ */
+ @java.lang.Override
+ public java.lang.String getClassName() {
+ java.lang.Object ref = className_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ className_ = s;
+ return s;
+ }
+ }
+ /**
+ * string class_name = 2;
+ * @return The bytes for className.
+ */
+ @java.lang.Override
+ public com.google.protobuf.ByteString
+ getClassNameBytes() {
+ java.lang.Object ref = className_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ className_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int OUTPUT_FIELD_NUMBER = 3;
+ private org.tribuo.protos.core.OutputProto output_;
+ /**
+ * .tribuo.core.OutputProto output = 3;
+ * @return Whether the output field is set.
+ */
+ @java.lang.Override
+ public boolean hasOutput() {
+ return output_ != null;
+ }
+ /**
+ * .tribuo.core.OutputProto output = 3;
+ * @return The output.
+ */
+ @java.lang.Override
+ public org.tribuo.protos.core.OutputProto getOutput() {
+ return output_ == null ? org.tribuo.protos.core.OutputProto.getDefaultInstance() : output_;
+ }
+ /**
+ * .tribuo.core.OutputProto output = 3;
+ */
+ @java.lang.Override
+ public org.tribuo.protos.core.OutputProtoOrBuilder getOutputOrBuilder() {
+ return getOutput();
+ }
+
+ public static final int FEATURE_NAME_FIELD_NUMBER = 4;
+ private com.google.protobuf.LazyStringList featureName_;
+ /**
+ * repeated string feature_name = 4;
+ * @return A list containing the featureName.
+ */
+ public com.google.protobuf.ProtocolStringList
+ getFeatureNameList() {
+ return featureName_;
+ }
+ /**
+ * repeated string feature_name = 4;
+ * @return The count of featureName.
+ */
+ public int getFeatureNameCount() {
+ return featureName_.size();
+ }
+ /**
+ * repeated string feature_name = 4;
+ * @param index The index of the element to return.
+ * @return The featureName at the given index.
+ */
+ public java.lang.String getFeatureName(int index) {
+ return featureName_.get(index);
+ }
+ /**
+ * repeated string feature_name = 4;
+ * @param index The index of the value to return.
+ * @return The bytes of the featureName at the given index.
+ */
+ public com.google.protobuf.ByteString
+ getFeatureNameBytes(int index) {
+ return featureName_.getByteString(index);
+ }
+
+ public static final int FEATURE_VALUE_FIELD_NUMBER = 5;
+ private com.google.protobuf.Internal.DoubleList featureValue_;
+ /**
+ * repeated double feature_value = 5;
+ * @return A list containing the featureValue.
+ */
+ @java.lang.Override
+ public java.util.List
+ getFeatureValueList() {
+ return featureValue_;
+ }
+ /**
+ * repeated double feature_value = 5;
+ * @return The count of featureValue.
+ */
+ public int getFeatureValueCount() {
+ return featureValue_.size();
+ }
+ /**
+ * repeated double feature_value = 5;
+ * @param index The index of the element to return.
+ * @return The featureValue at the given index.
+ */
+ public double getFeatureValue(int index) {
+ return featureValue_.getDouble(index);
+ }
+ private int featureValueMemoizedSerializedSize = -1;
+
+ public static final int METADATA_FIELD_NUMBER = 6;
+ private static final class MetadataDefaultEntryHolder {
+ static final com.google.protobuf.MapEntry<
+ java.lang.String, java.lang.String> defaultEntry =
+ com.google.protobuf.MapEntry
+ .newDefaultInstance(
+ org.tribuo.protos.core.TribuoCore.internal_static_tribuo_core_ExampleProto_MetadataEntry_descriptor,
+ com.google.protobuf.WireFormat.FieldType.STRING,
+ "",
+ com.google.protobuf.WireFormat.FieldType.STRING,
+ "");
+ }
+ private com.google.protobuf.MapField<
+ java.lang.String, java.lang.String> metadata_;
+ private com.google.protobuf.MapField
+ internalGetMetadata() {
+ if (metadata_ == null) {
+ return com.google.protobuf.MapField.emptyMapField(
+ MetadataDefaultEntryHolder.defaultEntry);
+ }
+ return metadata_;
+ }
+
+ public int getMetadataCount() {
+ return internalGetMetadata().getMap().size();
+ }
+ /**
+ * map<string, string> metadata = 6;
+ */
+
+ @java.lang.Override
+ public boolean containsMetadata(
+ java.lang.String key) {
+ if (key == null) { throw new NullPointerException("map key"); }
+ return internalGetMetadata().getMap().containsKey(key);
+ }
+ /**
+ * Use {@link #getMetadataMap()} instead.
+ */
+ @java.lang.Override
+ @java.lang.Deprecated
+ public java.util.Map getMetadata() {
+ return getMetadataMap();
+ }
+ /**
+ * map<string, string> metadata = 6;
+ */
+ @java.lang.Override
+
+ public java.util.Map getMetadataMap() {
+ return internalGetMetadata().getMap();
+ }
+ /**
+ * map<string, string> metadata = 6;
+ */
+ @java.lang.Override
+
+ public java.lang.String getMetadataOrDefault(
+ java.lang.String key,
+ java.lang.String defaultValue) {
+ if (key == null) { throw new NullPointerException("map key"); }
+ java.util.Map map =
+ internalGetMetadata().getMap();
+ return map.containsKey(key) ? map.get(key) : defaultValue;
+ }
+ /**
+ * map<string, string> metadata = 6;
+ */
+ @java.lang.Override
+
+ public java.lang.String getMetadataOrThrow(
+ java.lang.String key) {
+ if (key == null) { throw new NullPointerException("map key"); }
+ java.util.Map map =
+ internalGetMetadata().getMap();
+ if (!map.containsKey(key)) {
+ throw new java.lang.IllegalArgumentException();
+ }
+ return map.get(key);
+ }
+
+ 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 (version_ != 0) {
+ output.writeInt32(1, version_);
+ }
+ if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(className_)) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 2, className_);
+ }
+ if (output_ != null) {
+ output.writeMessage(3, getOutput());
+ }
+ for (int i = 0; i < featureName_.size(); i++) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 4, featureName_.getRaw(i));
+ }
+ if (getFeatureValueList().size() > 0) {
+ output.writeUInt32NoTag(42);
+ output.writeUInt32NoTag(featureValueMemoizedSerializedSize);
+ }
+ for (int i = 0; i < featureValue_.size(); i++) {
+ output.writeDoubleNoTag(featureValue_.getDouble(i));
+ }
+ com.google.protobuf.GeneratedMessageV3
+ .serializeStringMapTo(
+ output,
+ internalGetMetadata(),
+ MetadataDefaultEntryHolder.defaultEntry,
+ 6);
+ unknownFields.writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (version_ != 0) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeInt32Size(1, version_);
+ }
+ if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(className_)) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, className_);
+ }
+ if (output_ != null) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeMessageSize(3, getOutput());
+ }
+ {
+ int dataSize = 0;
+ for (int i = 0; i < featureName_.size(); i++) {
+ dataSize += computeStringSizeNoTag(featureName_.getRaw(i));
+ }
+ size += dataSize;
+ size += 1 * getFeatureNameList().size();
+ }
+ {
+ int dataSize = 0;
+ dataSize = 8 * getFeatureValueList().size();
+ size += dataSize;
+ if (!getFeatureValueList().isEmpty()) {
+ size += 1;
+ size += com.google.protobuf.CodedOutputStream
+ .computeInt32SizeNoTag(dataSize);
+ }
+ featureValueMemoizedSerializedSize = dataSize;
+ }
+ for (java.util.Map.Entry entry
+ : internalGetMetadata().getMap().entrySet()) {
+ com.google.protobuf.MapEntry
+ metadata__ = MetadataDefaultEntryHolder.defaultEntry.newBuilderForType()
+ .setKey(entry.getKey())
+ .setValue(entry.getValue())
+ .build();
+ size += com.google.protobuf.CodedOutputStream
+ .computeMessageSize(6, metadata__);
+ }
+ 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.protos.core.ExampleProto)) {
+ return super.equals(obj);
+ }
+ org.tribuo.protos.core.ExampleProto other = (org.tribuo.protos.core.ExampleProto) obj;
+
+ if (getVersion()
+ != other.getVersion()) return false;
+ if (!getClassName()
+ .equals(other.getClassName())) return false;
+ if (hasOutput() != other.hasOutput()) return false;
+ if (hasOutput()) {
+ if (!getOutput()
+ .equals(other.getOutput())) return false;
+ }
+ if (!getFeatureNameList()
+ .equals(other.getFeatureNameList())) return false;
+ if (!getFeatureValueList()
+ .equals(other.getFeatureValueList())) return false;
+ if (!internalGetMetadata().equals(
+ other.internalGetMetadata())) 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) + VERSION_FIELD_NUMBER;
+ hash = (53 * hash) + getVersion();
+ hash = (37 * hash) + CLASS_NAME_FIELD_NUMBER;
+ hash = (53 * hash) + getClassName().hashCode();
+ if (hasOutput()) {
+ hash = (37 * hash) + OUTPUT_FIELD_NUMBER;
+ hash = (53 * hash) + getOutput().hashCode();
+ }
+ if (getFeatureNameCount() > 0) {
+ hash = (37 * hash) + FEATURE_NAME_FIELD_NUMBER;
+ hash = (53 * hash) + getFeatureNameList().hashCode();
+ }
+ if (getFeatureValueCount() > 0) {
+ hash = (37 * hash) + FEATURE_VALUE_FIELD_NUMBER;
+ hash = (53 * hash) + getFeatureValueList().hashCode();
+ }
+ if (!internalGetMetadata().getMap().isEmpty()) {
+ hash = (37 * hash) + METADATA_FIELD_NUMBER;
+ hash = (53 * hash) + internalGetMetadata().hashCode();
+ }
+ hash = (29 * hash) + unknownFields.hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static org.tribuo.protos.core.ExampleProto parseFrom(
+ java.nio.ByteBuffer data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static org.tribuo.protos.core.ExampleProto parseFrom(
+ java.nio.ByteBuffer data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static org.tribuo.protos.core.ExampleProto parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static org.tribuo.protos.core.ExampleProto 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.protos.core.ExampleProto parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static org.tribuo.protos.core.ExampleProto parseFrom(
+ byte[] data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static org.tribuo.protos.core.ExampleProto parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input);
+ }
+ public static org.tribuo.protos.core.ExampleProto 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.protos.core.ExampleProto parseDelimitedFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseDelimitedWithIOException(PARSER, input);
+ }
+ public static org.tribuo.protos.core.ExampleProto 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.protos.core.ExampleProto parseFrom(
+ com.google.protobuf.CodedInputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input);
+ }
+ public static org.tribuo.protos.core.ExampleProto 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.protos.core.ExampleProto 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;
+ }
+ /**
+ *
+ *Example proto
+ *
+ *
+ * Protobuf type {@code tribuo.core.ExampleProto}
+ */
+ public static final class Builder extends
+ com.google.protobuf.GeneratedMessageV3.Builder implements
+ // @@protoc_insertion_point(builder_implements:tribuo.core.ExampleProto)
+ org.tribuo.protos.core.ExampleProtoOrBuilder {
+ public static final com.google.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return org.tribuo.protos.core.TribuoCore.internal_static_tribuo_core_ExampleProto_descriptor;
+ }
+
+ @SuppressWarnings({"rawtypes"})
+ protected com.google.protobuf.MapField internalGetMapField(
+ int number) {
+ switch (number) {
+ case 6:
+ return internalGetMetadata();
+ default:
+ throw new RuntimeException(
+ "Invalid map field number: " + number);
+ }
+ }
+ @SuppressWarnings({"rawtypes"})
+ protected com.google.protobuf.MapField internalGetMutableMapField(
+ int number) {
+ switch (number) {
+ case 6:
+ return internalGetMutableMetadata();
+ default:
+ throw new RuntimeException(
+ "Invalid map field number: " + number);
+ }
+ }
+ @java.lang.Override
+ protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return org.tribuo.protos.core.TribuoCore.internal_static_tribuo_core_ExampleProto_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ org.tribuo.protos.core.ExampleProto.class, org.tribuo.protos.core.ExampleProto.Builder.class);
+ }
+
+ // Construct using org.tribuo.protos.core.ExampleProto.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();
+ version_ = 0;
+
+ className_ = "";
+
+ if (outputBuilder_ == null) {
+ output_ = null;
+ } else {
+ output_ = null;
+ outputBuilder_ = null;
+ }
+ featureName_ = com.google.protobuf.LazyStringArrayList.EMPTY;
+ bitField0_ = (bitField0_ & ~0x00000001);
+ featureValue_ = emptyDoubleList();
+ bitField0_ = (bitField0_ & ~0x00000002);
+ internalGetMutableMetadata().clear();
+ return this;
+ }
+
+ @java.lang.Override
+ public com.google.protobuf.Descriptors.Descriptor
+ getDescriptorForType() {
+ return org.tribuo.protos.core.TribuoCore.internal_static_tribuo_core_ExampleProto_descriptor;
+ }
+
+ @java.lang.Override
+ public org.tribuo.protos.core.ExampleProto getDefaultInstanceForType() {
+ return org.tribuo.protos.core.ExampleProto.getDefaultInstance();
+ }
+
+ @java.lang.Override
+ public org.tribuo.protos.core.ExampleProto build() {
+ org.tribuo.protos.core.ExampleProto result = buildPartial();
+ if (!result.isInitialized()) {
+ throw newUninitializedMessageException(result);
+ }
+ return result;
+ }
+
+ @java.lang.Override
+ public org.tribuo.protos.core.ExampleProto buildPartial() {
+ org.tribuo.protos.core.ExampleProto result = new org.tribuo.protos.core.ExampleProto(this);
+ int from_bitField0_ = bitField0_;
+ result.version_ = version_;
+ result.className_ = className_;
+ if (outputBuilder_ == null) {
+ result.output_ = output_;
+ } else {
+ result.output_ = outputBuilder_.build();
+ }
+ if (((bitField0_ & 0x00000001) != 0)) {
+ featureName_ = featureName_.getUnmodifiableView();
+ bitField0_ = (bitField0_ & ~0x00000001);
+ }
+ result.featureName_ = featureName_;
+ if (((bitField0_ & 0x00000002) != 0)) {
+ featureValue_.makeImmutable();
+ bitField0_ = (bitField0_ & ~0x00000002);
+ }
+ result.featureValue_ = featureValue_;
+ result.metadata_ = internalGetMetadata();
+ result.metadata_.makeImmutable();
+ 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.protos.core.ExampleProto) {
+ return mergeFrom((org.tribuo.protos.core.ExampleProto)other);
+ } else {
+ super.mergeFrom(other);
+ return this;
+ }
+ }
+
+ public Builder mergeFrom(org.tribuo.protos.core.ExampleProto other) {
+ if (other == org.tribuo.protos.core.ExampleProto.getDefaultInstance()) return this;
+ if (other.getVersion() != 0) {
+ setVersion(other.getVersion());
+ }
+ if (!other.getClassName().isEmpty()) {
+ className_ = other.className_;
+ onChanged();
+ }
+ if (other.hasOutput()) {
+ mergeOutput(other.getOutput());
+ }
+ if (!other.featureName_.isEmpty()) {
+ if (featureName_.isEmpty()) {
+ featureName_ = other.featureName_;
+ bitField0_ = (bitField0_ & ~0x00000001);
+ } else {
+ ensureFeatureNameIsMutable();
+ featureName_.addAll(other.featureName_);
+ }
+ onChanged();
+ }
+ if (!other.featureValue_.isEmpty()) {
+ if (featureValue_.isEmpty()) {
+ featureValue_ = other.featureValue_;
+ bitField0_ = (bitField0_ & ~0x00000002);
+ } else {
+ ensureFeatureValueIsMutable();
+ featureValue_.addAll(other.featureValue_);
+ }
+ onChanged();
+ }
+ internalGetMutableMetadata().mergeFrom(
+ other.internalGetMetadata());
+ 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.protos.core.ExampleProto parsedMessage = null;
+ try {
+ parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ parsedMessage = (org.tribuo.protos.core.ExampleProto) e.getUnfinishedMessage();
+ throw e.unwrapIOException();
+ } finally {
+ if (parsedMessage != null) {
+ mergeFrom(parsedMessage);
+ }
+ }
+ return this;
+ }
+ private int bitField0_;
+
+ private int version_ ;
+ /**
+ * int32 version = 1;
+ * @return The version.
+ */
+ @java.lang.Override
+ public int getVersion() {
+ return version_;
+ }
+ /**
+ * int32 version = 1;
+ * @param value The version to set.
+ * @return This builder for chaining.
+ */
+ public Builder setVersion(int value) {
+
+ version_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * int32 version = 1;
+ * @return This builder for chaining.
+ */
+ public Builder clearVersion() {
+
+ version_ = 0;
+ onChanged();
+ return this;
+ }
+
+ private java.lang.Object className_ = "";
+ /**
+ * string class_name = 2;
+ * @return The className.
+ */
+ public java.lang.String getClassName() {
+ java.lang.Object ref = className_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ className_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ * string class_name = 2;
+ * @return The bytes for className.
+ */
+ public com.google.protobuf.ByteString
+ getClassNameBytes() {
+ java.lang.Object ref = className_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ className_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ * string class_name = 2;
+ * @param value The className to set.
+ * @return This builder for chaining.
+ */
+ public Builder setClassName(
+ java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ className_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * string class_name = 2;
+ * @return This builder for chaining.
+ */
+ public Builder clearClassName() {
+
+ className_ = getDefaultInstance().getClassName();
+ onChanged();
+ return this;
+ }
+ /**
+ * string class_name = 2;
+ * @param value The bytes for className to set.
+ * @return This builder for chaining.
+ */
+ public Builder setClassNameBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ className_ = value;
+ onChanged();
+ return this;
+ }
+
+ private org.tribuo.protos.core.OutputProto output_;
+ private com.google.protobuf.SingleFieldBuilderV3<
+ org.tribuo.protos.core.OutputProto, org.tribuo.protos.core.OutputProto.Builder, org.tribuo.protos.core.OutputProtoOrBuilder> outputBuilder_;
+ /**
+ * .tribuo.core.OutputProto output = 3;
+ * @return Whether the output field is set.
+ */
+ public boolean hasOutput() {
+ return outputBuilder_ != null || output_ != null;
+ }
+ /**
+ * .tribuo.core.OutputProto output = 3;
+ * @return The output.
+ */
+ public org.tribuo.protos.core.OutputProto getOutput() {
+ if (outputBuilder_ == null) {
+ return output_ == null ? org.tribuo.protos.core.OutputProto.getDefaultInstance() : output_;
+ } else {
+ return outputBuilder_.getMessage();
+ }
+ }
+ /**
+ * .tribuo.core.OutputProto output = 3;
+ */
+ public Builder setOutput(org.tribuo.protos.core.OutputProto value) {
+ if (outputBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ output_ = value;
+ onChanged();
+ } else {
+ outputBuilder_.setMessage(value);
+ }
+
+ return this;
+ }
+ /**
+ * .tribuo.core.OutputProto output = 3;
+ */
+ public Builder setOutput(
+ org.tribuo.protos.core.OutputProto.Builder builderForValue) {
+ if (outputBuilder_ == null) {
+ output_ = builderForValue.build();
+ onChanged();
+ } else {
+ outputBuilder_.setMessage(builderForValue.build());
+ }
+
+ return this;
+ }
+ /**
+ * .tribuo.core.OutputProto output = 3;
+ */
+ public Builder mergeOutput(org.tribuo.protos.core.OutputProto value) {
+ if (outputBuilder_ == null) {
+ if (output_ != null) {
+ output_ =
+ org.tribuo.protos.core.OutputProto.newBuilder(output_).mergeFrom(value).buildPartial();
+ } else {
+ output_ = value;
+ }
+ onChanged();
+ } else {
+ outputBuilder_.mergeFrom(value);
+ }
+
+ return this;
+ }
+ /**
+ * .tribuo.core.OutputProto output = 3;
+ */
+ public Builder clearOutput() {
+ if (outputBuilder_ == null) {
+ output_ = null;
+ onChanged();
+ } else {
+ output_ = null;
+ outputBuilder_ = null;
+ }
+
+ return this;
+ }
+ /**
+ * .tribuo.core.OutputProto output = 3;
+ */
+ public org.tribuo.protos.core.OutputProto.Builder getOutputBuilder() {
+
+ onChanged();
+ return getOutputFieldBuilder().getBuilder();
+ }
+ /**
+ * .tribuo.core.OutputProto output = 3;
+ */
+ public org.tribuo.protos.core.OutputProtoOrBuilder getOutputOrBuilder() {
+ if (outputBuilder_ != null) {
+ return outputBuilder_.getMessageOrBuilder();
+ } else {
+ return output_ == null ?
+ org.tribuo.protos.core.OutputProto.getDefaultInstance() : output_;
+ }
+ }
+ /**
+ * .tribuo.core.OutputProto output = 3;
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ org.tribuo.protos.core.OutputProto, org.tribuo.protos.core.OutputProto.Builder, org.tribuo.protos.core.OutputProtoOrBuilder>
+ getOutputFieldBuilder() {
+ if (outputBuilder_ == null) {
+ outputBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
+ org.tribuo.protos.core.OutputProto, org.tribuo.protos.core.OutputProto.Builder, org.tribuo.protos.core.OutputProtoOrBuilder>(
+ getOutput(),
+ getParentForChildren(),
+ isClean());
+ output_ = null;
+ }
+ return outputBuilder_;
+ }
+
+ private com.google.protobuf.LazyStringList featureName_ = com.google.protobuf.LazyStringArrayList.EMPTY;
+ private void ensureFeatureNameIsMutable() {
+ if (!((bitField0_ & 0x00000001) != 0)) {
+ featureName_ = new com.google.protobuf.LazyStringArrayList(featureName_);
+ bitField0_ |= 0x00000001;
+ }
+ }
+ /**
+ * repeated string feature_name = 4;
+ * @return A list containing the featureName.
+ */
+ public com.google.protobuf.ProtocolStringList
+ getFeatureNameList() {
+ return featureName_.getUnmodifiableView();
+ }
+ /**
+ * repeated string feature_name = 4;
+ * @return The count of featureName.
+ */
+ public int getFeatureNameCount() {
+ return featureName_.size();
+ }
+ /**
+ * repeated string feature_name = 4;
+ * @param index The index of the element to return.
+ * @return The featureName at the given index.
+ */
+ public java.lang.String getFeatureName(int index) {
+ return featureName_.get(index);
+ }
+ /**
+ * repeated string feature_name = 4;
+ * @param index The index of the value to return.
+ * @return The bytes of the featureName at the given index.
+ */
+ public com.google.protobuf.ByteString
+ getFeatureNameBytes(int index) {
+ return featureName_.getByteString(index);
+ }
+ /**
+ * repeated string feature_name = 4;
+ * @param index The index to set the value at.
+ * @param value The featureName to set.
+ * @return This builder for chaining.
+ */
+ public Builder setFeatureName(
+ int index, java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureFeatureNameIsMutable();
+ featureName_.set(index, value);
+ onChanged();
+ return this;
+ }
+ /**
+ * repeated string feature_name = 4;
+ * @param value The featureName to add.
+ * @return This builder for chaining.
+ */
+ public Builder addFeatureName(
+ java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureFeatureNameIsMutable();
+ featureName_.add(value);
+ onChanged();
+ return this;
+ }
+ /**
+ * repeated string feature_name = 4;
+ * @param values The featureName to add.
+ * @return This builder for chaining.
+ */
+ public Builder addAllFeatureName(
+ java.lang.Iterable values) {
+ ensureFeatureNameIsMutable();
+ com.google.protobuf.AbstractMessageLite.Builder.addAll(
+ values, featureName_);
+ onChanged();
+ return this;
+ }
+ /**
+ * repeated string feature_name = 4;
+ * @return This builder for chaining.
+ */
+ public Builder clearFeatureName() {
+ featureName_ = com.google.protobuf.LazyStringArrayList.EMPTY;
+ bitField0_ = (bitField0_ & ~0x00000001);
+ onChanged();
+ return this;
+ }
+ /**
+ * repeated string feature_name = 4;
+ * @param value The bytes of the featureName to add.
+ * @return This builder for chaining.
+ */
+ public Builder addFeatureNameBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+ ensureFeatureNameIsMutable();
+ featureName_.add(value);
+ onChanged();
+ return this;
+ }
+
+ private com.google.protobuf.Internal.DoubleList featureValue_ = emptyDoubleList();
+ private void ensureFeatureValueIsMutable() {
+ if (!((bitField0_ & 0x00000002) != 0)) {
+ featureValue_ = mutableCopy(featureValue_);
+ bitField0_ |= 0x00000002;
+ }
+ }
+ /**
+ * repeated double feature_value = 5;
+ * @return A list containing the featureValue.
+ */
+ public java.util.List
+ getFeatureValueList() {
+ return ((bitField0_ & 0x00000002) != 0) ?
+ java.util.Collections.unmodifiableList(featureValue_) : featureValue_;
+ }
+ /**
+ * repeated double feature_value = 5;
+ * @return The count of featureValue.
+ */
+ public int getFeatureValueCount() {
+ return featureValue_.size();
+ }
+ /**
+ * repeated double feature_value = 5;
+ * @param index The index of the element to return.
+ * @return The featureValue at the given index.
+ */
+ public double getFeatureValue(int index) {
+ return featureValue_.getDouble(index);
+ }
+ /**
+ * repeated double feature_value = 5;
+ * @param index The index to set the value at.
+ * @param value The featureValue to set.
+ * @return This builder for chaining.
+ */
+ public Builder setFeatureValue(
+ int index, double value) {
+ ensureFeatureValueIsMutable();
+ featureValue_.setDouble(index, value);
+ onChanged();
+ return this;
+ }
+ /**
+ * repeated double feature_value = 5;
+ * @param value The featureValue to add.
+ * @return This builder for chaining.
+ */
+ public Builder addFeatureValue(double value) {
+ ensureFeatureValueIsMutable();
+ featureValue_.addDouble(value);
+ onChanged();
+ return this;
+ }
+ /**
+ * repeated double feature_value = 5;
+ * @param values The featureValue to add.
+ * @return This builder for chaining.
+ */
+ public Builder addAllFeatureValue(
+ java.lang.Iterable extends java.lang.Double> values) {
+ ensureFeatureValueIsMutable();
+ com.google.protobuf.AbstractMessageLite.Builder.addAll(
+ values, featureValue_);
+ onChanged();
+ return this;
+ }
+ /**
+ * repeated double feature_value = 5;
+ * @return This builder for chaining.
+ */
+ public Builder clearFeatureValue() {
+ featureValue_ = emptyDoubleList();
+ bitField0_ = (bitField0_ & ~0x00000002);
+ onChanged();
+ return this;
+ }
+
+ private com.google.protobuf.MapField<
+ java.lang.String, java.lang.String> metadata_;
+ private com.google.protobuf.MapField
+ internalGetMetadata() {
+ if (metadata_ == null) {
+ return com.google.protobuf.MapField.emptyMapField(
+ MetadataDefaultEntryHolder.defaultEntry);
+ }
+ return metadata_;
+ }
+ private com.google.protobuf.MapField
+ internalGetMutableMetadata() {
+ onChanged();;
+ if (metadata_ == null) {
+ metadata_ = com.google.protobuf.MapField.newMapField(
+ MetadataDefaultEntryHolder.defaultEntry);
+ }
+ if (!metadata_.isMutable()) {
+ metadata_ = metadata_.copy();
+ }
+ return metadata_;
+ }
+
+ public int getMetadataCount() {
+ return internalGetMetadata().getMap().size();
+ }
+ /**
+ * map<string, string> metadata = 6;
+ */
+
+ @java.lang.Override
+ public boolean containsMetadata(
+ java.lang.String key) {
+ if (key == null) { throw new NullPointerException("map key"); }
+ return internalGetMetadata().getMap().containsKey(key);
+ }
+ /**
+ * Use {@link #getMetadataMap()} instead.
+ */
+ @java.lang.Override
+ @java.lang.Deprecated
+ public java.util.Map getMetadata() {
+ return getMetadataMap();
+ }
+ /**
+ * map<string, string> metadata = 6;
+ */
+ @java.lang.Override
+
+ public java.util.Map getMetadataMap() {
+ return internalGetMetadata().getMap();
+ }
+ /**
+ * map<string, string> metadata = 6;
+ */
+ @java.lang.Override
+
+ public java.lang.String getMetadataOrDefault(
+ java.lang.String key,
+ java.lang.String defaultValue) {
+ if (key == null) { throw new NullPointerException("map key"); }
+ java.util.Map map =
+ internalGetMetadata().getMap();
+ return map.containsKey(key) ? map.get(key) : defaultValue;
+ }
+ /**
+ * map<string, string> metadata = 6;
+ */
+ @java.lang.Override
+
+ public java.lang.String getMetadataOrThrow(
+ java.lang.String key) {
+ if (key == null) { throw new NullPointerException("map key"); }
+ java.util.Map map =
+ internalGetMetadata().getMap();
+ if (!map.containsKey(key)) {
+ throw new java.lang.IllegalArgumentException();
+ }
+ return map.get(key);
+ }
+
+ public Builder clearMetadata() {
+ internalGetMutableMetadata().getMutableMap()
+ .clear();
+ return this;
+ }
+ /**
+ * map<string, string> metadata = 6;
+ */
+
+ public Builder removeMetadata(
+ java.lang.String key) {
+ if (key == null) { throw new NullPointerException("map key"); }
+ internalGetMutableMetadata().getMutableMap()
+ .remove(key);
+ return this;
+ }
+ /**
+ * Use alternate mutation accessors instead.
+ */
+ @java.lang.Deprecated
+ public java.util.Map
+ getMutableMetadata() {
+ return internalGetMutableMetadata().getMutableMap();
+ }
+ /**
+ * map<string, string> metadata = 6;
+ */
+ public Builder putMetadata(
+ java.lang.String key,
+ java.lang.String value) {
+ if (key == null) { throw new NullPointerException("map key"); }
+ if (value == null) {
+ throw new NullPointerException("map value");
+}
+
+ internalGetMutableMetadata().getMutableMap()
+ .put(key, value);
+ return this;
+ }
+ /**
+ * map<string, string> metadata = 6;
+ */
+
+ public Builder putAllMetadata(
+ java.util.Map values) {
+ internalGetMutableMetadata().getMutableMap()
+ .putAll(values);
+ 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.core.ExampleProto)
+ }
+
+ // @@protoc_insertion_point(class_scope:tribuo.core.ExampleProto)
+ private static final org.tribuo.protos.core.ExampleProto DEFAULT_INSTANCE;
+ static {
+ DEFAULT_INSTANCE = new org.tribuo.protos.core.ExampleProto();
+ }
+
+ public static org.tribuo.protos.core.ExampleProto getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser
+ PARSER = new com.google.protobuf.AbstractParser() {
+ @java.lang.Override
+ public ExampleProto parsePartialFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return new ExampleProto(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.tribuo.protos.core.ExampleProto getDefaultInstanceForType() {
+ return DEFAULT_INSTANCE;
+ }
+
+}
+
diff --git a/Core/src/main/java/org/tribuo/protos/core/ExampleProtoOrBuilder.java b/Core/src/main/java/org/tribuo/protos/core/ExampleProtoOrBuilder.java
new file mode 100644
index 000000000..c55ed1288
--- /dev/null
+++ b/Core/src/main/java/org/tribuo/protos/core/ExampleProtoOrBuilder.java
@@ -0,0 +1,120 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: tribuo-core.proto
+
+package org.tribuo.protos.core;
+
+public interface ExampleProtoOrBuilder extends
+ // @@protoc_insertion_point(interface_extends:tribuo.core.ExampleProto)
+ com.google.protobuf.MessageOrBuilder {
+
+ /**
+ * int32 version = 1;
+ * @return The version.
+ */
+ int getVersion();
+
+ /**
+ * string class_name = 2;
+ * @return The className.
+ */
+ java.lang.String getClassName();
+ /**
+ * string class_name = 2;
+ * @return The bytes for className.
+ */
+ com.google.protobuf.ByteString
+ getClassNameBytes();
+
+ /**
+ * .tribuo.core.OutputProto output = 3;
+ * @return Whether the output field is set.
+ */
+ boolean hasOutput();
+ /**
+ * .tribuo.core.OutputProto output = 3;
+ * @return The output.
+ */
+ org.tribuo.protos.core.OutputProto getOutput();
+ /**
+ * .tribuo.core.OutputProto output = 3;
+ */
+ org.tribuo.protos.core.OutputProtoOrBuilder getOutputOrBuilder();
+
+ /**
+ * repeated string feature_name = 4;
+ * @return A list containing the featureName.
+ */
+ java.util.List
+ getFeatureNameList();
+ /**
+ * repeated string feature_name = 4;
+ * @return The count of featureName.
+ */
+ int getFeatureNameCount();
+ /**
+ * repeated string feature_name = 4;
+ * @param index The index of the element to return.
+ * @return The featureName at the given index.
+ */
+ java.lang.String getFeatureName(int index);
+ /**
+ * repeated string feature_name = 4;
+ * @param index The index of the value to return.
+ * @return The bytes of the featureName at the given index.
+ */
+ com.google.protobuf.ByteString
+ getFeatureNameBytes(int index);
+
+ /**
+ * repeated double feature_value = 5;
+ * @return A list containing the featureValue.
+ */
+ java.util.List getFeatureValueList();
+ /**
+ * repeated double feature_value = 5;
+ * @return The count of featureValue.
+ */
+ int getFeatureValueCount();
+ /**
+ * repeated double feature_value = 5;
+ * @param index The index of the element to return.
+ * @return The featureValue at the given index.
+ */
+ double getFeatureValue(int index);
+
+ /**
+ * map<string, string> metadata = 6;
+ */
+ int getMetadataCount();
+ /**
+ * map<string, string> metadata = 6;
+ */
+ boolean containsMetadata(
+ java.lang.String key);
+ /**
+ * Use {@link #getMetadataMap()} instead.
+ */
+ @java.lang.Deprecated
+ java.util.Map
+ getMetadata();
+ /**
+ * map<string, string> metadata = 6;
+ */
+ java.util.Map
+ getMetadataMap();
+ /**
+ * map<string, string> metadata = 6;
+ */
+
+ /* nullable */
+java.lang.String getMetadataOrDefault(
+ java.lang.String key,
+ /* nullable */
+java.lang.String defaultValue);
+ /**
+ * map<string, string> metadata = 6;
+ */
+
+ java.lang.String getMetadataOrThrow(
+ java.lang.String key);
+}
diff --git a/Core/src/main/java/org/tribuo/protos/core/FeatureDomainProto.java b/Core/src/main/java/org/tribuo/protos/core/FeatureDomainProto.java
new file mode 100644
index 000000000..0ee551635
--- /dev/null
+++ b/Core/src/main/java/org/tribuo/protos/core/FeatureDomainProto.java
@@ -0,0 +1,819 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: tribuo-core.proto
+
+package org.tribuo.protos.core;
+
+/**
+ *
+ *Feature domain redirection proto
+ *
+ *
+ * Protobuf type {@code tribuo.core.FeatureDomainProto}
+ */
+public final class FeatureDomainProto extends
+ com.google.protobuf.GeneratedMessageV3 implements
+ // @@protoc_insertion_point(message_implements:tribuo.core.FeatureDomainProto)
+ FeatureDomainProtoOrBuilder {
+private static final long serialVersionUID = 0L;
+ // Use FeatureDomainProto.newBuilder() to construct.
+ private FeatureDomainProto(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
+ super(builder);
+ }
+ private FeatureDomainProto() {
+ className_ = "";
+ }
+
+ @java.lang.Override
+ @SuppressWarnings({"unused"})
+ protected java.lang.Object newInstance(
+ UnusedPrivateParameter unused) {
+ return new FeatureDomainProto();
+ }
+
+ @java.lang.Override
+ public final com.google.protobuf.UnknownFieldSet
+ getUnknownFields() {
+ return this.unknownFields;
+ }
+ private FeatureDomainProto(
+ 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: {
+
+ version_ = input.readInt32();
+ break;
+ }
+ case 18: {
+ java.lang.String s = input.readStringRequireUtf8();
+
+ className_ = s;
+ break;
+ }
+ case 26: {
+ com.google.protobuf.Any.Builder subBuilder = null;
+ if (serializedData_ != null) {
+ subBuilder = serializedData_.toBuilder();
+ }
+ serializedData_ = input.readMessage(com.google.protobuf.Any.parser(), extensionRegistry);
+ if (subBuilder != null) {
+ subBuilder.mergeFrom(serializedData_);
+ serializedData_ = subBuilder.buildPartial();
+ }
+
+ 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 {
+ this.unknownFields = unknownFields.build();
+ makeExtensionsImmutable();
+ }
+ }
+ public static final com.google.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return org.tribuo.protos.core.TribuoCore.internal_static_tribuo_core_FeatureDomainProto_descriptor;
+ }
+
+ @java.lang.Override
+ protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return org.tribuo.protos.core.TribuoCore.internal_static_tribuo_core_FeatureDomainProto_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ org.tribuo.protos.core.FeatureDomainProto.class, org.tribuo.protos.core.FeatureDomainProto.Builder.class);
+ }
+
+ public static final int VERSION_FIELD_NUMBER = 1;
+ private int version_;
+ /**
+ * int32 version = 1;
+ * @return The version.
+ */
+ @java.lang.Override
+ public int getVersion() {
+ return version_;
+ }
+
+ public static final int CLASS_NAME_FIELD_NUMBER = 2;
+ private volatile java.lang.Object className_;
+ /**
+ * string class_name = 2;
+ * @return The className.
+ */
+ @java.lang.Override
+ public java.lang.String getClassName() {
+ java.lang.Object ref = className_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ className_ = s;
+ return s;
+ }
+ }
+ /**
+ * string class_name = 2;
+ * @return The bytes for className.
+ */
+ @java.lang.Override
+ public com.google.protobuf.ByteString
+ getClassNameBytes() {
+ java.lang.Object ref = className_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ className_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int SERIALIZED_DATA_FIELD_NUMBER = 3;
+ private com.google.protobuf.Any serializedData_;
+ /**
+ * .google.protobuf.Any serialized_data = 3;
+ * @return Whether the serializedData field is set.
+ */
+ @java.lang.Override
+ public boolean hasSerializedData() {
+ return serializedData_ != null;
+ }
+ /**
+ * .google.protobuf.Any serialized_data = 3;
+ * @return The serializedData.
+ */
+ @java.lang.Override
+ public com.google.protobuf.Any getSerializedData() {
+ return serializedData_ == null ? com.google.protobuf.Any.getDefaultInstance() : serializedData_;
+ }
+ /**
+ * .google.protobuf.Any serialized_data = 3;
+ */
+ @java.lang.Override
+ public com.google.protobuf.AnyOrBuilder getSerializedDataOrBuilder() {
+ return getSerializedData();
+ }
+
+ 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 (version_ != 0) {
+ output.writeInt32(1, version_);
+ }
+ if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(className_)) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 2, className_);
+ }
+ if (serializedData_ != null) {
+ output.writeMessage(3, getSerializedData());
+ }
+ unknownFields.writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (version_ != 0) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeInt32Size(1, version_);
+ }
+ if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(className_)) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, className_);
+ }
+ if (serializedData_ != null) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeMessageSize(3, getSerializedData());
+ }
+ 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.protos.core.FeatureDomainProto)) {
+ return super.equals(obj);
+ }
+ org.tribuo.protos.core.FeatureDomainProto other = (org.tribuo.protos.core.FeatureDomainProto) obj;
+
+ if (getVersion()
+ != other.getVersion()) return false;
+ if (!getClassName()
+ .equals(other.getClassName())) return false;
+ if (hasSerializedData() != other.hasSerializedData()) return false;
+ if (hasSerializedData()) {
+ if (!getSerializedData()
+ .equals(other.getSerializedData())) 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) + VERSION_FIELD_NUMBER;
+ hash = (53 * hash) + getVersion();
+ hash = (37 * hash) + CLASS_NAME_FIELD_NUMBER;
+ hash = (53 * hash) + getClassName().hashCode();
+ if (hasSerializedData()) {
+ hash = (37 * hash) + SERIALIZED_DATA_FIELD_NUMBER;
+ hash = (53 * hash) + getSerializedData().hashCode();
+ }
+ hash = (29 * hash) + unknownFields.hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static org.tribuo.protos.core.FeatureDomainProto parseFrom(
+ java.nio.ByteBuffer data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static org.tribuo.protos.core.FeatureDomainProto parseFrom(
+ java.nio.ByteBuffer data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static org.tribuo.protos.core.FeatureDomainProto parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static org.tribuo.protos.core.FeatureDomainProto 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.protos.core.FeatureDomainProto parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static org.tribuo.protos.core.FeatureDomainProto parseFrom(
+ byte[] data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static org.tribuo.protos.core.FeatureDomainProto parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input);
+ }
+ public static org.tribuo.protos.core.FeatureDomainProto 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.protos.core.FeatureDomainProto parseDelimitedFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseDelimitedWithIOException(PARSER, input);
+ }
+ public static org.tribuo.protos.core.FeatureDomainProto 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.protos.core.FeatureDomainProto parseFrom(
+ com.google.protobuf.CodedInputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input);
+ }
+ public static org.tribuo.protos.core.FeatureDomainProto 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.protos.core.FeatureDomainProto 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;
+ }
+ /**
+ *
+ *Feature domain redirection proto
+ *
+ *
+ * Protobuf type {@code tribuo.core.FeatureDomainProto}
+ */
+ public static final class Builder extends
+ com.google.protobuf.GeneratedMessageV3.Builder implements
+ // @@protoc_insertion_point(builder_implements:tribuo.core.FeatureDomainProto)
+ org.tribuo.protos.core.FeatureDomainProtoOrBuilder {
+ public static final com.google.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return org.tribuo.protos.core.TribuoCore.internal_static_tribuo_core_FeatureDomainProto_descriptor;
+ }
+
+ @java.lang.Override
+ protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return org.tribuo.protos.core.TribuoCore.internal_static_tribuo_core_FeatureDomainProto_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ org.tribuo.protos.core.FeatureDomainProto.class, org.tribuo.protos.core.FeatureDomainProto.Builder.class);
+ }
+
+ // Construct using org.tribuo.protos.core.FeatureDomainProto.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();
+ version_ = 0;
+
+ className_ = "";
+
+ if (serializedDataBuilder_ == null) {
+ serializedData_ = null;
+ } else {
+ serializedData_ = null;
+ serializedDataBuilder_ = null;
+ }
+ return this;
+ }
+
+ @java.lang.Override
+ public com.google.protobuf.Descriptors.Descriptor
+ getDescriptorForType() {
+ return org.tribuo.protos.core.TribuoCore.internal_static_tribuo_core_FeatureDomainProto_descriptor;
+ }
+
+ @java.lang.Override
+ public org.tribuo.protos.core.FeatureDomainProto getDefaultInstanceForType() {
+ return org.tribuo.protos.core.FeatureDomainProto.getDefaultInstance();
+ }
+
+ @java.lang.Override
+ public org.tribuo.protos.core.FeatureDomainProto build() {
+ org.tribuo.protos.core.FeatureDomainProto result = buildPartial();
+ if (!result.isInitialized()) {
+ throw newUninitializedMessageException(result);
+ }
+ return result;
+ }
+
+ @java.lang.Override
+ public org.tribuo.protos.core.FeatureDomainProto buildPartial() {
+ org.tribuo.protos.core.FeatureDomainProto result = new org.tribuo.protos.core.FeatureDomainProto(this);
+ result.version_ = version_;
+ result.className_ = className_;
+ if (serializedDataBuilder_ == null) {
+ result.serializedData_ = serializedData_;
+ } else {
+ result.serializedData_ = serializedDataBuilder_.build();
+ }
+ 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.protos.core.FeatureDomainProto) {
+ return mergeFrom((org.tribuo.protos.core.FeatureDomainProto)other);
+ } else {
+ super.mergeFrom(other);
+ return this;
+ }
+ }
+
+ public Builder mergeFrom(org.tribuo.protos.core.FeatureDomainProto other) {
+ if (other == org.tribuo.protos.core.FeatureDomainProto.getDefaultInstance()) return this;
+ if (other.getVersion() != 0) {
+ setVersion(other.getVersion());
+ }
+ if (!other.getClassName().isEmpty()) {
+ className_ = other.className_;
+ onChanged();
+ }
+ if (other.hasSerializedData()) {
+ mergeSerializedData(other.getSerializedData());
+ }
+ 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.protos.core.FeatureDomainProto parsedMessage = null;
+ try {
+ parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ parsedMessage = (org.tribuo.protos.core.FeatureDomainProto) e.getUnfinishedMessage();
+ throw e.unwrapIOException();
+ } finally {
+ if (parsedMessage != null) {
+ mergeFrom(parsedMessage);
+ }
+ }
+ return this;
+ }
+
+ private int version_ ;
+ /**
+ * int32 version = 1;
+ * @return The version.
+ */
+ @java.lang.Override
+ public int getVersion() {
+ return version_;
+ }
+ /**
+ * int32 version = 1;
+ * @param value The version to set.
+ * @return This builder for chaining.
+ */
+ public Builder setVersion(int value) {
+
+ version_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * int32 version = 1;
+ * @return This builder for chaining.
+ */
+ public Builder clearVersion() {
+
+ version_ = 0;
+ onChanged();
+ return this;
+ }
+
+ private java.lang.Object className_ = "";
+ /**
+ * string class_name = 2;
+ * @return The className.
+ */
+ public java.lang.String getClassName() {
+ java.lang.Object ref = className_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ className_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ * string class_name = 2;
+ * @return The bytes for className.
+ */
+ public com.google.protobuf.ByteString
+ getClassNameBytes() {
+ java.lang.Object ref = className_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ className_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ * string class_name = 2;
+ * @param value The className to set.
+ * @return This builder for chaining.
+ */
+ public Builder setClassName(
+ java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ className_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * string class_name = 2;
+ * @return This builder for chaining.
+ */
+ public Builder clearClassName() {
+
+ className_ = getDefaultInstance().getClassName();
+ onChanged();
+ return this;
+ }
+ /**
+ * string class_name = 2;
+ * @param value The bytes for className to set.
+ * @return This builder for chaining.
+ */
+ public Builder setClassNameBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ className_ = value;
+ onChanged();
+ return this;
+ }
+
+ private com.google.protobuf.Any serializedData_;
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder> serializedDataBuilder_;
+ /**
+ * .google.protobuf.Any serialized_data = 3;
+ * @return Whether the serializedData field is set.
+ */
+ public boolean hasSerializedData() {
+ return serializedDataBuilder_ != null || serializedData_ != null;
+ }
+ /**
+ * .google.protobuf.Any serialized_data = 3;
+ * @return The serializedData.
+ */
+ public com.google.protobuf.Any getSerializedData() {
+ if (serializedDataBuilder_ == null) {
+ return serializedData_ == null ? com.google.protobuf.Any.getDefaultInstance() : serializedData_;
+ } else {
+ return serializedDataBuilder_.getMessage();
+ }
+ }
+ /**
+ * .google.protobuf.Any serialized_data = 3;
+ */
+ public Builder setSerializedData(com.google.protobuf.Any value) {
+ if (serializedDataBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ serializedData_ = value;
+ onChanged();
+ } else {
+ serializedDataBuilder_.setMessage(value);
+ }
+
+ return this;
+ }
+ /**
+ * .google.protobuf.Any serialized_data = 3;
+ */
+ public Builder setSerializedData(
+ com.google.protobuf.Any.Builder builderForValue) {
+ if (serializedDataBuilder_ == null) {
+ serializedData_ = builderForValue.build();
+ onChanged();
+ } else {
+ serializedDataBuilder_.setMessage(builderForValue.build());
+ }
+
+ return this;
+ }
+ /**
+ * .google.protobuf.Any serialized_data = 3;
+ */
+ public Builder mergeSerializedData(com.google.protobuf.Any value) {
+ if (serializedDataBuilder_ == null) {
+ if (serializedData_ != null) {
+ serializedData_ =
+ com.google.protobuf.Any.newBuilder(serializedData_).mergeFrom(value).buildPartial();
+ } else {
+ serializedData_ = value;
+ }
+ onChanged();
+ } else {
+ serializedDataBuilder_.mergeFrom(value);
+ }
+
+ return this;
+ }
+ /**
+ * .google.protobuf.Any serialized_data = 3;
+ */
+ public Builder clearSerializedData() {
+ if (serializedDataBuilder_ == null) {
+ serializedData_ = null;
+ onChanged();
+ } else {
+ serializedData_ = null;
+ serializedDataBuilder_ = null;
+ }
+
+ return this;
+ }
+ /**
+ * .google.protobuf.Any serialized_data = 3;
+ */
+ public com.google.protobuf.Any.Builder getSerializedDataBuilder() {
+
+ onChanged();
+ return getSerializedDataFieldBuilder().getBuilder();
+ }
+ /**
+ * .google.protobuf.Any serialized_data = 3;
+ */
+ public com.google.protobuf.AnyOrBuilder getSerializedDataOrBuilder() {
+ if (serializedDataBuilder_ != null) {
+ return serializedDataBuilder_.getMessageOrBuilder();
+ } else {
+ return serializedData_ == null ?
+ com.google.protobuf.Any.getDefaultInstance() : serializedData_;
+ }
+ }
+ /**
+ * .google.protobuf.Any serialized_data = 3;
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder>
+ getSerializedDataFieldBuilder() {
+ if (serializedDataBuilder_ == null) {
+ serializedDataBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder>(
+ getSerializedData(),
+ getParentForChildren(),
+ isClean());
+ serializedData_ = null;
+ }
+ return serializedDataBuilder_;
+ }
+ @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.core.FeatureDomainProto)
+ }
+
+ // @@protoc_insertion_point(class_scope:tribuo.core.FeatureDomainProto)
+ private static final org.tribuo.protos.core.FeatureDomainProto DEFAULT_INSTANCE;
+ static {
+ DEFAULT_INSTANCE = new org.tribuo.protos.core.FeatureDomainProto();
+ }
+
+ public static org.tribuo.protos.core.FeatureDomainProto getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser
+ PARSER = new com.google.protobuf.AbstractParser() {
+ @java.lang.Override
+ public FeatureDomainProto parsePartialFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return new FeatureDomainProto(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.tribuo.protos.core.FeatureDomainProto getDefaultInstanceForType() {
+ return DEFAULT_INSTANCE;
+ }
+
+}
+
diff --git a/Core/src/main/java/org/tribuo/protos/core/FeatureDomainProtoOrBuilder.java b/Core/src/main/java/org/tribuo/protos/core/FeatureDomainProtoOrBuilder.java
new file mode 100644
index 000000000..4fd0df069
--- /dev/null
+++ b/Core/src/main/java/org/tribuo/protos/core/FeatureDomainProtoOrBuilder.java
@@ -0,0 +1,42 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: tribuo-core.proto
+
+package org.tribuo.protos.core;
+
+public interface FeatureDomainProtoOrBuilder extends
+ // @@protoc_insertion_point(interface_extends:tribuo.core.FeatureDomainProto)
+ com.google.protobuf.MessageOrBuilder {
+
+ /**
+ * int32 version = 1;
+ * @return The version.
+ */
+ int getVersion();
+
+ /**
+ * string class_name = 2;
+ * @return The className.
+ */
+ java.lang.String getClassName();
+ /**
+ * string class_name = 2;
+ * @return The bytes for className.
+ */
+ com.google.protobuf.ByteString
+ getClassNameBytes();
+
+ /**
+ * .google.protobuf.Any serialized_data = 3;
+ * @return Whether the serializedData field is set.
+ */
+ boolean hasSerializedData();
+ /**
+ * .google.protobuf.Any serialized_data = 3;
+ * @return The serializedData.
+ */
+ com.google.protobuf.Any getSerializedData();
+ /**
+ * .google.protobuf.Any serialized_data = 3;
+ */
+ com.google.protobuf.AnyOrBuilder getSerializedDataOrBuilder();
+}
diff --git a/Core/src/main/java/org/tribuo/protos/core/HashedFeatureMapProto.java b/Core/src/main/java/org/tribuo/protos/core/HashedFeatureMapProto.java
new file mode 100644
index 000000000..bca1fcf27
--- /dev/null
+++ b/Core/src/main/java/org/tribuo/protos/core/HashedFeatureMapProto.java
@@ -0,0 +1,968 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: tribuo-core-impl.proto
+
+package org.tribuo.protos.core;
+
+/**
+ *
+ *HashedFeatureMap proto
+ *
+ *
+ * Protobuf type {@code tribuo.core.HashedFeatureMapProto}
+ */
+public final class HashedFeatureMapProto extends
+ com.google.protobuf.GeneratedMessageV3 implements
+ // @@protoc_insertion_point(message_implements:tribuo.core.HashedFeatureMapProto)
+ HashedFeatureMapProtoOrBuilder {
+private static final long serialVersionUID = 0L;
+ // Use HashedFeatureMapProto.newBuilder() to construct.
+ private HashedFeatureMapProto(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
+ super(builder);
+ }
+ private HashedFeatureMapProto() {
+ info_ = java.util.Collections.emptyList();
+ }
+
+ @java.lang.Override
+ @SuppressWarnings({"unused"})
+ protected java.lang.Object newInstance(
+ UnusedPrivateParameter unused) {
+ return new HashedFeatureMapProto();
+ }
+
+ @java.lang.Override
+ public final com.google.protobuf.UnknownFieldSet
+ getUnknownFields() {
+ return this.unknownFields;
+ }
+ private HashedFeatureMapProto(
+ 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 10: {
+ org.tribuo.protos.core.HasherProto.Builder subBuilder = null;
+ if (hasher_ != null) {
+ subBuilder = hasher_.toBuilder();
+ }
+ hasher_ = input.readMessage(org.tribuo.protos.core.HasherProto.parser(), extensionRegistry);
+ if (subBuilder != null) {
+ subBuilder.mergeFrom(hasher_);
+ hasher_ = subBuilder.buildPartial();
+ }
+
+ break;
+ }
+ case 18: {
+ if (!((mutable_bitField0_ & 0x00000001) != 0)) {
+ info_ = new java.util.ArrayList();
+ mutable_bitField0_ |= 0x00000001;
+ }
+ info_.add(
+ input.readMessage(org.tribuo.protos.core.VariableInfoProto.parser(), extensionRegistry));
+ 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)) {
+ info_ = java.util.Collections.unmodifiableList(info_);
+ }
+ this.unknownFields = unknownFields.build();
+ makeExtensionsImmutable();
+ }
+ }
+ public static final com.google.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return org.tribuo.protos.core.TribuoCoreImpl.internal_static_tribuo_core_HashedFeatureMapProto_descriptor;
+ }
+
+ @java.lang.Override
+ protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return org.tribuo.protos.core.TribuoCoreImpl.internal_static_tribuo_core_HashedFeatureMapProto_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ org.tribuo.protos.core.HashedFeatureMapProto.class, org.tribuo.protos.core.HashedFeatureMapProto.Builder.class);
+ }
+
+ public static final int HASHER_FIELD_NUMBER = 1;
+ private org.tribuo.protos.core.HasherProto hasher_;
+ /**
+ * .tribuo.core.HasherProto hasher = 1;
+ * @return Whether the hasher field is set.
+ */
+ @java.lang.Override
+ public boolean hasHasher() {
+ return hasher_ != null;
+ }
+ /**
+ * .tribuo.core.HasherProto hasher = 1;
+ * @return The hasher.
+ */
+ @java.lang.Override
+ public org.tribuo.protos.core.HasherProto getHasher() {
+ return hasher_ == null ? org.tribuo.protos.core.HasherProto.getDefaultInstance() : hasher_;
+ }
+ /**
+ * .tribuo.core.HasherProto hasher = 1;
+ */
+ @java.lang.Override
+ public org.tribuo.protos.core.HasherProtoOrBuilder getHasherOrBuilder() {
+ return getHasher();
+ }
+
+ public static final int INFO_FIELD_NUMBER = 2;
+ private java.util.List info_;
+ /**
+ * repeated .tribuo.core.VariableInfoProto info = 2;
+ */
+ @java.lang.Override
+ public java.util.List getInfoList() {
+ return info_;
+ }
+ /**
+ * repeated .tribuo.core.VariableInfoProto info = 2;
+ */
+ @java.lang.Override
+ public java.util.List extends org.tribuo.protos.core.VariableInfoProtoOrBuilder>
+ getInfoOrBuilderList() {
+ return info_;
+ }
+ /**
+ * repeated .tribuo.core.VariableInfoProto info = 2;
+ */
+ @java.lang.Override
+ public int getInfoCount() {
+ return info_.size();
+ }
+ /**
+ * repeated .tribuo.core.VariableInfoProto info = 2;
+ */
+ @java.lang.Override
+ public org.tribuo.protos.core.VariableInfoProto getInfo(int index) {
+ return info_.get(index);
+ }
+ /**
+ * repeated .tribuo.core.VariableInfoProto info = 2;
+ */
+ @java.lang.Override
+ public org.tribuo.protos.core.VariableInfoProtoOrBuilder getInfoOrBuilder(
+ int index) {
+ return info_.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 (hasher_ != null) {
+ output.writeMessage(1, getHasher());
+ }
+ for (int i = 0; i < info_.size(); i++) {
+ output.writeMessage(2, info_.get(i));
+ }
+ unknownFields.writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (hasher_ != null) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeMessageSize(1, getHasher());
+ }
+ for (int i = 0; i < info_.size(); i++) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeMessageSize(2, info_.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.tribuo.protos.core.HashedFeatureMapProto)) {
+ return super.equals(obj);
+ }
+ org.tribuo.protos.core.HashedFeatureMapProto other = (org.tribuo.protos.core.HashedFeatureMapProto) obj;
+
+ if (hasHasher() != other.hasHasher()) return false;
+ if (hasHasher()) {
+ if (!getHasher()
+ .equals(other.getHasher())) return false;
+ }
+ if (!getInfoList()
+ .equals(other.getInfoList())) 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();
+ if (hasHasher()) {
+ hash = (37 * hash) + HASHER_FIELD_NUMBER;
+ hash = (53 * hash) + getHasher().hashCode();
+ }
+ if (getInfoCount() > 0) {
+ hash = (37 * hash) + INFO_FIELD_NUMBER;
+ hash = (53 * hash) + getInfoList().hashCode();
+ }
+ hash = (29 * hash) + unknownFields.hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static org.tribuo.protos.core.HashedFeatureMapProto parseFrom(
+ java.nio.ByteBuffer data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static org.tribuo.protos.core.HashedFeatureMapProto parseFrom(
+ java.nio.ByteBuffer data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static org.tribuo.protos.core.HashedFeatureMapProto parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static org.tribuo.protos.core.HashedFeatureMapProto 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.protos.core.HashedFeatureMapProto parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static org.tribuo.protos.core.HashedFeatureMapProto parseFrom(
+ byte[] data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static org.tribuo.protos.core.HashedFeatureMapProto parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input);
+ }
+ public static org.tribuo.protos.core.HashedFeatureMapProto 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.protos.core.HashedFeatureMapProto parseDelimitedFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseDelimitedWithIOException(PARSER, input);
+ }
+ public static org.tribuo.protos.core.HashedFeatureMapProto 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.protos.core.HashedFeatureMapProto parseFrom(
+ com.google.protobuf.CodedInputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input);
+ }
+ public static org.tribuo.protos.core.HashedFeatureMapProto 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.protos.core.HashedFeatureMapProto 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;
+ }
+ /**
+ *
+ *HashedFeatureMap proto
+ *
+ *
+ * Protobuf type {@code tribuo.core.HashedFeatureMapProto}
+ */
+ public static final class Builder extends
+ com.google.protobuf.GeneratedMessageV3.Builder implements
+ // @@protoc_insertion_point(builder_implements:tribuo.core.HashedFeatureMapProto)
+ org.tribuo.protos.core.HashedFeatureMapProtoOrBuilder {
+ public static final com.google.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return org.tribuo.protos.core.TribuoCoreImpl.internal_static_tribuo_core_HashedFeatureMapProto_descriptor;
+ }
+
+ @java.lang.Override
+ protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return org.tribuo.protos.core.TribuoCoreImpl.internal_static_tribuo_core_HashedFeatureMapProto_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ org.tribuo.protos.core.HashedFeatureMapProto.class, org.tribuo.protos.core.HashedFeatureMapProto.Builder.class);
+ }
+
+ // Construct using org.tribuo.protos.core.HashedFeatureMapProto.newBuilder()
+ private Builder() {
+ maybeForceBuilderInitialization();
+ }
+
+ private Builder(
+ com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+ super(parent);
+ maybeForceBuilderInitialization();
+ }
+ private void maybeForceBuilderInitialization() {
+ if (com.google.protobuf.GeneratedMessageV3
+ .alwaysUseFieldBuilders) {
+ getInfoFieldBuilder();
+ }
+ }
+ @java.lang.Override
+ public Builder clear() {
+ super.clear();
+ if (hasherBuilder_ == null) {
+ hasher_ = null;
+ } else {
+ hasher_ = null;
+ hasherBuilder_ = null;
+ }
+ if (infoBuilder_ == null) {
+ info_ = java.util.Collections.emptyList();
+ bitField0_ = (bitField0_ & ~0x00000001);
+ } else {
+ infoBuilder_.clear();
+ }
+ return this;
+ }
+
+ @java.lang.Override
+ public com.google.protobuf.Descriptors.Descriptor
+ getDescriptorForType() {
+ return org.tribuo.protos.core.TribuoCoreImpl.internal_static_tribuo_core_HashedFeatureMapProto_descriptor;
+ }
+
+ @java.lang.Override
+ public org.tribuo.protos.core.HashedFeatureMapProto getDefaultInstanceForType() {
+ return org.tribuo.protos.core.HashedFeatureMapProto.getDefaultInstance();
+ }
+
+ @java.lang.Override
+ public org.tribuo.protos.core.HashedFeatureMapProto build() {
+ org.tribuo.protos.core.HashedFeatureMapProto result = buildPartial();
+ if (!result.isInitialized()) {
+ throw newUninitializedMessageException(result);
+ }
+ return result;
+ }
+
+ @java.lang.Override
+ public org.tribuo.protos.core.HashedFeatureMapProto buildPartial() {
+ org.tribuo.protos.core.HashedFeatureMapProto result = new org.tribuo.protos.core.HashedFeatureMapProto(this);
+ int from_bitField0_ = bitField0_;
+ if (hasherBuilder_ == null) {
+ result.hasher_ = hasher_;
+ } else {
+ result.hasher_ = hasherBuilder_.build();
+ }
+ if (infoBuilder_ == null) {
+ if (((bitField0_ & 0x00000001) != 0)) {
+ info_ = java.util.Collections.unmodifiableList(info_);
+ bitField0_ = (bitField0_ & ~0x00000001);
+ }
+ result.info_ = info_;
+ } else {
+ result.info_ = infoBuilder_.build();
+ }
+ 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.protos.core.HashedFeatureMapProto) {
+ return mergeFrom((org.tribuo.protos.core.HashedFeatureMapProto)other);
+ } else {
+ super.mergeFrom(other);
+ return this;
+ }
+ }
+
+ public Builder mergeFrom(org.tribuo.protos.core.HashedFeatureMapProto other) {
+ if (other == org.tribuo.protos.core.HashedFeatureMapProto.getDefaultInstance()) return this;
+ if (other.hasHasher()) {
+ mergeHasher(other.getHasher());
+ }
+ if (infoBuilder_ == null) {
+ if (!other.info_.isEmpty()) {
+ if (info_.isEmpty()) {
+ info_ = other.info_;
+ bitField0_ = (bitField0_ & ~0x00000001);
+ } else {
+ ensureInfoIsMutable();
+ info_.addAll(other.info_);
+ }
+ onChanged();
+ }
+ } else {
+ if (!other.info_.isEmpty()) {
+ if (infoBuilder_.isEmpty()) {
+ infoBuilder_.dispose();
+ infoBuilder_ = null;
+ info_ = other.info_;
+ bitField0_ = (bitField0_ & ~0x00000001);
+ infoBuilder_ =
+ com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
+ getInfoFieldBuilder() : null;
+ } else {
+ infoBuilder_.addAllMessages(other.info_);
+ }
+ }
+ }
+ 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.protos.core.HashedFeatureMapProto parsedMessage = null;
+ try {
+ parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ parsedMessage = (org.tribuo.protos.core.HashedFeatureMapProto) e.getUnfinishedMessage();
+ throw e.unwrapIOException();
+ } finally {
+ if (parsedMessage != null) {
+ mergeFrom(parsedMessage);
+ }
+ }
+ return this;
+ }
+ private int bitField0_;
+
+ private org.tribuo.protos.core.HasherProto hasher_;
+ private com.google.protobuf.SingleFieldBuilderV3<
+ org.tribuo.protos.core.HasherProto, org.tribuo.protos.core.HasherProto.Builder, org.tribuo.protos.core.HasherProtoOrBuilder> hasherBuilder_;
+ /**
+ * .tribuo.core.HasherProto hasher = 1;
+ * @return Whether the hasher field is set.
+ */
+ public boolean hasHasher() {
+ return hasherBuilder_ != null || hasher_ != null;
+ }
+ /**
+ * .tribuo.core.HasherProto hasher = 1;
+ * @return The hasher.
+ */
+ public org.tribuo.protos.core.HasherProto getHasher() {
+ if (hasherBuilder_ == null) {
+ return hasher_ == null ? org.tribuo.protos.core.HasherProto.getDefaultInstance() : hasher_;
+ } else {
+ return hasherBuilder_.getMessage();
+ }
+ }
+ /**
+ * .tribuo.core.HasherProto hasher = 1;
+ */
+ public Builder setHasher(org.tribuo.protos.core.HasherProto value) {
+ if (hasherBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ hasher_ = value;
+ onChanged();
+ } else {
+ hasherBuilder_.setMessage(value);
+ }
+
+ return this;
+ }
+ /**
+ * .tribuo.core.HasherProto hasher = 1;
+ */
+ public Builder setHasher(
+ org.tribuo.protos.core.HasherProto.Builder builderForValue) {
+ if (hasherBuilder_ == null) {
+ hasher_ = builderForValue.build();
+ onChanged();
+ } else {
+ hasherBuilder_.setMessage(builderForValue.build());
+ }
+
+ return this;
+ }
+ /**
+ * .tribuo.core.HasherProto hasher = 1;
+ */
+ public Builder mergeHasher(org.tribuo.protos.core.HasherProto value) {
+ if (hasherBuilder_ == null) {
+ if (hasher_ != null) {
+ hasher_ =
+ org.tribuo.protos.core.HasherProto.newBuilder(hasher_).mergeFrom(value).buildPartial();
+ } else {
+ hasher_ = value;
+ }
+ onChanged();
+ } else {
+ hasherBuilder_.mergeFrom(value);
+ }
+
+ return this;
+ }
+ /**
+ * .tribuo.core.HasherProto hasher = 1;
+ */
+ public Builder clearHasher() {
+ if (hasherBuilder_ == null) {
+ hasher_ = null;
+ onChanged();
+ } else {
+ hasher_ = null;
+ hasherBuilder_ = null;
+ }
+
+ return this;
+ }
+ /**
+ * .tribuo.core.HasherProto hasher = 1;
+ */
+ public org.tribuo.protos.core.HasherProto.Builder getHasherBuilder() {
+
+ onChanged();
+ return getHasherFieldBuilder().getBuilder();
+ }
+ /**
+ * .tribuo.core.HasherProto hasher = 1;
+ */
+ public org.tribuo.protos.core.HasherProtoOrBuilder getHasherOrBuilder() {
+ if (hasherBuilder_ != null) {
+ return hasherBuilder_.getMessageOrBuilder();
+ } else {
+ return hasher_ == null ?
+ org.tribuo.protos.core.HasherProto.getDefaultInstance() : hasher_;
+ }
+ }
+ /**
+ * .tribuo.core.HasherProto hasher = 1;
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ org.tribuo.protos.core.HasherProto, org.tribuo.protos.core.HasherProto.Builder, org.tribuo.protos.core.HasherProtoOrBuilder>
+ getHasherFieldBuilder() {
+ if (hasherBuilder_ == null) {
+ hasherBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
+ org.tribuo.protos.core.HasherProto, org.tribuo.protos.core.HasherProto.Builder, org.tribuo.protos.core.HasherProtoOrBuilder>(
+ getHasher(),
+ getParentForChildren(),
+ isClean());
+ hasher_ = null;
+ }
+ return hasherBuilder_;
+ }
+
+ private java.util.List info_ =
+ java.util.Collections.emptyList();
+ private void ensureInfoIsMutable() {
+ if (!((bitField0_ & 0x00000001) != 0)) {
+ info_ = new java.util.ArrayList(info_);
+ bitField0_ |= 0x00000001;
+ }
+ }
+
+ private com.google.protobuf.RepeatedFieldBuilderV3<
+ org.tribuo.protos.core.VariableInfoProto, org.tribuo.protos.core.VariableInfoProto.Builder, org.tribuo.protos.core.VariableInfoProtoOrBuilder> infoBuilder_;
+
+ /**
+ * repeated .tribuo.core.VariableInfoProto info = 2;
+ */
+ public java.util.List getInfoList() {
+ if (infoBuilder_ == null) {
+ return java.util.Collections.unmodifiableList(info_);
+ } else {
+ return infoBuilder_.getMessageList();
+ }
+ }
+ /**
+ * repeated .tribuo.core.VariableInfoProto info = 2;
+ */
+ public int getInfoCount() {
+ if (infoBuilder_ == null) {
+ return info_.size();
+ } else {
+ return infoBuilder_.getCount();
+ }
+ }
+ /**
+ * repeated .tribuo.core.VariableInfoProto info = 2;
+ */
+ public org.tribuo.protos.core.VariableInfoProto getInfo(int index) {
+ if (infoBuilder_ == null) {
+ return info_.get(index);
+ } else {
+ return infoBuilder_.getMessage(index);
+ }
+ }
+ /**
+ * repeated .tribuo.core.VariableInfoProto info = 2;
+ */
+ public Builder setInfo(
+ int index, org.tribuo.protos.core.VariableInfoProto value) {
+ if (infoBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureInfoIsMutable();
+ info_.set(index, value);
+ onChanged();
+ } else {
+ infoBuilder_.setMessage(index, value);
+ }
+ return this;
+ }
+ /**
+ * repeated .tribuo.core.VariableInfoProto info = 2;
+ */
+ public Builder setInfo(
+ int index, org.tribuo.protos.core.VariableInfoProto.Builder builderForValue) {
+ if (infoBuilder_ == null) {
+ ensureInfoIsMutable();
+ info_.set(index, builderForValue.build());
+ onChanged();
+ } else {
+ infoBuilder_.setMessage(index, builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ * repeated .tribuo.core.VariableInfoProto info = 2;
+ */
+ public Builder addInfo(org.tribuo.protos.core.VariableInfoProto value) {
+ if (infoBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureInfoIsMutable();
+ info_.add(value);
+ onChanged();
+ } else {
+ infoBuilder_.addMessage(value);
+ }
+ return this;
+ }
+ /**
+ * repeated .tribuo.core.VariableInfoProto info = 2;
+ */
+ public Builder addInfo(
+ int index, org.tribuo.protos.core.VariableInfoProto value) {
+ if (infoBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureInfoIsMutable();
+ info_.add(index, value);
+ onChanged();
+ } else {
+ infoBuilder_.addMessage(index, value);
+ }
+ return this;
+ }
+ /**
+ * repeated .tribuo.core.VariableInfoProto info = 2;
+ */
+ public Builder addInfo(
+ org.tribuo.protos.core.VariableInfoProto.Builder builderForValue) {
+ if (infoBuilder_ == null) {
+ ensureInfoIsMutable();
+ info_.add(builderForValue.build());
+ onChanged();
+ } else {
+ infoBuilder_.addMessage(builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ * repeated .tribuo.core.VariableInfoProto info = 2;
+ */
+ public Builder addInfo(
+ int index, org.tribuo.protos.core.VariableInfoProto.Builder builderForValue) {
+ if (infoBuilder_ == null) {
+ ensureInfoIsMutable();
+ info_.add(index, builderForValue.build());
+ onChanged();
+ } else {
+ infoBuilder_.addMessage(index, builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ * repeated .tribuo.core.VariableInfoProto info = 2;
+ */
+ public Builder addAllInfo(
+ java.lang.Iterable extends org.tribuo.protos.core.VariableInfoProto> values) {
+ if (infoBuilder_ == null) {
+ ensureInfoIsMutable();
+ com.google.protobuf.AbstractMessageLite.Builder.addAll(
+ values, info_);
+ onChanged();
+ } else {
+ infoBuilder_.addAllMessages(values);
+ }
+ return this;
+ }
+ /**
+ * repeated .tribuo.core.VariableInfoProto info = 2;
+ */
+ public Builder clearInfo() {
+ if (infoBuilder_ == null) {
+ info_ = java.util.Collections.emptyList();
+ bitField0_ = (bitField0_ & ~0x00000001);
+ onChanged();
+ } else {
+ infoBuilder_.clear();
+ }
+ return this;
+ }
+ /**
+ * repeated .tribuo.core.VariableInfoProto info = 2;
+ */
+ public Builder removeInfo(int index) {
+ if (infoBuilder_ == null) {
+ ensureInfoIsMutable();
+ info_.remove(index);
+ onChanged();
+ } else {
+ infoBuilder_.remove(index);
+ }
+ return this;
+ }
+ /**
+ * repeated .tribuo.core.VariableInfoProto info = 2;
+ */
+ public org.tribuo.protos.core.VariableInfoProto.Builder getInfoBuilder(
+ int index) {
+ return getInfoFieldBuilder().getBuilder(index);
+ }
+ /**
+ * repeated .tribuo.core.VariableInfoProto info = 2;
+ */
+ public org.tribuo.protos.core.VariableInfoProtoOrBuilder getInfoOrBuilder(
+ int index) {
+ if (infoBuilder_ == null) {
+ return info_.get(index); } else {
+ return infoBuilder_.getMessageOrBuilder(index);
+ }
+ }
+ /**
+ * repeated .tribuo.core.VariableInfoProto info = 2;
+ */
+ public java.util.List extends org.tribuo.protos.core.VariableInfoProtoOrBuilder>
+ getInfoOrBuilderList() {
+ if (infoBuilder_ != null) {
+ return infoBuilder_.getMessageOrBuilderList();
+ } else {
+ return java.util.Collections.unmodifiableList(info_);
+ }
+ }
+ /**
+ * repeated .tribuo.core.VariableInfoProto info = 2;
+ */
+ public org.tribuo.protos.core.VariableInfoProto.Builder addInfoBuilder() {
+ return getInfoFieldBuilder().addBuilder(
+ org.tribuo.protos.core.VariableInfoProto.getDefaultInstance());
+ }
+ /**
+ * repeated .tribuo.core.VariableInfoProto info = 2;
+ */
+ public org.tribuo.protos.core.VariableInfoProto.Builder addInfoBuilder(
+ int index) {
+ return getInfoFieldBuilder().addBuilder(
+ index, org.tribuo.protos.core.VariableInfoProto.getDefaultInstance());
+ }
+ /**
+ * repeated .tribuo.core.VariableInfoProto info = 2;
+ */
+ public java.util.List
+ getInfoBuilderList() {
+ return getInfoFieldBuilder().getBuilderList();
+ }
+ private com.google.protobuf.RepeatedFieldBuilderV3<
+ org.tribuo.protos.core.VariableInfoProto, org.tribuo.protos.core.VariableInfoProto.Builder, org.tribuo.protos.core.VariableInfoProtoOrBuilder>
+ getInfoFieldBuilder() {
+ if (infoBuilder_ == null) {
+ infoBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
+ org.tribuo.protos.core.VariableInfoProto, org.tribuo.protos.core.VariableInfoProto.Builder, org.tribuo.protos.core.VariableInfoProtoOrBuilder>(
+ info_,
+ ((bitField0_ & 0x00000001) != 0),
+ getParentForChildren(),
+ isClean());
+ info_ = null;
+ }
+ return infoBuilder_;
+ }
+ @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.core.HashedFeatureMapProto)
+ }
+
+ // @@protoc_insertion_point(class_scope:tribuo.core.HashedFeatureMapProto)
+ private static final org.tribuo.protos.core.HashedFeatureMapProto DEFAULT_INSTANCE;
+ static {
+ DEFAULT_INSTANCE = new org.tribuo.protos.core.HashedFeatureMapProto();
+ }
+
+ public static org.tribuo.protos.core.HashedFeatureMapProto getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser
+ PARSER = new com.google.protobuf.AbstractParser() {
+ @java.lang.Override
+ public HashedFeatureMapProto parsePartialFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return new HashedFeatureMapProto(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.tribuo.protos.core.HashedFeatureMapProto getDefaultInstanceForType() {
+ return DEFAULT_INSTANCE;
+ }
+
+}
+
diff --git a/Core/src/main/java/org/tribuo/protos/core/HashedFeatureMapProtoOrBuilder.java b/Core/src/main/java/org/tribuo/protos/core/HashedFeatureMapProtoOrBuilder.java
new file mode 100644
index 000000000..0e4023ea4
--- /dev/null
+++ b/Core/src/main/java/org/tribuo/protos/core/HashedFeatureMapProtoOrBuilder.java
@@ -0,0 +1,48 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: tribuo-core-impl.proto
+
+package org.tribuo.protos.core;
+
+public interface HashedFeatureMapProtoOrBuilder extends
+ // @@protoc_insertion_point(interface_extends:tribuo.core.HashedFeatureMapProto)
+ com.google.protobuf.MessageOrBuilder {
+
+ /**
+ * .tribuo.core.HasherProto hasher = 1;
+ * @return Whether the hasher field is set.
+ */
+ boolean hasHasher();
+ /**
+ * .tribuo.core.HasherProto hasher = 1;
+ * @return The hasher.
+ */
+ org.tribuo.protos.core.HasherProto getHasher();
+ /**
+ * .tribuo.core.HasherProto hasher = 1;
+ */
+ org.tribuo.protos.core.HasherProtoOrBuilder getHasherOrBuilder();
+
+ /**
+ * repeated .tribuo.core.VariableInfoProto info = 2;
+ */
+ java.util.List
+ getInfoList();
+ /**
+ * repeated .tribuo.core.VariableInfoProto info = 2;
+ */
+ org.tribuo.protos.core.VariableInfoProto getInfo(int index);
+ /**
+ * repeated .tribuo.core.VariableInfoProto info = 2;
+ */
+ int getInfoCount();
+ /**
+ * repeated .tribuo.core.VariableInfoProto info = 2;
+ */
+ java.util.List extends org.tribuo.protos.core.VariableInfoProtoOrBuilder>
+ getInfoOrBuilderList();
+ /**
+ * repeated .tribuo.core.VariableInfoProto info = 2;
+ */
+ org.tribuo.protos.core.VariableInfoProtoOrBuilder getInfoOrBuilder(
+ int index);
+}
diff --git a/Core/src/main/java/org/tribuo/protos/core/HasherProto.java b/Core/src/main/java/org/tribuo/protos/core/HasherProto.java
new file mode 100644
index 000000000..1433232d8
--- /dev/null
+++ b/Core/src/main/java/org/tribuo/protos/core/HasherProto.java
@@ -0,0 +1,819 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: tribuo-core.proto
+
+package org.tribuo.protos.core;
+
+/**
+ *
+ *Hasher redirection proto
+ *
+ *
+ * Protobuf type {@code tribuo.core.HasherProto}
+ */
+public final class HasherProto extends
+ com.google.protobuf.GeneratedMessageV3 implements
+ // @@protoc_insertion_point(message_implements:tribuo.core.HasherProto)
+ HasherProtoOrBuilder {
+private static final long serialVersionUID = 0L;
+ // Use HasherProto.newBuilder() to construct.
+ private HasherProto(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
+ super(builder);
+ }
+ private HasherProto() {
+ className_ = "";
+ }
+
+ @java.lang.Override
+ @SuppressWarnings({"unused"})
+ protected java.lang.Object newInstance(
+ UnusedPrivateParameter unused) {
+ return new HasherProto();
+ }
+
+ @java.lang.Override
+ public final com.google.protobuf.UnknownFieldSet
+ getUnknownFields() {
+ return this.unknownFields;
+ }
+ private HasherProto(
+ 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: {
+
+ version_ = input.readInt32();
+ break;
+ }
+ case 18: {
+ java.lang.String s = input.readStringRequireUtf8();
+
+ className_ = s;
+ break;
+ }
+ case 26: {
+ com.google.protobuf.Any.Builder subBuilder = null;
+ if (serializedData_ != null) {
+ subBuilder = serializedData_.toBuilder();
+ }
+ serializedData_ = input.readMessage(com.google.protobuf.Any.parser(), extensionRegistry);
+ if (subBuilder != null) {
+ subBuilder.mergeFrom(serializedData_);
+ serializedData_ = subBuilder.buildPartial();
+ }
+
+ 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 {
+ this.unknownFields = unknownFields.build();
+ makeExtensionsImmutable();
+ }
+ }
+ public static final com.google.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return org.tribuo.protos.core.TribuoCore.internal_static_tribuo_core_HasherProto_descriptor;
+ }
+
+ @java.lang.Override
+ protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return org.tribuo.protos.core.TribuoCore.internal_static_tribuo_core_HasherProto_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ org.tribuo.protos.core.HasherProto.class, org.tribuo.protos.core.HasherProto.Builder.class);
+ }
+
+ public static final int VERSION_FIELD_NUMBER = 1;
+ private int version_;
+ /**
+ * int32 version = 1;
+ * @return The version.
+ */
+ @java.lang.Override
+ public int getVersion() {
+ return version_;
+ }
+
+ public static final int CLASS_NAME_FIELD_NUMBER = 2;
+ private volatile java.lang.Object className_;
+ /**
+ * string class_name = 2;
+ * @return The className.
+ */
+ @java.lang.Override
+ public java.lang.String getClassName() {
+ java.lang.Object ref = className_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ className_ = s;
+ return s;
+ }
+ }
+ /**
+ * string class_name = 2;
+ * @return The bytes for className.
+ */
+ @java.lang.Override
+ public com.google.protobuf.ByteString
+ getClassNameBytes() {
+ java.lang.Object ref = className_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ className_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int SERIALIZED_DATA_FIELD_NUMBER = 3;
+ private com.google.protobuf.Any serializedData_;
+ /**
+ * .google.protobuf.Any serialized_data = 3;
+ * @return Whether the serializedData field is set.
+ */
+ @java.lang.Override
+ public boolean hasSerializedData() {
+ return serializedData_ != null;
+ }
+ /**
+ * .google.protobuf.Any serialized_data = 3;
+ * @return The serializedData.
+ */
+ @java.lang.Override
+ public com.google.protobuf.Any getSerializedData() {
+ return serializedData_ == null ? com.google.protobuf.Any.getDefaultInstance() : serializedData_;
+ }
+ /**
+ * .google.protobuf.Any serialized_data = 3;
+ */
+ @java.lang.Override
+ public com.google.protobuf.AnyOrBuilder getSerializedDataOrBuilder() {
+ return getSerializedData();
+ }
+
+ 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 (version_ != 0) {
+ output.writeInt32(1, version_);
+ }
+ if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(className_)) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 2, className_);
+ }
+ if (serializedData_ != null) {
+ output.writeMessage(3, getSerializedData());
+ }
+ unknownFields.writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (version_ != 0) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeInt32Size(1, version_);
+ }
+ if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(className_)) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, className_);
+ }
+ if (serializedData_ != null) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeMessageSize(3, getSerializedData());
+ }
+ 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.protos.core.HasherProto)) {
+ return super.equals(obj);
+ }
+ org.tribuo.protos.core.HasherProto other = (org.tribuo.protos.core.HasherProto) obj;
+
+ if (getVersion()
+ != other.getVersion()) return false;
+ if (!getClassName()
+ .equals(other.getClassName())) return false;
+ if (hasSerializedData() != other.hasSerializedData()) return false;
+ if (hasSerializedData()) {
+ if (!getSerializedData()
+ .equals(other.getSerializedData())) 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) + VERSION_FIELD_NUMBER;
+ hash = (53 * hash) + getVersion();
+ hash = (37 * hash) + CLASS_NAME_FIELD_NUMBER;
+ hash = (53 * hash) + getClassName().hashCode();
+ if (hasSerializedData()) {
+ hash = (37 * hash) + SERIALIZED_DATA_FIELD_NUMBER;
+ hash = (53 * hash) + getSerializedData().hashCode();
+ }
+ hash = (29 * hash) + unknownFields.hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static org.tribuo.protos.core.HasherProto parseFrom(
+ java.nio.ByteBuffer data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static org.tribuo.protos.core.HasherProto parseFrom(
+ java.nio.ByteBuffer data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static org.tribuo.protos.core.HasherProto parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static org.tribuo.protos.core.HasherProto 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.protos.core.HasherProto parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static org.tribuo.protos.core.HasherProto parseFrom(
+ byte[] data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static org.tribuo.protos.core.HasherProto parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input);
+ }
+ public static org.tribuo.protos.core.HasherProto 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.protos.core.HasherProto parseDelimitedFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseDelimitedWithIOException(PARSER, input);
+ }
+ public static org.tribuo.protos.core.HasherProto 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.protos.core.HasherProto parseFrom(
+ com.google.protobuf.CodedInputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input);
+ }
+ public static org.tribuo.protos.core.HasherProto 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.protos.core.HasherProto 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;
+ }
+ /**
+ *
+ *Hasher redirection proto
+ *
+ *
+ * Protobuf type {@code tribuo.core.HasherProto}
+ */
+ public static final class Builder extends
+ com.google.protobuf.GeneratedMessageV3.Builder implements
+ // @@protoc_insertion_point(builder_implements:tribuo.core.HasherProto)
+ org.tribuo.protos.core.HasherProtoOrBuilder {
+ public static final com.google.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return org.tribuo.protos.core.TribuoCore.internal_static_tribuo_core_HasherProto_descriptor;
+ }
+
+ @java.lang.Override
+ protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return org.tribuo.protos.core.TribuoCore.internal_static_tribuo_core_HasherProto_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ org.tribuo.protos.core.HasherProto.class, org.tribuo.protos.core.HasherProto.Builder.class);
+ }
+
+ // Construct using org.tribuo.protos.core.HasherProto.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();
+ version_ = 0;
+
+ className_ = "";
+
+ if (serializedDataBuilder_ == null) {
+ serializedData_ = null;
+ } else {
+ serializedData_ = null;
+ serializedDataBuilder_ = null;
+ }
+ return this;
+ }
+
+ @java.lang.Override
+ public com.google.protobuf.Descriptors.Descriptor
+ getDescriptorForType() {
+ return org.tribuo.protos.core.TribuoCore.internal_static_tribuo_core_HasherProto_descriptor;
+ }
+
+ @java.lang.Override
+ public org.tribuo.protos.core.HasherProto getDefaultInstanceForType() {
+ return org.tribuo.protos.core.HasherProto.getDefaultInstance();
+ }
+
+ @java.lang.Override
+ public org.tribuo.protos.core.HasherProto build() {
+ org.tribuo.protos.core.HasherProto result = buildPartial();
+ if (!result.isInitialized()) {
+ throw newUninitializedMessageException(result);
+ }
+ return result;
+ }
+
+ @java.lang.Override
+ public org.tribuo.protos.core.HasherProto buildPartial() {
+ org.tribuo.protos.core.HasherProto result = new org.tribuo.protos.core.HasherProto(this);
+ result.version_ = version_;
+ result.className_ = className_;
+ if (serializedDataBuilder_ == null) {
+ result.serializedData_ = serializedData_;
+ } else {
+ result.serializedData_ = serializedDataBuilder_.build();
+ }
+ 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.protos.core.HasherProto) {
+ return mergeFrom((org.tribuo.protos.core.HasherProto)other);
+ } else {
+ super.mergeFrom(other);
+ return this;
+ }
+ }
+
+ public Builder mergeFrom(org.tribuo.protos.core.HasherProto other) {
+ if (other == org.tribuo.protos.core.HasherProto.getDefaultInstance()) return this;
+ if (other.getVersion() != 0) {
+ setVersion(other.getVersion());
+ }
+ if (!other.getClassName().isEmpty()) {
+ className_ = other.className_;
+ onChanged();
+ }
+ if (other.hasSerializedData()) {
+ mergeSerializedData(other.getSerializedData());
+ }
+ 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.protos.core.HasherProto parsedMessage = null;
+ try {
+ parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ parsedMessage = (org.tribuo.protos.core.HasherProto) e.getUnfinishedMessage();
+ throw e.unwrapIOException();
+ } finally {
+ if (parsedMessage != null) {
+ mergeFrom(parsedMessage);
+ }
+ }
+ return this;
+ }
+
+ private int version_ ;
+ /**
+ * int32 version = 1;
+ * @return The version.
+ */
+ @java.lang.Override
+ public int getVersion() {
+ return version_;
+ }
+ /**
+ * int32 version = 1;
+ * @param value The version to set.
+ * @return This builder for chaining.
+ */
+ public Builder setVersion(int value) {
+
+ version_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * int32 version = 1;
+ * @return This builder for chaining.
+ */
+ public Builder clearVersion() {
+
+ version_ = 0;
+ onChanged();
+ return this;
+ }
+
+ private java.lang.Object className_ = "";
+ /**
+ * string class_name = 2;
+ * @return The className.
+ */
+ public java.lang.String getClassName() {
+ java.lang.Object ref = className_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ className_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ * string class_name = 2;
+ * @return The bytes for className.
+ */
+ public com.google.protobuf.ByteString
+ getClassNameBytes() {
+ java.lang.Object ref = className_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ className_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ * string class_name = 2;
+ * @param value The className to set.
+ * @return This builder for chaining.
+ */
+ public Builder setClassName(
+ java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ className_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * string class_name = 2;
+ * @return This builder for chaining.
+ */
+ public Builder clearClassName() {
+
+ className_ = getDefaultInstance().getClassName();
+ onChanged();
+ return this;
+ }
+ /**
+ * string class_name = 2;
+ * @param value The bytes for className to set.
+ * @return This builder for chaining.
+ */
+ public Builder setClassNameBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ className_ = value;
+ onChanged();
+ return this;
+ }
+
+ private com.google.protobuf.Any serializedData_;
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder> serializedDataBuilder_;
+ /**
+ * .google.protobuf.Any serialized_data = 3;
+ * @return Whether the serializedData field is set.
+ */
+ public boolean hasSerializedData() {
+ return serializedDataBuilder_ != null || serializedData_ != null;
+ }
+ /**
+ * .google.protobuf.Any serialized_data = 3;
+ * @return The serializedData.
+ */
+ public com.google.protobuf.Any getSerializedData() {
+ if (serializedDataBuilder_ == null) {
+ return serializedData_ == null ? com.google.protobuf.Any.getDefaultInstance() : serializedData_;
+ } else {
+ return serializedDataBuilder_.getMessage();
+ }
+ }
+ /**
+ * .google.protobuf.Any serialized_data = 3;
+ */
+ public Builder setSerializedData(com.google.protobuf.Any value) {
+ if (serializedDataBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ serializedData_ = value;
+ onChanged();
+ } else {
+ serializedDataBuilder_.setMessage(value);
+ }
+
+ return this;
+ }
+ /**
+ * .google.protobuf.Any serialized_data = 3;
+ */
+ public Builder setSerializedData(
+ com.google.protobuf.Any.Builder builderForValue) {
+ if (serializedDataBuilder_ == null) {
+ serializedData_ = builderForValue.build();
+ onChanged();
+ } else {
+ serializedDataBuilder_.setMessage(builderForValue.build());
+ }
+
+ return this;
+ }
+ /**
+ * .google.protobuf.Any serialized_data = 3;
+ */
+ public Builder mergeSerializedData(com.google.protobuf.Any value) {
+ if (serializedDataBuilder_ == null) {
+ if (serializedData_ != null) {
+ serializedData_ =
+ com.google.protobuf.Any.newBuilder(serializedData_).mergeFrom(value).buildPartial();
+ } else {
+ serializedData_ = value;
+ }
+ onChanged();
+ } else {
+ serializedDataBuilder_.mergeFrom(value);
+ }
+
+ return this;
+ }
+ /**
+ * .google.protobuf.Any serialized_data = 3;
+ */
+ public Builder clearSerializedData() {
+ if (serializedDataBuilder_ == null) {
+ serializedData_ = null;
+ onChanged();
+ } else {
+ serializedData_ = null;
+ serializedDataBuilder_ = null;
+ }
+
+ return this;
+ }
+ /**
+ * .google.protobuf.Any serialized_data = 3;
+ */
+ public com.google.protobuf.Any.Builder getSerializedDataBuilder() {
+
+ onChanged();
+ return getSerializedDataFieldBuilder().getBuilder();
+ }
+ /**
+ * .google.protobuf.Any serialized_data = 3;
+ */
+ public com.google.protobuf.AnyOrBuilder getSerializedDataOrBuilder() {
+ if (serializedDataBuilder_ != null) {
+ return serializedDataBuilder_.getMessageOrBuilder();
+ } else {
+ return serializedData_ == null ?
+ com.google.protobuf.Any.getDefaultInstance() : serializedData_;
+ }
+ }
+ /**
+ * .google.protobuf.Any serialized_data = 3;
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder>
+ getSerializedDataFieldBuilder() {
+ if (serializedDataBuilder_ == null) {
+ serializedDataBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder>(
+ getSerializedData(),
+ getParentForChildren(),
+ isClean());
+ serializedData_ = null;
+ }
+ return serializedDataBuilder_;
+ }
+ @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.core.HasherProto)
+ }
+
+ // @@protoc_insertion_point(class_scope:tribuo.core.HasherProto)
+ private static final org.tribuo.protos.core.HasherProto DEFAULT_INSTANCE;
+ static {
+ DEFAULT_INSTANCE = new org.tribuo.protos.core.HasherProto();
+ }
+
+ public static org.tribuo.protos.core.HasherProto getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser
+ PARSER = new com.google.protobuf.AbstractParser() {
+ @java.lang.Override
+ public HasherProto parsePartialFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return new HasherProto(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.tribuo.protos.core.HasherProto getDefaultInstanceForType() {
+ return DEFAULT_INSTANCE;
+ }
+
+}
+
diff --git a/Core/src/main/java/org/tribuo/protos/core/HasherProtoOrBuilder.java b/Core/src/main/java/org/tribuo/protos/core/HasherProtoOrBuilder.java
new file mode 100644
index 000000000..6e97dc89f
--- /dev/null
+++ b/Core/src/main/java/org/tribuo/protos/core/HasherProtoOrBuilder.java
@@ -0,0 +1,42 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: tribuo-core.proto
+
+package org.tribuo.protos.core;
+
+public interface HasherProtoOrBuilder extends
+ // @@protoc_insertion_point(interface_extends:tribuo.core.HasherProto)
+ com.google.protobuf.MessageOrBuilder {
+
+ /**
+ * int32 version = 1;
+ * @return The version.
+ */
+ int getVersion();
+
+ /**
+ * string class_name = 2;
+ * @return The className.
+ */
+ java.lang.String getClassName();
+ /**
+ * string class_name = 2;
+ * @return The bytes for className.
+ */
+ com.google.protobuf.ByteString
+ getClassNameBytes();
+
+ /**
+ * .google.protobuf.Any serialized_data = 3;
+ * @return Whether the serializedData field is set.
+ */
+ boolean hasSerializedData();
+ /**
+ * .google.protobuf.Any serialized_data = 3;
+ * @return The serializedData.
+ */
+ com.google.protobuf.Any getSerializedData();
+ /**
+ * .google.protobuf.Any serialized_data = 3;
+ */
+ com.google.protobuf.AnyOrBuilder getSerializedDataOrBuilder();
+}
diff --git a/Core/src/main/java/org/tribuo/protos/core/IDFTransformerProto.java b/Core/src/main/java/org/tribuo/protos/core/IDFTransformerProto.java
new file mode 100644
index 000000000..66888aeb1
--- /dev/null
+++ b/Core/src/main/java/org/tribuo/protos/core/IDFTransformerProto.java
@@ -0,0 +1,561 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: tribuo-core-impl.proto
+
+package org.tribuo.protos.core;
+
+/**
+ *
+ *IDFTransformer proto
+ *
+ *
+ * Protobuf type {@code tribuo.core.IDFTransformerProto}
+ */
+public final class IDFTransformerProto extends
+ com.google.protobuf.GeneratedMessageV3 implements
+ // @@protoc_insertion_point(message_implements:tribuo.core.IDFTransformerProto)
+ IDFTransformerProtoOrBuilder {
+private static final long serialVersionUID = 0L;
+ // Use IDFTransformerProto.newBuilder() to construct.
+ private IDFTransformerProto(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
+ super(builder);
+ }
+ private IDFTransformerProto() {
+ }
+
+ @java.lang.Override
+ @SuppressWarnings({"unused"})
+ protected java.lang.Object newInstance(
+ UnusedPrivateParameter unused) {
+ return new IDFTransformerProto();
+ }
+
+ @java.lang.Override
+ public final com.google.protobuf.UnknownFieldSet
+ getUnknownFields() {
+ return this.unknownFields;
+ }
+ private IDFTransformerProto(
+ 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 9: {
+
+ df_ = input.readDouble();
+ break;
+ }
+ case 17: {
+
+ n_ = input.readDouble();
+ 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 {
+ this.unknownFields = unknownFields.build();
+ makeExtensionsImmutable();
+ }
+ }
+ public static final com.google.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return org.tribuo.protos.core.TribuoCoreImpl.internal_static_tribuo_core_IDFTransformerProto_descriptor;
+ }
+
+ @java.lang.Override
+ protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return org.tribuo.protos.core.TribuoCoreImpl.internal_static_tribuo_core_IDFTransformerProto_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ org.tribuo.protos.core.IDFTransformerProto.class, org.tribuo.protos.core.IDFTransformerProto.Builder.class);
+ }
+
+ public static final int DF_FIELD_NUMBER = 1;
+ private double df_;
+ /**
+ * double df = 1;
+ * @return The df.
+ */
+ @java.lang.Override
+ public double getDf() {
+ return df_;
+ }
+
+ public static final int N_FIELD_NUMBER = 2;
+ private double n_;
+ /**
+ * double N = 2;
+ * @return The n.
+ */
+ @java.lang.Override
+ public double getN() {
+ return n_;
+ }
+
+ 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 (java.lang.Double.doubleToRawLongBits(df_) != 0) {
+ output.writeDouble(1, df_);
+ }
+ if (java.lang.Double.doubleToRawLongBits(n_) != 0) {
+ output.writeDouble(2, n_);
+ }
+ unknownFields.writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (java.lang.Double.doubleToRawLongBits(df_) != 0) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeDoubleSize(1, df_);
+ }
+ if (java.lang.Double.doubleToRawLongBits(n_) != 0) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeDoubleSize(2, n_);
+ }
+ 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.protos.core.IDFTransformerProto)) {
+ return super.equals(obj);
+ }
+ org.tribuo.protos.core.IDFTransformerProto other = (org.tribuo.protos.core.IDFTransformerProto) obj;
+
+ if (java.lang.Double.doubleToLongBits(getDf())
+ != java.lang.Double.doubleToLongBits(
+ other.getDf())) return false;
+ if (java.lang.Double.doubleToLongBits(getN())
+ != java.lang.Double.doubleToLongBits(
+ other.getN())) 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) + DF_FIELD_NUMBER;
+ hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
+ java.lang.Double.doubleToLongBits(getDf()));
+ hash = (37 * hash) + N_FIELD_NUMBER;
+ hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
+ java.lang.Double.doubleToLongBits(getN()));
+ hash = (29 * hash) + unknownFields.hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static org.tribuo.protos.core.IDFTransformerProto parseFrom(
+ java.nio.ByteBuffer data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static org.tribuo.protos.core.IDFTransformerProto parseFrom(
+ java.nio.ByteBuffer data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static org.tribuo.protos.core.IDFTransformerProto parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static org.tribuo.protos.core.IDFTransformerProto 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.protos.core.IDFTransformerProto parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static org.tribuo.protos.core.IDFTransformerProto parseFrom(
+ byte[] data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static org.tribuo.protos.core.IDFTransformerProto parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input);
+ }
+ public static org.tribuo.protos.core.IDFTransformerProto 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.protos.core.IDFTransformerProto parseDelimitedFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseDelimitedWithIOException(PARSER, input);
+ }
+ public static org.tribuo.protos.core.IDFTransformerProto 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.protos.core.IDFTransformerProto parseFrom(
+ com.google.protobuf.CodedInputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input);
+ }
+ public static org.tribuo.protos.core.IDFTransformerProto 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.protos.core.IDFTransformerProto 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;
+ }
+ /**
+ *
+ *IDFTransformer proto
+ *
+ *
+ * Protobuf type {@code tribuo.core.IDFTransformerProto}
+ */
+ public static final class Builder extends
+ com.google.protobuf.GeneratedMessageV3.Builder implements
+ // @@protoc_insertion_point(builder_implements:tribuo.core.IDFTransformerProto)
+ org.tribuo.protos.core.IDFTransformerProtoOrBuilder {
+ public static final com.google.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return org.tribuo.protos.core.TribuoCoreImpl.internal_static_tribuo_core_IDFTransformerProto_descriptor;
+ }
+
+ @java.lang.Override
+ protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return org.tribuo.protos.core.TribuoCoreImpl.internal_static_tribuo_core_IDFTransformerProto_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ org.tribuo.protos.core.IDFTransformerProto.class, org.tribuo.protos.core.IDFTransformerProto.Builder.class);
+ }
+
+ // Construct using org.tribuo.protos.core.IDFTransformerProto.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();
+ df_ = 0D;
+
+ n_ = 0D;
+
+ return this;
+ }
+
+ @java.lang.Override
+ public com.google.protobuf.Descriptors.Descriptor
+ getDescriptorForType() {
+ return org.tribuo.protos.core.TribuoCoreImpl.internal_static_tribuo_core_IDFTransformerProto_descriptor;
+ }
+
+ @java.lang.Override
+ public org.tribuo.protos.core.IDFTransformerProto getDefaultInstanceForType() {
+ return org.tribuo.protos.core.IDFTransformerProto.getDefaultInstance();
+ }
+
+ @java.lang.Override
+ public org.tribuo.protos.core.IDFTransformerProto build() {
+ org.tribuo.protos.core.IDFTransformerProto result = buildPartial();
+ if (!result.isInitialized()) {
+ throw newUninitializedMessageException(result);
+ }
+ return result;
+ }
+
+ @java.lang.Override
+ public org.tribuo.protos.core.IDFTransformerProto buildPartial() {
+ org.tribuo.protos.core.IDFTransformerProto result = new org.tribuo.protos.core.IDFTransformerProto(this);
+ result.df_ = df_;
+ result.n_ = n_;
+ 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.protos.core.IDFTransformerProto) {
+ return mergeFrom((org.tribuo.protos.core.IDFTransformerProto)other);
+ } else {
+ super.mergeFrom(other);
+ return this;
+ }
+ }
+
+ public Builder mergeFrom(org.tribuo.protos.core.IDFTransformerProto other) {
+ if (other == org.tribuo.protos.core.IDFTransformerProto.getDefaultInstance()) return this;
+ if (other.getDf() != 0D) {
+ setDf(other.getDf());
+ }
+ if (other.getN() != 0D) {
+ setN(other.getN());
+ }
+ 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.protos.core.IDFTransformerProto parsedMessage = null;
+ try {
+ parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ parsedMessage = (org.tribuo.protos.core.IDFTransformerProto) e.getUnfinishedMessage();
+ throw e.unwrapIOException();
+ } finally {
+ if (parsedMessage != null) {
+ mergeFrom(parsedMessage);
+ }
+ }
+ return this;
+ }
+
+ private double df_ ;
+ /**
+ * double df = 1;
+ * @return The df.
+ */
+ @java.lang.Override
+ public double getDf() {
+ return df_;
+ }
+ /**
+ * double df = 1;
+ * @param value The df to set.
+ * @return This builder for chaining.
+ */
+ public Builder setDf(double value) {
+
+ df_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * double df = 1;
+ * @return This builder for chaining.
+ */
+ public Builder clearDf() {
+
+ df_ = 0D;
+ onChanged();
+ return this;
+ }
+
+ private double n_ ;
+ /**
+ * double N = 2;
+ * @return The n.
+ */
+ @java.lang.Override
+ public double getN() {
+ return n_;
+ }
+ /**
+ * double N = 2;
+ * @param value The n to set.
+ * @return This builder for chaining.
+ */
+ public Builder setN(double value) {
+
+ n_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * double N = 2;
+ * @return This builder for chaining.
+ */
+ public Builder clearN() {
+
+ n_ = 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.core.IDFTransformerProto)
+ }
+
+ // @@protoc_insertion_point(class_scope:tribuo.core.IDFTransformerProto)
+ private static final org.tribuo.protos.core.IDFTransformerProto DEFAULT_INSTANCE;
+ static {
+ DEFAULT_INSTANCE = new org.tribuo.protos.core.IDFTransformerProto();
+ }
+
+ public static org.tribuo.protos.core.IDFTransformerProto getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser
+ PARSER = new com.google.protobuf.AbstractParser() {
+ @java.lang.Override
+ public IDFTransformerProto parsePartialFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return new IDFTransformerProto(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.tribuo.protos.core.IDFTransformerProto getDefaultInstanceForType() {
+ return DEFAULT_INSTANCE;
+ }
+
+}
+
diff --git a/Core/src/main/java/org/tribuo/protos/core/IDFTransformerProtoOrBuilder.java b/Core/src/main/java/org/tribuo/protos/core/IDFTransformerProtoOrBuilder.java
new file mode 100644
index 000000000..35eaee042
--- /dev/null
+++ b/Core/src/main/java/org/tribuo/protos/core/IDFTransformerProtoOrBuilder.java
@@ -0,0 +1,21 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: tribuo-core-impl.proto
+
+package org.tribuo.protos.core;
+
+public interface IDFTransformerProtoOrBuilder extends
+ // @@protoc_insertion_point(interface_extends:tribuo.core.IDFTransformerProto)
+ com.google.protobuf.MessageOrBuilder {
+
+ /**
+ * double df = 1;
+ * @return The df.
+ */
+ double getDf();
+
+ /**
+ * double N = 2;
+ * @return The n.
+ */
+ double getN();
+}
diff --git a/Core/src/main/java/org/tribuo/protos/core/ImmutableFeatureMapProto.java b/Core/src/main/java/org/tribuo/protos/core/ImmutableFeatureMapProto.java
new file mode 100644
index 000000000..65a42728d
--- /dev/null
+++ b/Core/src/main/java/org/tribuo/protos/core/ImmutableFeatureMapProto.java
@@ -0,0 +1,780 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: tribuo-core-impl.proto
+
+package org.tribuo.protos.core;
+
+/**
+ *
+ *ImmutableFeatureMap proto
+ *
+ *
+ * Protobuf type {@code tribuo.core.ImmutableFeatureMapProto}
+ */
+public final class ImmutableFeatureMapProto extends
+ com.google.protobuf.GeneratedMessageV3 implements
+ // @@protoc_insertion_point(message_implements:tribuo.core.ImmutableFeatureMapProto)
+ ImmutableFeatureMapProtoOrBuilder {
+private static final long serialVersionUID = 0L;
+ // Use ImmutableFeatureMapProto.newBuilder() to construct.
+ private ImmutableFeatureMapProto(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
+ super(builder);
+ }
+ private ImmutableFeatureMapProto() {
+ info_ = java.util.Collections.emptyList();
+ }
+
+ @java.lang.Override
+ @SuppressWarnings({"unused"})
+ protected java.lang.Object newInstance(
+ UnusedPrivateParameter unused) {
+ return new ImmutableFeatureMapProto();
+ }
+
+ @java.lang.Override
+ public final com.google.protobuf.UnknownFieldSet
+ getUnknownFields() {
+ return this.unknownFields;
+ }
+ private ImmutableFeatureMapProto(
+ 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 10: {
+ if (!((mutable_bitField0_ & 0x00000001) != 0)) {
+ info_ = new java.util.ArrayList();
+ mutable_bitField0_ |= 0x00000001;
+ }
+ info_.add(
+ input.readMessage(org.tribuo.protos.core.VariableInfoProto.parser(), extensionRegistry));
+ 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)) {
+ info_ = java.util.Collections.unmodifiableList(info_);
+ }
+ this.unknownFields = unknownFields.build();
+ makeExtensionsImmutable();
+ }
+ }
+ public static final com.google.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return org.tribuo.protos.core.TribuoCoreImpl.internal_static_tribuo_core_ImmutableFeatureMapProto_descriptor;
+ }
+
+ @java.lang.Override
+ protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return org.tribuo.protos.core.TribuoCoreImpl.internal_static_tribuo_core_ImmutableFeatureMapProto_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ org.tribuo.protos.core.ImmutableFeatureMapProto.class, org.tribuo.protos.core.ImmutableFeatureMapProto.Builder.class);
+ }
+
+ public static final int INFO_FIELD_NUMBER = 1;
+ private java.util.List info_;
+ /**
+ * repeated .tribuo.core.VariableInfoProto info = 1;
+ */
+ @java.lang.Override
+ public java.util.List getInfoList() {
+ return info_;
+ }
+ /**
+ * repeated .tribuo.core.VariableInfoProto info = 1;
+ */
+ @java.lang.Override
+ public java.util.List extends org.tribuo.protos.core.VariableInfoProtoOrBuilder>
+ getInfoOrBuilderList() {
+ return info_;
+ }
+ /**
+ * repeated .tribuo.core.VariableInfoProto info = 1;
+ */
+ @java.lang.Override
+ public int getInfoCount() {
+ return info_.size();
+ }
+ /**
+ * repeated .tribuo.core.VariableInfoProto info = 1;
+ */
+ @java.lang.Override
+ public org.tribuo.protos.core.VariableInfoProto getInfo(int index) {
+ return info_.get(index);
+ }
+ /**
+ * repeated .tribuo.core.VariableInfoProto info = 1;
+ */
+ @java.lang.Override
+ public org.tribuo.protos.core.VariableInfoProtoOrBuilder getInfoOrBuilder(
+ int index) {
+ return info_.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 {
+ for (int i = 0; i < info_.size(); i++) {
+ output.writeMessage(1, info_.get(i));
+ }
+ unknownFields.writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ for (int i = 0; i < info_.size(); i++) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeMessageSize(1, info_.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.tribuo.protos.core.ImmutableFeatureMapProto)) {
+ return super.equals(obj);
+ }
+ org.tribuo.protos.core.ImmutableFeatureMapProto other = (org.tribuo.protos.core.ImmutableFeatureMapProto) obj;
+
+ if (!getInfoList()
+ .equals(other.getInfoList())) 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();
+ if (getInfoCount() > 0) {
+ hash = (37 * hash) + INFO_FIELD_NUMBER;
+ hash = (53 * hash) + getInfoList().hashCode();
+ }
+ hash = (29 * hash) + unknownFields.hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static org.tribuo.protos.core.ImmutableFeatureMapProto parseFrom(
+ java.nio.ByteBuffer data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static org.tribuo.protos.core.ImmutableFeatureMapProto parseFrom(
+ java.nio.ByteBuffer data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static org.tribuo.protos.core.ImmutableFeatureMapProto parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static org.tribuo.protos.core.ImmutableFeatureMapProto 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.protos.core.ImmutableFeatureMapProto parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static org.tribuo.protos.core.ImmutableFeatureMapProto parseFrom(
+ byte[] data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static org.tribuo.protos.core.ImmutableFeatureMapProto parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input);
+ }
+ public static org.tribuo.protos.core.ImmutableFeatureMapProto 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.protos.core.ImmutableFeatureMapProto parseDelimitedFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseDelimitedWithIOException(PARSER, input);
+ }
+ public static org.tribuo.protos.core.ImmutableFeatureMapProto 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.protos.core.ImmutableFeatureMapProto parseFrom(
+ com.google.protobuf.CodedInputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input);
+ }
+ public static org.tribuo.protos.core.ImmutableFeatureMapProto 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.protos.core.ImmutableFeatureMapProto 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;
+ }
+ /**
+ *
+ *ImmutableFeatureMap proto
+ *
+ *
+ * Protobuf type {@code tribuo.core.ImmutableFeatureMapProto}
+ */
+ public static final class Builder extends
+ com.google.protobuf.GeneratedMessageV3.Builder implements
+ // @@protoc_insertion_point(builder_implements:tribuo.core.ImmutableFeatureMapProto)
+ org.tribuo.protos.core.ImmutableFeatureMapProtoOrBuilder {
+ public static final com.google.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return org.tribuo.protos.core.TribuoCoreImpl.internal_static_tribuo_core_ImmutableFeatureMapProto_descriptor;
+ }
+
+ @java.lang.Override
+ protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return org.tribuo.protos.core.TribuoCoreImpl.internal_static_tribuo_core_ImmutableFeatureMapProto_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ org.tribuo.protos.core.ImmutableFeatureMapProto.class, org.tribuo.protos.core.ImmutableFeatureMapProto.Builder.class);
+ }
+
+ // Construct using org.tribuo.protos.core.ImmutableFeatureMapProto.newBuilder()
+ private Builder() {
+ maybeForceBuilderInitialization();
+ }
+
+ private Builder(
+ com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+ super(parent);
+ maybeForceBuilderInitialization();
+ }
+ private void maybeForceBuilderInitialization() {
+ if (com.google.protobuf.GeneratedMessageV3
+ .alwaysUseFieldBuilders) {
+ getInfoFieldBuilder();
+ }
+ }
+ @java.lang.Override
+ public Builder clear() {
+ super.clear();
+ if (infoBuilder_ == null) {
+ info_ = java.util.Collections.emptyList();
+ bitField0_ = (bitField0_ & ~0x00000001);
+ } else {
+ infoBuilder_.clear();
+ }
+ return this;
+ }
+
+ @java.lang.Override
+ public com.google.protobuf.Descriptors.Descriptor
+ getDescriptorForType() {
+ return org.tribuo.protos.core.TribuoCoreImpl.internal_static_tribuo_core_ImmutableFeatureMapProto_descriptor;
+ }
+
+ @java.lang.Override
+ public org.tribuo.protos.core.ImmutableFeatureMapProto getDefaultInstanceForType() {
+ return org.tribuo.protos.core.ImmutableFeatureMapProto.getDefaultInstance();
+ }
+
+ @java.lang.Override
+ public org.tribuo.protos.core.ImmutableFeatureMapProto build() {
+ org.tribuo.protos.core.ImmutableFeatureMapProto result = buildPartial();
+ if (!result.isInitialized()) {
+ throw newUninitializedMessageException(result);
+ }
+ return result;
+ }
+
+ @java.lang.Override
+ public org.tribuo.protos.core.ImmutableFeatureMapProto buildPartial() {
+ org.tribuo.protos.core.ImmutableFeatureMapProto result = new org.tribuo.protos.core.ImmutableFeatureMapProto(this);
+ int from_bitField0_ = bitField0_;
+ if (infoBuilder_ == null) {
+ if (((bitField0_ & 0x00000001) != 0)) {
+ info_ = java.util.Collections.unmodifiableList(info_);
+ bitField0_ = (bitField0_ & ~0x00000001);
+ }
+ result.info_ = info_;
+ } else {
+ result.info_ = infoBuilder_.build();
+ }
+ 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.protos.core.ImmutableFeatureMapProto) {
+ return mergeFrom((org.tribuo.protos.core.ImmutableFeatureMapProto)other);
+ } else {
+ super.mergeFrom(other);
+ return this;
+ }
+ }
+
+ public Builder mergeFrom(org.tribuo.protos.core.ImmutableFeatureMapProto other) {
+ if (other == org.tribuo.protos.core.ImmutableFeatureMapProto.getDefaultInstance()) return this;
+ if (infoBuilder_ == null) {
+ if (!other.info_.isEmpty()) {
+ if (info_.isEmpty()) {
+ info_ = other.info_;
+ bitField0_ = (bitField0_ & ~0x00000001);
+ } else {
+ ensureInfoIsMutable();
+ info_.addAll(other.info_);
+ }
+ onChanged();
+ }
+ } else {
+ if (!other.info_.isEmpty()) {
+ if (infoBuilder_.isEmpty()) {
+ infoBuilder_.dispose();
+ infoBuilder_ = null;
+ info_ = other.info_;
+ bitField0_ = (bitField0_ & ~0x00000001);
+ infoBuilder_ =
+ com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
+ getInfoFieldBuilder() : null;
+ } else {
+ infoBuilder_.addAllMessages(other.info_);
+ }
+ }
+ }
+ 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.protos.core.ImmutableFeatureMapProto parsedMessage = null;
+ try {
+ parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ parsedMessage = (org.tribuo.protos.core.ImmutableFeatureMapProto) e.getUnfinishedMessage();
+ throw e.unwrapIOException();
+ } finally {
+ if (parsedMessage != null) {
+ mergeFrom(parsedMessage);
+ }
+ }
+ return this;
+ }
+ private int bitField0_;
+
+ private java.util.List info_ =
+ java.util.Collections.emptyList();
+ private void ensureInfoIsMutable() {
+ if (!((bitField0_ & 0x00000001) != 0)) {
+ info_ = new java.util.ArrayList(info_);
+ bitField0_ |= 0x00000001;
+ }
+ }
+
+ private com.google.protobuf.RepeatedFieldBuilderV3<
+ org.tribuo.protos.core.VariableInfoProto, org.tribuo.protos.core.VariableInfoProto.Builder, org.tribuo.protos.core.VariableInfoProtoOrBuilder> infoBuilder_;
+
+ /**
+ * repeated .tribuo.core.VariableInfoProto info = 1;
+ */
+ public java.util.List getInfoList() {
+ if (infoBuilder_ == null) {
+ return java.util.Collections.unmodifiableList(info_);
+ } else {
+ return infoBuilder_.getMessageList();
+ }
+ }
+ /**
+ * repeated .tribuo.core.VariableInfoProto info = 1;
+ */
+ public int getInfoCount() {
+ if (infoBuilder_ == null) {
+ return info_.size();
+ } else {
+ return infoBuilder_.getCount();
+ }
+ }
+ /**
+ * repeated .tribuo.core.VariableInfoProto info = 1;
+ */
+ public org.tribuo.protos.core.VariableInfoProto getInfo(int index) {
+ if (infoBuilder_ == null) {
+ return info_.get(index);
+ } else {
+ return infoBuilder_.getMessage(index);
+ }
+ }
+ /**
+ * repeated .tribuo.core.VariableInfoProto info = 1;
+ */
+ public Builder setInfo(
+ int index, org.tribuo.protos.core.VariableInfoProto value) {
+ if (infoBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureInfoIsMutable();
+ info_.set(index, value);
+ onChanged();
+ } else {
+ infoBuilder_.setMessage(index, value);
+ }
+ return this;
+ }
+ /**
+ * repeated .tribuo.core.VariableInfoProto info = 1;
+ */
+ public Builder setInfo(
+ int index, org.tribuo.protos.core.VariableInfoProto.Builder builderForValue) {
+ if (infoBuilder_ == null) {
+ ensureInfoIsMutable();
+ info_.set(index, builderForValue.build());
+ onChanged();
+ } else {
+ infoBuilder_.setMessage(index, builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ * repeated .tribuo.core.VariableInfoProto info = 1;
+ */
+ public Builder addInfo(org.tribuo.protos.core.VariableInfoProto value) {
+ if (infoBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureInfoIsMutable();
+ info_.add(value);
+ onChanged();
+ } else {
+ infoBuilder_.addMessage(value);
+ }
+ return this;
+ }
+ /**
+ * repeated .tribuo.core.VariableInfoProto info = 1;
+ */
+ public Builder addInfo(
+ int index, org.tribuo.protos.core.VariableInfoProto value) {
+ if (infoBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureInfoIsMutable();
+ info_.add(index, value);
+ onChanged();
+ } else {
+ infoBuilder_.addMessage(index, value);
+ }
+ return this;
+ }
+ /**
+ * repeated .tribuo.core.VariableInfoProto info = 1;
+ */
+ public Builder addInfo(
+ org.tribuo.protos.core.VariableInfoProto.Builder builderForValue) {
+ if (infoBuilder_ == null) {
+ ensureInfoIsMutable();
+ info_.add(builderForValue.build());
+ onChanged();
+ } else {
+ infoBuilder_.addMessage(builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ * repeated .tribuo.core.VariableInfoProto info = 1;
+ */
+ public Builder addInfo(
+ int index, org.tribuo.protos.core.VariableInfoProto.Builder builderForValue) {
+ if (infoBuilder_ == null) {
+ ensureInfoIsMutable();
+ info_.add(index, builderForValue.build());
+ onChanged();
+ } else {
+ infoBuilder_.addMessage(index, builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ * repeated .tribuo.core.VariableInfoProto info = 1;
+ */
+ public Builder addAllInfo(
+ java.lang.Iterable extends org.tribuo.protos.core.VariableInfoProto> values) {
+ if (infoBuilder_ == null) {
+ ensureInfoIsMutable();
+ com.google.protobuf.AbstractMessageLite.Builder.addAll(
+ values, info_);
+ onChanged();
+ } else {
+ infoBuilder_.addAllMessages(values);
+ }
+ return this;
+ }
+ /**
+ * repeated .tribuo.core.VariableInfoProto info = 1;
+ */
+ public Builder clearInfo() {
+ if (infoBuilder_ == null) {
+ info_ = java.util.Collections.emptyList();
+ bitField0_ = (bitField0_ & ~0x00000001);
+ onChanged();
+ } else {
+ infoBuilder_.clear();
+ }
+ return this;
+ }
+ /**
+ * repeated .tribuo.core.VariableInfoProto info = 1;
+ */
+ public Builder removeInfo(int index) {
+ if (infoBuilder_ == null) {
+ ensureInfoIsMutable();
+ info_.remove(index);
+ onChanged();
+ } else {
+ infoBuilder_.remove(index);
+ }
+ return this;
+ }
+ /**
+ * repeated .tribuo.core.VariableInfoProto info = 1;
+ */
+ public org.tribuo.protos.core.VariableInfoProto.Builder getInfoBuilder(
+ int index) {
+ return getInfoFieldBuilder().getBuilder(index);
+ }
+ /**
+ * repeated .tribuo.core.VariableInfoProto info = 1;
+ */
+ public org.tribuo.protos.core.VariableInfoProtoOrBuilder getInfoOrBuilder(
+ int index) {
+ if (infoBuilder_ == null) {
+ return info_.get(index); } else {
+ return infoBuilder_.getMessageOrBuilder(index);
+ }
+ }
+ /**
+ * repeated .tribuo.core.VariableInfoProto info = 1;
+ */
+ public java.util.List extends org.tribuo.protos.core.VariableInfoProtoOrBuilder>
+ getInfoOrBuilderList() {
+ if (infoBuilder_ != null) {
+ return infoBuilder_.getMessageOrBuilderList();
+ } else {
+ return java.util.Collections.unmodifiableList(info_);
+ }
+ }
+ /**
+ * repeated .tribuo.core.VariableInfoProto info = 1;
+ */
+ public org.tribuo.protos.core.VariableInfoProto.Builder addInfoBuilder() {
+ return getInfoFieldBuilder().addBuilder(
+ org.tribuo.protos.core.VariableInfoProto.getDefaultInstance());
+ }
+ /**
+ * repeated .tribuo.core.VariableInfoProto info = 1;
+ */
+ public org.tribuo.protos.core.VariableInfoProto.Builder addInfoBuilder(
+ int index) {
+ return getInfoFieldBuilder().addBuilder(
+ index, org.tribuo.protos.core.VariableInfoProto.getDefaultInstance());
+ }
+ /**
+ * repeated .tribuo.core.VariableInfoProto info = 1;
+ */
+ public java.util.List
+ getInfoBuilderList() {
+ return getInfoFieldBuilder().getBuilderList();
+ }
+ private com.google.protobuf.RepeatedFieldBuilderV3<
+ org.tribuo.protos.core.VariableInfoProto, org.tribuo.protos.core.VariableInfoProto.Builder, org.tribuo.protos.core.VariableInfoProtoOrBuilder>
+ getInfoFieldBuilder() {
+ if (infoBuilder_ == null) {
+ infoBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
+ org.tribuo.protos.core.VariableInfoProto, org.tribuo.protos.core.VariableInfoProto.Builder, org.tribuo.protos.core.VariableInfoProtoOrBuilder>(
+ info_,
+ ((bitField0_ & 0x00000001) != 0),
+ getParentForChildren(),
+ isClean());
+ info_ = null;
+ }
+ return infoBuilder_;
+ }
+ @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.core.ImmutableFeatureMapProto)
+ }
+
+ // @@protoc_insertion_point(class_scope:tribuo.core.ImmutableFeatureMapProto)
+ private static final org.tribuo.protos.core.ImmutableFeatureMapProto DEFAULT_INSTANCE;
+ static {
+ DEFAULT_INSTANCE = new org.tribuo.protos.core.ImmutableFeatureMapProto();
+ }
+
+ public static org.tribuo.protos.core.ImmutableFeatureMapProto getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser
+ PARSER = new com.google.protobuf.AbstractParser() {
+ @java.lang.Override
+ public ImmutableFeatureMapProto parsePartialFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return new ImmutableFeatureMapProto(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.tribuo.protos.core.ImmutableFeatureMapProto getDefaultInstanceForType() {
+ return DEFAULT_INSTANCE;
+ }
+
+}
+
diff --git a/Core/src/main/java/org/tribuo/protos/core/ImmutableFeatureMapProtoOrBuilder.java b/Core/src/main/java/org/tribuo/protos/core/ImmutableFeatureMapProtoOrBuilder.java
new file mode 100644
index 000000000..b6292b290
--- /dev/null
+++ b/Core/src/main/java/org/tribuo/protos/core/ImmutableFeatureMapProtoOrBuilder.java
@@ -0,0 +1,33 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: tribuo-core-impl.proto
+
+package org.tribuo.protos.core;
+
+public interface ImmutableFeatureMapProtoOrBuilder extends
+ // @@protoc_insertion_point(interface_extends:tribuo.core.ImmutableFeatureMapProto)
+ com.google.protobuf.MessageOrBuilder {
+
+ /**
+ * repeated .tribuo.core.VariableInfoProto info = 1;
+ */
+ java.util.List
+ getInfoList();
+ /**
+ * repeated .tribuo.core.VariableInfoProto info = 1;
+ */
+ org.tribuo.protos.core.VariableInfoProto getInfo(int index);
+ /**
+ * repeated .tribuo.core.VariableInfoProto info = 1;
+ */
+ int getInfoCount();
+ /**
+ * repeated .tribuo.core.VariableInfoProto info = 1;
+ */
+ java.util.List extends org.tribuo.protos.core.VariableInfoProtoOrBuilder>
+ getInfoOrBuilderList();
+ /**
+ * repeated .tribuo.core.VariableInfoProto info = 1;
+ */
+ org.tribuo.protos.core.VariableInfoProtoOrBuilder getInfoOrBuilder(
+ int index);
+}
diff --git a/Core/src/main/java/org/tribuo/protos/core/LinearScalingTransformerProto.java b/Core/src/main/java/org/tribuo/protos/core/LinearScalingTransformerProto.java
new file mode 100644
index 000000000..700408031
--- /dev/null
+++ b/Core/src/main/java/org/tribuo/protos/core/LinearScalingTransformerProto.java
@@ -0,0 +1,693 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: tribuo-core-impl.proto
+
+package org.tribuo.protos.core;
+
+/**
+ *
+ *LinearScalingTransformer proto
+ *
+ *
+ * Protobuf type {@code tribuo.core.LinearScalingTransformerProto}
+ */
+public final class LinearScalingTransformerProto extends
+ com.google.protobuf.GeneratedMessageV3 implements
+ // @@protoc_insertion_point(message_implements:tribuo.core.LinearScalingTransformerProto)
+ LinearScalingTransformerProtoOrBuilder {
+private static final long serialVersionUID = 0L;
+ // Use LinearScalingTransformerProto.newBuilder() to construct.
+ private LinearScalingTransformerProto(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
+ super(builder);
+ }
+ private LinearScalingTransformerProto() {
+ }
+
+ @java.lang.Override
+ @SuppressWarnings({"unused"})
+ protected java.lang.Object newInstance(
+ UnusedPrivateParameter unused) {
+ return new LinearScalingTransformerProto();
+ }
+
+ @java.lang.Override
+ public final com.google.protobuf.UnknownFieldSet
+ getUnknownFields() {
+ return this.unknownFields;
+ }
+ private LinearScalingTransformerProto(
+ 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 9: {
+
+ observedMin_ = input.readDouble();
+ break;
+ }
+ case 17: {
+
+ observedMax_ = input.readDouble();
+ break;
+ }
+ case 25: {
+
+ targetMin_ = input.readDouble();
+ break;
+ }
+ case 33: {
+
+ targetMax_ = input.readDouble();
+ 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 {
+ this.unknownFields = unknownFields.build();
+ makeExtensionsImmutable();
+ }
+ }
+ public static final com.google.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return org.tribuo.protos.core.TribuoCoreImpl.internal_static_tribuo_core_LinearScalingTransformerProto_descriptor;
+ }
+
+ @java.lang.Override
+ protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return org.tribuo.protos.core.TribuoCoreImpl.internal_static_tribuo_core_LinearScalingTransformerProto_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ org.tribuo.protos.core.LinearScalingTransformerProto.class, org.tribuo.protos.core.LinearScalingTransformerProto.Builder.class);
+ }
+
+ public static final int OBSERVEDMIN_FIELD_NUMBER = 1;
+ private double observedMin_;
+ /**
+ * double observedMin = 1;
+ * @return The observedMin.
+ */
+ @java.lang.Override
+ public double getObservedMin() {
+ return observedMin_;
+ }
+
+ public static final int OBSERVEDMAX_FIELD_NUMBER = 2;
+ private double observedMax_;
+ /**
+ * double observedMax = 2;
+ * @return The observedMax.
+ */
+ @java.lang.Override
+ public double getObservedMax() {
+ return observedMax_;
+ }
+
+ public static final int TARGETMIN_FIELD_NUMBER = 3;
+ private double targetMin_;
+ /**
+ * double targetMin = 3;
+ * @return The targetMin.
+ */
+ @java.lang.Override
+ public double getTargetMin() {
+ return targetMin_;
+ }
+
+ public static final int TARGETMAX_FIELD_NUMBER = 4;
+ private double targetMax_;
+ /**
+ * double targetMax = 4;
+ * @return The targetMax.
+ */
+ @java.lang.Override
+ public double getTargetMax() {
+ return targetMax_;
+ }
+
+ 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 (java.lang.Double.doubleToRawLongBits(observedMin_) != 0) {
+ output.writeDouble(1, observedMin_);
+ }
+ if (java.lang.Double.doubleToRawLongBits(observedMax_) != 0) {
+ output.writeDouble(2, observedMax_);
+ }
+ if (java.lang.Double.doubleToRawLongBits(targetMin_) != 0) {
+ output.writeDouble(3, targetMin_);
+ }
+ if (java.lang.Double.doubleToRawLongBits(targetMax_) != 0) {
+ output.writeDouble(4, targetMax_);
+ }
+ unknownFields.writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (java.lang.Double.doubleToRawLongBits(observedMin_) != 0) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeDoubleSize(1, observedMin_);
+ }
+ if (java.lang.Double.doubleToRawLongBits(observedMax_) != 0) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeDoubleSize(2, observedMax_);
+ }
+ if (java.lang.Double.doubleToRawLongBits(targetMin_) != 0) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeDoubleSize(3, targetMin_);
+ }
+ if (java.lang.Double.doubleToRawLongBits(targetMax_) != 0) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeDoubleSize(4, targetMax_);
+ }
+ 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.protos.core.LinearScalingTransformerProto)) {
+ return super.equals(obj);
+ }
+ org.tribuo.protos.core.LinearScalingTransformerProto other = (org.tribuo.protos.core.LinearScalingTransformerProto) obj;
+
+ if (java.lang.Double.doubleToLongBits(getObservedMin())
+ != java.lang.Double.doubleToLongBits(
+ other.getObservedMin())) return false;
+ if (java.lang.Double.doubleToLongBits(getObservedMax())
+ != java.lang.Double.doubleToLongBits(
+ other.getObservedMax())) return false;
+ if (java.lang.Double.doubleToLongBits(getTargetMin())
+ != java.lang.Double.doubleToLongBits(
+ other.getTargetMin())) return false;
+ if (java.lang.Double.doubleToLongBits(getTargetMax())
+ != java.lang.Double.doubleToLongBits(
+ other.getTargetMax())) 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) + OBSERVEDMIN_FIELD_NUMBER;
+ hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
+ java.lang.Double.doubleToLongBits(getObservedMin()));
+ hash = (37 * hash) + OBSERVEDMAX_FIELD_NUMBER;
+ hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
+ java.lang.Double.doubleToLongBits(getObservedMax()));
+ hash = (37 * hash) + TARGETMIN_FIELD_NUMBER;
+ hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
+ java.lang.Double.doubleToLongBits(getTargetMin()));
+ hash = (37 * hash) + TARGETMAX_FIELD_NUMBER;
+ hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
+ java.lang.Double.doubleToLongBits(getTargetMax()));
+ hash = (29 * hash) + unknownFields.hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static org.tribuo.protos.core.LinearScalingTransformerProto parseFrom(
+ java.nio.ByteBuffer data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static org.tribuo.protos.core.LinearScalingTransformerProto parseFrom(
+ java.nio.ByteBuffer data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static org.tribuo.protos.core.LinearScalingTransformerProto parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static org.tribuo.protos.core.LinearScalingTransformerProto 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.protos.core.LinearScalingTransformerProto parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static org.tribuo.protos.core.LinearScalingTransformerProto parseFrom(
+ byte[] data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static org.tribuo.protos.core.LinearScalingTransformerProto parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input);
+ }
+ public static org.tribuo.protos.core.LinearScalingTransformerProto 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.protos.core.LinearScalingTransformerProto parseDelimitedFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseDelimitedWithIOException(PARSER, input);
+ }
+ public static org.tribuo.protos.core.LinearScalingTransformerProto 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.protos.core.LinearScalingTransformerProto parseFrom(
+ com.google.protobuf.CodedInputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input);
+ }
+ public static org.tribuo.protos.core.LinearScalingTransformerProto 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.protos.core.LinearScalingTransformerProto 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;
+ }
+ /**
+ *
+ *LinearScalingTransformer proto
+ *
+ *
+ * Protobuf type {@code tribuo.core.LinearScalingTransformerProto}
+ */
+ public static final class Builder extends
+ com.google.protobuf.GeneratedMessageV3.Builder implements
+ // @@protoc_insertion_point(builder_implements:tribuo.core.LinearScalingTransformerProto)
+ org.tribuo.protos.core.LinearScalingTransformerProtoOrBuilder {
+ public static final com.google.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return org.tribuo.protos.core.TribuoCoreImpl.internal_static_tribuo_core_LinearScalingTransformerProto_descriptor;
+ }
+
+ @java.lang.Override
+ protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return org.tribuo.protos.core.TribuoCoreImpl.internal_static_tribuo_core_LinearScalingTransformerProto_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ org.tribuo.protos.core.LinearScalingTransformerProto.class, org.tribuo.protos.core.LinearScalingTransformerProto.Builder.class);
+ }
+
+ // Construct using org.tribuo.protos.core.LinearScalingTransformerProto.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();
+ observedMin_ = 0D;
+
+ observedMax_ = 0D;
+
+ targetMin_ = 0D;
+
+ targetMax_ = 0D;
+
+ return this;
+ }
+
+ @java.lang.Override
+ public com.google.protobuf.Descriptors.Descriptor
+ getDescriptorForType() {
+ return org.tribuo.protos.core.TribuoCoreImpl.internal_static_tribuo_core_LinearScalingTransformerProto_descriptor;
+ }
+
+ @java.lang.Override
+ public org.tribuo.protos.core.LinearScalingTransformerProto getDefaultInstanceForType() {
+ return org.tribuo.protos.core.LinearScalingTransformerProto.getDefaultInstance();
+ }
+
+ @java.lang.Override
+ public org.tribuo.protos.core.LinearScalingTransformerProto build() {
+ org.tribuo.protos.core.LinearScalingTransformerProto result = buildPartial();
+ if (!result.isInitialized()) {
+ throw newUninitializedMessageException(result);
+ }
+ return result;
+ }
+
+ @java.lang.Override
+ public org.tribuo.protos.core.LinearScalingTransformerProto buildPartial() {
+ org.tribuo.protos.core.LinearScalingTransformerProto result = new org.tribuo.protos.core.LinearScalingTransformerProto(this);
+ result.observedMin_ = observedMin_;
+ result.observedMax_ = observedMax_;
+ result.targetMin_ = targetMin_;
+ result.targetMax_ = targetMax_;
+ 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.protos.core.LinearScalingTransformerProto) {
+ return mergeFrom((org.tribuo.protos.core.LinearScalingTransformerProto)other);
+ } else {
+ super.mergeFrom(other);
+ return this;
+ }
+ }
+
+ public Builder mergeFrom(org.tribuo.protos.core.LinearScalingTransformerProto other) {
+ if (other == org.tribuo.protos.core.LinearScalingTransformerProto.getDefaultInstance()) return this;
+ if (other.getObservedMin() != 0D) {
+ setObservedMin(other.getObservedMin());
+ }
+ if (other.getObservedMax() != 0D) {
+ setObservedMax(other.getObservedMax());
+ }
+ if (other.getTargetMin() != 0D) {
+ setTargetMin(other.getTargetMin());
+ }
+ if (other.getTargetMax() != 0D) {
+ setTargetMax(other.getTargetMax());
+ }
+ 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.protos.core.LinearScalingTransformerProto parsedMessage = null;
+ try {
+ parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ parsedMessage = (org.tribuo.protos.core.LinearScalingTransformerProto) e.getUnfinishedMessage();
+ throw e.unwrapIOException();
+ } finally {
+ if (parsedMessage != null) {
+ mergeFrom(parsedMessage);
+ }
+ }
+ return this;
+ }
+
+ private double observedMin_ ;
+ /**
+ * double observedMin = 1;
+ * @return The observedMin.
+ */
+ @java.lang.Override
+ public double getObservedMin() {
+ return observedMin_;
+ }
+ /**
+ * double observedMin = 1;
+ * @param value The observedMin to set.
+ * @return This builder for chaining.
+ */
+ public Builder setObservedMin(double value) {
+
+ observedMin_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * double observedMin = 1;
+ * @return This builder for chaining.
+ */
+ public Builder clearObservedMin() {
+
+ observedMin_ = 0D;
+ onChanged();
+ return this;
+ }
+
+ private double observedMax_ ;
+ /**
+ * double observedMax = 2;
+ * @return The observedMax.
+ */
+ @java.lang.Override
+ public double getObservedMax() {
+ return observedMax_;
+ }
+ /**
+ * double observedMax = 2;
+ * @param value The observedMax to set.
+ * @return This builder for chaining.
+ */
+ public Builder setObservedMax(double value) {
+
+ observedMax_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * double observedMax = 2;
+ * @return This builder for chaining.
+ */
+ public Builder clearObservedMax() {
+
+ observedMax_ = 0D;
+ onChanged();
+ return this;
+ }
+
+ private double targetMin_ ;
+ /**
+ * double targetMin = 3;
+ * @return The targetMin.
+ */
+ @java.lang.Override
+ public double getTargetMin() {
+ return targetMin_;
+ }
+ /**
+ * double targetMin = 3;
+ * @param value The targetMin to set.
+ * @return This builder for chaining.
+ */
+ public Builder setTargetMin(double value) {
+
+ targetMin_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * double targetMin = 3;
+ * @return This builder for chaining.
+ */
+ public Builder clearTargetMin() {
+
+ targetMin_ = 0D;
+ onChanged();
+ return this;
+ }
+
+ private double targetMax_ ;
+ /**
+ * double targetMax = 4;
+ * @return The targetMax.
+ */
+ @java.lang.Override
+ public double getTargetMax() {
+ return targetMax_;
+ }
+ /**
+ * double targetMax = 4;
+ * @param value The targetMax to set.
+ * @return This builder for chaining.
+ */
+ public Builder setTargetMax(double value) {
+
+ targetMax_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * double targetMax = 4;
+ * @return This builder for chaining.
+ */
+ public Builder clearTargetMax() {
+
+ targetMax_ = 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.core.LinearScalingTransformerProto)
+ }
+
+ // @@protoc_insertion_point(class_scope:tribuo.core.LinearScalingTransformerProto)
+ private static final org.tribuo.protos.core.LinearScalingTransformerProto DEFAULT_INSTANCE;
+ static {
+ DEFAULT_INSTANCE = new org.tribuo.protos.core.LinearScalingTransformerProto();
+ }
+
+ public static org.tribuo.protos.core.LinearScalingTransformerProto getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser
+ PARSER = new com.google.protobuf.AbstractParser() {
+ @java.lang.Override
+ public LinearScalingTransformerProto parsePartialFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return new LinearScalingTransformerProto(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.tribuo.protos.core.LinearScalingTransformerProto getDefaultInstanceForType() {
+ return DEFAULT_INSTANCE;
+ }
+
+}
+
diff --git a/Core/src/main/java/org/tribuo/protos/core/LinearScalingTransformerProtoOrBuilder.java b/Core/src/main/java/org/tribuo/protos/core/LinearScalingTransformerProtoOrBuilder.java
new file mode 100644
index 000000000..4684927d6
--- /dev/null
+++ b/Core/src/main/java/org/tribuo/protos/core/LinearScalingTransformerProtoOrBuilder.java
@@ -0,0 +1,33 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: tribuo-core-impl.proto
+
+package org.tribuo.protos.core;
+
+public interface LinearScalingTransformerProtoOrBuilder extends
+ // @@protoc_insertion_point(interface_extends:tribuo.core.LinearScalingTransformerProto)
+ com.google.protobuf.MessageOrBuilder {
+
+ /**
+ * double observedMin = 1;
+ * @return The observedMin.
+ */
+ double getObservedMin();
+
+ /**
+ * double observedMax = 2;
+ * @return The observedMax.
+ */
+ double getObservedMax();
+
+ /**
+ * double targetMin = 3;
+ * @return The targetMin.
+ */
+ double getTargetMin();
+
+ /**
+ * double targetMax = 4;
+ * @return The targetMax.
+ */
+ double getTargetMax();
+}
diff --git a/Core/src/main/java/org/tribuo/protos/core/MeanStdDevTransformerProto.java b/Core/src/main/java/org/tribuo/protos/core/MeanStdDevTransformerProto.java
new file mode 100644
index 000000000..5e8fcaded
--- /dev/null
+++ b/Core/src/main/java/org/tribuo/protos/core/MeanStdDevTransformerProto.java
@@ -0,0 +1,693 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: tribuo-core-impl.proto
+
+package org.tribuo.protos.core;
+
+/**
+ *
+ *MeanStdDevTransformer proto
+ *
+ *
+ * Protobuf type {@code tribuo.core.MeanStdDevTransformerProto}
+ */
+public final class MeanStdDevTransformerProto extends
+ com.google.protobuf.GeneratedMessageV3 implements
+ // @@protoc_insertion_point(message_implements:tribuo.core.MeanStdDevTransformerProto)
+ MeanStdDevTransformerProtoOrBuilder {
+private static final long serialVersionUID = 0L;
+ // Use MeanStdDevTransformerProto.newBuilder() to construct.
+ private MeanStdDevTransformerProto(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
+ super(builder);
+ }
+ private MeanStdDevTransformerProto() {
+ }
+
+ @java.lang.Override
+ @SuppressWarnings({"unused"})
+ protected java.lang.Object newInstance(
+ UnusedPrivateParameter unused) {
+ return new MeanStdDevTransformerProto();
+ }
+
+ @java.lang.Override
+ public final com.google.protobuf.UnknownFieldSet
+ getUnknownFields() {
+ return this.unknownFields;
+ }
+ private MeanStdDevTransformerProto(
+ 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 9: {
+
+ observedMean_ = input.readDouble();
+ break;
+ }
+ case 17: {
+
+ observedStdDev_ = input.readDouble();
+ break;
+ }
+ case 25: {
+
+ targetMean_ = input.readDouble();
+ break;
+ }
+ case 33: {
+
+ targetStdDev_ = input.readDouble();
+ 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 {
+ this.unknownFields = unknownFields.build();
+ makeExtensionsImmutable();
+ }
+ }
+ public static final com.google.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return org.tribuo.protos.core.TribuoCoreImpl.internal_static_tribuo_core_MeanStdDevTransformerProto_descriptor;
+ }
+
+ @java.lang.Override
+ protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return org.tribuo.protos.core.TribuoCoreImpl.internal_static_tribuo_core_MeanStdDevTransformerProto_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ org.tribuo.protos.core.MeanStdDevTransformerProto.class, org.tribuo.protos.core.MeanStdDevTransformerProto.Builder.class);
+ }
+
+ public static final int OBSERVEDMEAN_FIELD_NUMBER = 1;
+ private double observedMean_;
+ /**
+ * double observedMean = 1;
+ * @return The observedMean.
+ */
+ @java.lang.Override
+ public double getObservedMean() {
+ return observedMean_;
+ }
+
+ public static final int OBSERVEDSTDDEV_FIELD_NUMBER = 2;
+ private double observedStdDev_;
+ /**
+ * double observedStdDev = 2;
+ * @return The observedStdDev.
+ */
+ @java.lang.Override
+ public double getObservedStdDev() {
+ return observedStdDev_;
+ }
+
+ public static final int TARGETMEAN_FIELD_NUMBER = 3;
+ private double targetMean_;
+ /**
+ * double targetMean = 3;
+ * @return The targetMean.
+ */
+ @java.lang.Override
+ public double getTargetMean() {
+ return targetMean_;
+ }
+
+ public static final int TARGETSTDDEV_FIELD_NUMBER = 4;
+ private double targetStdDev_;
+ /**
+ * double targetStdDev = 4;
+ * @return The targetStdDev.
+ */
+ @java.lang.Override
+ public double getTargetStdDev() {
+ return targetStdDev_;
+ }
+
+ 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 (java.lang.Double.doubleToRawLongBits(observedMean_) != 0) {
+ output.writeDouble(1, observedMean_);
+ }
+ if (java.lang.Double.doubleToRawLongBits(observedStdDev_) != 0) {
+ output.writeDouble(2, observedStdDev_);
+ }
+ if (java.lang.Double.doubleToRawLongBits(targetMean_) != 0) {
+ output.writeDouble(3, targetMean_);
+ }
+ if (java.lang.Double.doubleToRawLongBits(targetStdDev_) != 0) {
+ output.writeDouble(4, targetStdDev_);
+ }
+ unknownFields.writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (java.lang.Double.doubleToRawLongBits(observedMean_) != 0) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeDoubleSize(1, observedMean_);
+ }
+ if (java.lang.Double.doubleToRawLongBits(observedStdDev_) != 0) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeDoubleSize(2, observedStdDev_);
+ }
+ if (java.lang.Double.doubleToRawLongBits(targetMean_) != 0) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeDoubleSize(3, targetMean_);
+ }
+ if (java.lang.Double.doubleToRawLongBits(targetStdDev_) != 0) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeDoubleSize(4, targetStdDev_);
+ }
+ 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.protos.core.MeanStdDevTransformerProto)) {
+ return super.equals(obj);
+ }
+ org.tribuo.protos.core.MeanStdDevTransformerProto other = (org.tribuo.protos.core.MeanStdDevTransformerProto) obj;
+
+ if (java.lang.Double.doubleToLongBits(getObservedMean())
+ != java.lang.Double.doubleToLongBits(
+ other.getObservedMean())) return false;
+ if (java.lang.Double.doubleToLongBits(getObservedStdDev())
+ != java.lang.Double.doubleToLongBits(
+ other.getObservedStdDev())) return false;
+ if (java.lang.Double.doubleToLongBits(getTargetMean())
+ != java.lang.Double.doubleToLongBits(
+ other.getTargetMean())) return false;
+ if (java.lang.Double.doubleToLongBits(getTargetStdDev())
+ != java.lang.Double.doubleToLongBits(
+ other.getTargetStdDev())) 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) + OBSERVEDMEAN_FIELD_NUMBER;
+ hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
+ java.lang.Double.doubleToLongBits(getObservedMean()));
+ hash = (37 * hash) + OBSERVEDSTDDEV_FIELD_NUMBER;
+ hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
+ java.lang.Double.doubleToLongBits(getObservedStdDev()));
+ hash = (37 * hash) + TARGETMEAN_FIELD_NUMBER;
+ hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
+ java.lang.Double.doubleToLongBits(getTargetMean()));
+ hash = (37 * hash) + TARGETSTDDEV_FIELD_NUMBER;
+ hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
+ java.lang.Double.doubleToLongBits(getTargetStdDev()));
+ hash = (29 * hash) + unknownFields.hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static org.tribuo.protos.core.MeanStdDevTransformerProto parseFrom(
+ java.nio.ByteBuffer data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static org.tribuo.protos.core.MeanStdDevTransformerProto parseFrom(
+ java.nio.ByteBuffer data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static org.tribuo.protos.core.MeanStdDevTransformerProto parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static org.tribuo.protos.core.MeanStdDevTransformerProto 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.protos.core.MeanStdDevTransformerProto parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static org.tribuo.protos.core.MeanStdDevTransformerProto parseFrom(
+ byte[] data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static org.tribuo.protos.core.MeanStdDevTransformerProto parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input);
+ }
+ public static org.tribuo.protos.core.MeanStdDevTransformerProto 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.protos.core.MeanStdDevTransformerProto parseDelimitedFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseDelimitedWithIOException(PARSER, input);
+ }
+ public static org.tribuo.protos.core.MeanStdDevTransformerProto 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.protos.core.MeanStdDevTransformerProto parseFrom(
+ com.google.protobuf.CodedInputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input);
+ }
+ public static org.tribuo.protos.core.MeanStdDevTransformerProto 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.protos.core.MeanStdDevTransformerProto 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;
+ }
+ /**
+ *
+ *MeanStdDevTransformer proto
+ *
+ *
+ * Protobuf type {@code tribuo.core.MeanStdDevTransformerProto}
+ */
+ public static final class Builder extends
+ com.google.protobuf.GeneratedMessageV3.Builder implements
+ // @@protoc_insertion_point(builder_implements:tribuo.core.MeanStdDevTransformerProto)
+ org.tribuo.protos.core.MeanStdDevTransformerProtoOrBuilder {
+ public static final com.google.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return org.tribuo.protos.core.TribuoCoreImpl.internal_static_tribuo_core_MeanStdDevTransformerProto_descriptor;
+ }
+
+ @java.lang.Override
+ protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return org.tribuo.protos.core.TribuoCoreImpl.internal_static_tribuo_core_MeanStdDevTransformerProto_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ org.tribuo.protos.core.MeanStdDevTransformerProto.class, org.tribuo.protos.core.MeanStdDevTransformerProto.Builder.class);
+ }
+
+ // Construct using org.tribuo.protos.core.MeanStdDevTransformerProto.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();
+ observedMean_ = 0D;
+
+ observedStdDev_ = 0D;
+
+ targetMean_ = 0D;
+
+ targetStdDev_ = 0D;
+
+ return this;
+ }
+
+ @java.lang.Override
+ public com.google.protobuf.Descriptors.Descriptor
+ getDescriptorForType() {
+ return org.tribuo.protos.core.TribuoCoreImpl.internal_static_tribuo_core_MeanStdDevTransformerProto_descriptor;
+ }
+
+ @java.lang.Override
+ public org.tribuo.protos.core.MeanStdDevTransformerProto getDefaultInstanceForType() {
+ return org.tribuo.protos.core.MeanStdDevTransformerProto.getDefaultInstance();
+ }
+
+ @java.lang.Override
+ public org.tribuo.protos.core.MeanStdDevTransformerProto build() {
+ org.tribuo.protos.core.MeanStdDevTransformerProto result = buildPartial();
+ if (!result.isInitialized()) {
+ throw newUninitializedMessageException(result);
+ }
+ return result;
+ }
+
+ @java.lang.Override
+ public org.tribuo.protos.core.MeanStdDevTransformerProto buildPartial() {
+ org.tribuo.protos.core.MeanStdDevTransformerProto result = new org.tribuo.protos.core.MeanStdDevTransformerProto(this);
+ result.observedMean_ = observedMean_;
+ result.observedStdDev_ = observedStdDev_;
+ result.targetMean_ = targetMean_;
+ result.targetStdDev_ = targetStdDev_;
+ 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.protos.core.MeanStdDevTransformerProto) {
+ return mergeFrom((org.tribuo.protos.core.MeanStdDevTransformerProto)other);
+ } else {
+ super.mergeFrom(other);
+ return this;
+ }
+ }
+
+ public Builder mergeFrom(org.tribuo.protos.core.MeanStdDevTransformerProto other) {
+ if (other == org.tribuo.protos.core.MeanStdDevTransformerProto.getDefaultInstance()) return this;
+ if (other.getObservedMean() != 0D) {
+ setObservedMean(other.getObservedMean());
+ }
+ if (other.getObservedStdDev() != 0D) {
+ setObservedStdDev(other.getObservedStdDev());
+ }
+ if (other.getTargetMean() != 0D) {
+ setTargetMean(other.getTargetMean());
+ }
+ if (other.getTargetStdDev() != 0D) {
+ setTargetStdDev(other.getTargetStdDev());
+ }
+ 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.protos.core.MeanStdDevTransformerProto parsedMessage = null;
+ try {
+ parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ parsedMessage = (org.tribuo.protos.core.MeanStdDevTransformerProto) e.getUnfinishedMessage();
+ throw e.unwrapIOException();
+ } finally {
+ if (parsedMessage != null) {
+ mergeFrom(parsedMessage);
+ }
+ }
+ return this;
+ }
+
+ private double observedMean_ ;
+ /**
+ * double observedMean = 1;
+ * @return The observedMean.
+ */
+ @java.lang.Override
+ public double getObservedMean() {
+ return observedMean_;
+ }
+ /**
+ * double observedMean = 1;
+ * @param value The observedMean to set.
+ * @return This builder for chaining.
+ */
+ public Builder setObservedMean(double value) {
+
+ observedMean_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * double observedMean = 1;
+ * @return This builder for chaining.
+ */
+ public Builder clearObservedMean() {
+
+ observedMean_ = 0D;
+ onChanged();
+ return this;
+ }
+
+ private double observedStdDev_ ;
+ /**
+ * double observedStdDev = 2;
+ * @return The observedStdDev.
+ */
+ @java.lang.Override
+ public double getObservedStdDev() {
+ return observedStdDev_;
+ }
+ /**
+ * double observedStdDev = 2;
+ * @param value The observedStdDev to set.
+ * @return This builder for chaining.
+ */
+ public Builder setObservedStdDev(double value) {
+
+ observedStdDev_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * double observedStdDev = 2;
+ * @return This builder for chaining.
+ */
+ public Builder clearObservedStdDev() {
+
+ observedStdDev_ = 0D;
+ onChanged();
+ return this;
+ }
+
+ private double targetMean_ ;
+ /**
+ * double targetMean = 3;
+ * @return The targetMean.
+ */
+ @java.lang.Override
+ public double getTargetMean() {
+ return targetMean_;
+ }
+ /**
+ * double targetMean = 3;
+ * @param value The targetMean to set.
+ * @return This builder for chaining.
+ */
+ public Builder setTargetMean(double value) {
+
+ targetMean_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * double targetMean = 3;
+ * @return This builder for chaining.
+ */
+ public Builder clearTargetMean() {
+
+ targetMean_ = 0D;
+ onChanged();
+ return this;
+ }
+
+ private double targetStdDev_ ;
+ /**
+ * double targetStdDev = 4;
+ * @return The targetStdDev.
+ */
+ @java.lang.Override
+ public double getTargetStdDev() {
+ return targetStdDev_;
+ }
+ /**
+ * double targetStdDev = 4;
+ * @param value The targetStdDev to set.
+ * @return This builder for chaining.
+ */
+ public Builder setTargetStdDev(double value) {
+
+ targetStdDev_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * double targetStdDev = 4;
+ * @return This builder for chaining.
+ */
+ public Builder clearTargetStdDev() {
+
+ targetStdDev_ = 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.core.MeanStdDevTransformerProto)
+ }
+
+ // @@protoc_insertion_point(class_scope:tribuo.core.MeanStdDevTransformerProto)
+ private static final org.tribuo.protos.core.MeanStdDevTransformerProto DEFAULT_INSTANCE;
+ static {
+ DEFAULT_INSTANCE = new org.tribuo.protos.core.MeanStdDevTransformerProto();
+ }
+
+ public static org.tribuo.protos.core.MeanStdDevTransformerProto getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser
+ PARSER = new com.google.protobuf.AbstractParser() {
+ @java.lang.Override
+ public MeanStdDevTransformerProto parsePartialFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return new MeanStdDevTransformerProto(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.tribuo.protos.core.MeanStdDevTransformerProto getDefaultInstanceForType() {
+ return DEFAULT_INSTANCE;
+ }
+
+}
+
diff --git a/Core/src/main/java/org/tribuo/protos/core/MeanStdDevTransformerProtoOrBuilder.java b/Core/src/main/java/org/tribuo/protos/core/MeanStdDevTransformerProtoOrBuilder.java
new file mode 100644
index 000000000..b60cea507
--- /dev/null
+++ b/Core/src/main/java/org/tribuo/protos/core/MeanStdDevTransformerProtoOrBuilder.java
@@ -0,0 +1,33 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: tribuo-core-impl.proto
+
+package org.tribuo.protos.core;
+
+public interface MeanStdDevTransformerProtoOrBuilder extends
+ // @@protoc_insertion_point(interface_extends:tribuo.core.MeanStdDevTransformerProto)
+ com.google.protobuf.MessageOrBuilder {
+
+ /**
+ * double observedMean = 1;
+ * @return The observedMean.
+ */
+ double getObservedMean();
+
+ /**
+ * double observedStdDev = 2;
+ * @return The observedStdDev.
+ */
+ double getObservedStdDev();
+
+ /**
+ * double targetMean = 3;
+ * @return The targetMean.
+ */
+ double getTargetMean();
+
+ /**
+ * double targetStdDev = 4;
+ * @return The targetStdDev.
+ */
+ double getTargetStdDev();
+}
diff --git a/Core/src/main/java/org/tribuo/protos/core/MeanVarianceProto.java b/Core/src/main/java/org/tribuo/protos/core/MeanVarianceProto.java
new file mode 100644
index 000000000..6e2e5ae1e
--- /dev/null
+++ b/Core/src/main/java/org/tribuo/protos/core/MeanVarianceProto.java
@@ -0,0 +1,822 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: tribuo-core.proto
+
+package org.tribuo.protos.core;
+
+/**
+ *
+ *Mean variance accumulator proto
+ *
+ *
+ * Protobuf type {@code tribuo.core.MeanVarianceProto}
+ */
+public final class MeanVarianceProto extends
+ com.google.protobuf.GeneratedMessageV3 implements
+ // @@protoc_insertion_point(message_implements:tribuo.core.MeanVarianceProto)
+ MeanVarianceProtoOrBuilder {
+private static final long serialVersionUID = 0L;
+ // Use MeanVarianceProto.newBuilder() to construct.
+ private MeanVarianceProto(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
+ super(builder);
+ }
+ private MeanVarianceProto() {
+ }
+
+ @java.lang.Override
+ @SuppressWarnings({"unused"})
+ protected java.lang.Object newInstance(
+ UnusedPrivateParameter unused) {
+ return new MeanVarianceProto();
+ }
+
+ @java.lang.Override
+ public final com.google.protobuf.UnknownFieldSet
+ getUnknownFields() {
+ return this.unknownFields;
+ }
+ private MeanVarianceProto(
+ 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: {
+
+ version_ = input.readInt32();
+ break;
+ }
+ case 17: {
+
+ max_ = input.readDouble();
+ break;
+ }
+ case 25: {
+
+ min_ = input.readDouble();
+ break;
+ }
+ case 33: {
+
+ mean_ = input.readDouble();
+ break;
+ }
+ case 41: {
+
+ sumSquares_ = input.readDouble();
+ break;
+ }
+ case 48: {
+
+ count_ = input.readInt64();
+ 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 {
+ this.unknownFields = unknownFields.build();
+ makeExtensionsImmutable();
+ }
+ }
+ public static final com.google.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return org.tribuo.protos.core.TribuoCore.internal_static_tribuo_core_MeanVarianceProto_descriptor;
+ }
+
+ @java.lang.Override
+ protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return org.tribuo.protos.core.TribuoCore.internal_static_tribuo_core_MeanVarianceProto_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ org.tribuo.protos.core.MeanVarianceProto.class, org.tribuo.protos.core.MeanVarianceProto.Builder.class);
+ }
+
+ public static final int VERSION_FIELD_NUMBER = 1;
+ private int version_;
+ /**
+ * int32 version = 1;
+ * @return The version.
+ */
+ @java.lang.Override
+ public int getVersion() {
+ return version_;
+ }
+
+ public static final int MAX_FIELD_NUMBER = 2;
+ private double max_;
+ /**
+ * double max = 2;
+ * @return The max.
+ */
+ @java.lang.Override
+ public double getMax() {
+ return max_;
+ }
+
+ public static final int MIN_FIELD_NUMBER = 3;
+ private double min_;
+ /**
+ * double min = 3;
+ * @return The min.
+ */
+ @java.lang.Override
+ public double getMin() {
+ return min_;
+ }
+
+ public static final int MEAN_FIELD_NUMBER = 4;
+ private double mean_;
+ /**
+ * double mean = 4;
+ * @return The mean.
+ */
+ @java.lang.Override
+ public double getMean() {
+ return mean_;
+ }
+
+ public static final int SUMSQUARES_FIELD_NUMBER = 5;
+ private double sumSquares_;
+ /**
+ * double sumSquares = 5;
+ * @return The sumSquares.
+ */
+ @java.lang.Override
+ public double getSumSquares() {
+ return sumSquares_;
+ }
+
+ public static final int COUNT_FIELD_NUMBER = 6;
+ private long count_;
+ /**
+ * int64 count = 6;
+ * @return The count.
+ */
+ @java.lang.Override
+ public long getCount() {
+ return count_;
+ }
+
+ 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 (version_ != 0) {
+ output.writeInt32(1, version_);
+ }
+ if (java.lang.Double.doubleToRawLongBits(max_) != 0) {
+ output.writeDouble(2, max_);
+ }
+ if (java.lang.Double.doubleToRawLongBits(min_) != 0) {
+ output.writeDouble(3, min_);
+ }
+ if (java.lang.Double.doubleToRawLongBits(mean_) != 0) {
+ output.writeDouble(4, mean_);
+ }
+ if (java.lang.Double.doubleToRawLongBits(sumSquares_) != 0) {
+ output.writeDouble(5, sumSquares_);
+ }
+ if (count_ != 0L) {
+ output.writeInt64(6, count_);
+ }
+ unknownFields.writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (version_ != 0) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeInt32Size(1, version_);
+ }
+ if (java.lang.Double.doubleToRawLongBits(max_) != 0) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeDoubleSize(2, max_);
+ }
+ if (java.lang.Double.doubleToRawLongBits(min_) != 0) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeDoubleSize(3, min_);
+ }
+ if (java.lang.Double.doubleToRawLongBits(mean_) != 0) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeDoubleSize(4, mean_);
+ }
+ if (java.lang.Double.doubleToRawLongBits(sumSquares_) != 0) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeDoubleSize(5, sumSquares_);
+ }
+ if (count_ != 0L) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeInt64Size(6, count_);
+ }
+ 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.protos.core.MeanVarianceProto)) {
+ return super.equals(obj);
+ }
+ org.tribuo.protos.core.MeanVarianceProto other = (org.tribuo.protos.core.MeanVarianceProto) obj;
+
+ if (getVersion()
+ != other.getVersion()) return false;
+ if (java.lang.Double.doubleToLongBits(getMax())
+ != java.lang.Double.doubleToLongBits(
+ other.getMax())) return false;
+ if (java.lang.Double.doubleToLongBits(getMin())
+ != java.lang.Double.doubleToLongBits(
+ other.getMin())) return false;
+ if (java.lang.Double.doubleToLongBits(getMean())
+ != java.lang.Double.doubleToLongBits(
+ other.getMean())) return false;
+ if (java.lang.Double.doubleToLongBits(getSumSquares())
+ != java.lang.Double.doubleToLongBits(
+ other.getSumSquares())) return false;
+ if (getCount()
+ != other.getCount()) 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) + VERSION_FIELD_NUMBER;
+ hash = (53 * hash) + getVersion();
+ hash = (37 * hash) + MAX_FIELD_NUMBER;
+ hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
+ java.lang.Double.doubleToLongBits(getMax()));
+ hash = (37 * hash) + MIN_FIELD_NUMBER;
+ hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
+ java.lang.Double.doubleToLongBits(getMin()));
+ hash = (37 * hash) + MEAN_FIELD_NUMBER;
+ hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
+ java.lang.Double.doubleToLongBits(getMean()));
+ hash = (37 * hash) + SUMSQUARES_FIELD_NUMBER;
+ hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
+ java.lang.Double.doubleToLongBits(getSumSquares()));
+ hash = (37 * hash) + COUNT_FIELD_NUMBER;
+ hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
+ getCount());
+ hash = (29 * hash) + unknownFields.hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static org.tribuo.protos.core.MeanVarianceProto parseFrom(
+ java.nio.ByteBuffer data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static org.tribuo.protos.core.MeanVarianceProto parseFrom(
+ java.nio.ByteBuffer data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static org.tribuo.protos.core.MeanVarianceProto parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static org.tribuo.protos.core.MeanVarianceProto 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.protos.core.MeanVarianceProto parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static org.tribuo.protos.core.MeanVarianceProto parseFrom(
+ byte[] data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static org.tribuo.protos.core.MeanVarianceProto parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input);
+ }
+ public static org.tribuo.protos.core.MeanVarianceProto 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.protos.core.MeanVarianceProto parseDelimitedFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseDelimitedWithIOException(PARSER, input);
+ }
+ public static org.tribuo.protos.core.MeanVarianceProto 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.protos.core.MeanVarianceProto parseFrom(
+ com.google.protobuf.CodedInputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input);
+ }
+ public static org.tribuo.protos.core.MeanVarianceProto 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.protos.core.MeanVarianceProto 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;
+ }
+ /**
+ *
+ *Mean variance accumulator proto
+ *
+ *
+ * Protobuf type {@code tribuo.core.MeanVarianceProto}
+ */
+ public static final class Builder extends
+ com.google.protobuf.GeneratedMessageV3.Builder implements
+ // @@protoc_insertion_point(builder_implements:tribuo.core.MeanVarianceProto)
+ org.tribuo.protos.core.MeanVarianceProtoOrBuilder {
+ public static final com.google.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return org.tribuo.protos.core.TribuoCore.internal_static_tribuo_core_MeanVarianceProto_descriptor;
+ }
+
+ @java.lang.Override
+ protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return org.tribuo.protos.core.TribuoCore.internal_static_tribuo_core_MeanVarianceProto_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ org.tribuo.protos.core.MeanVarianceProto.class, org.tribuo.protos.core.MeanVarianceProto.Builder.class);
+ }
+
+ // Construct using org.tribuo.protos.core.MeanVarianceProto.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();
+ version_ = 0;
+
+ max_ = 0D;
+
+ min_ = 0D;
+
+ mean_ = 0D;
+
+ sumSquares_ = 0D;
+
+ count_ = 0L;
+
+ return this;
+ }
+
+ @java.lang.Override
+ public com.google.protobuf.Descriptors.Descriptor
+ getDescriptorForType() {
+ return org.tribuo.protos.core.TribuoCore.internal_static_tribuo_core_MeanVarianceProto_descriptor;
+ }
+
+ @java.lang.Override
+ public org.tribuo.protos.core.MeanVarianceProto getDefaultInstanceForType() {
+ return org.tribuo.protos.core.MeanVarianceProto.getDefaultInstance();
+ }
+
+ @java.lang.Override
+ public org.tribuo.protos.core.MeanVarianceProto build() {
+ org.tribuo.protos.core.MeanVarianceProto result = buildPartial();
+ if (!result.isInitialized()) {
+ throw newUninitializedMessageException(result);
+ }
+ return result;
+ }
+
+ @java.lang.Override
+ public org.tribuo.protos.core.MeanVarianceProto buildPartial() {
+ org.tribuo.protos.core.MeanVarianceProto result = new org.tribuo.protos.core.MeanVarianceProto(this);
+ result.version_ = version_;
+ result.max_ = max_;
+ result.min_ = min_;
+ result.mean_ = mean_;
+ result.sumSquares_ = sumSquares_;
+ result.count_ = count_;
+ 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.protos.core.MeanVarianceProto) {
+ return mergeFrom((org.tribuo.protos.core.MeanVarianceProto)other);
+ } else {
+ super.mergeFrom(other);
+ return this;
+ }
+ }
+
+ public Builder mergeFrom(org.tribuo.protos.core.MeanVarianceProto other) {
+ if (other == org.tribuo.protos.core.MeanVarianceProto.getDefaultInstance()) return this;
+ if (other.getVersion() != 0) {
+ setVersion(other.getVersion());
+ }
+ if (other.getMax() != 0D) {
+ setMax(other.getMax());
+ }
+ if (other.getMin() != 0D) {
+ setMin(other.getMin());
+ }
+ if (other.getMean() != 0D) {
+ setMean(other.getMean());
+ }
+ if (other.getSumSquares() != 0D) {
+ setSumSquares(other.getSumSquares());
+ }
+ if (other.getCount() != 0L) {
+ setCount(other.getCount());
+ }
+ 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.protos.core.MeanVarianceProto parsedMessage = null;
+ try {
+ parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ parsedMessage = (org.tribuo.protos.core.MeanVarianceProto) e.getUnfinishedMessage();
+ throw e.unwrapIOException();
+ } finally {
+ if (parsedMessage != null) {
+ mergeFrom(parsedMessage);
+ }
+ }
+ return this;
+ }
+
+ private int version_ ;
+ /**
+ * int32 version = 1;
+ * @return The version.
+ */
+ @java.lang.Override
+ public int getVersion() {
+ return version_;
+ }
+ /**
+ * int32 version = 1;
+ * @param value The version to set.
+ * @return This builder for chaining.
+ */
+ public Builder setVersion(int value) {
+
+ version_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * int32 version = 1;
+ * @return This builder for chaining.
+ */
+ public Builder clearVersion() {
+
+ version_ = 0;
+ onChanged();
+ return this;
+ }
+
+ private double max_ ;
+ /**
+ * double max = 2;
+ * @return The max.
+ */
+ @java.lang.Override
+ public double getMax() {
+ return max_;
+ }
+ /**
+ * double max = 2;
+ * @param value The max to set.
+ * @return This builder for chaining.
+ */
+ public Builder setMax(double value) {
+
+ max_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * double max = 2;
+ * @return This builder for chaining.
+ */
+ public Builder clearMax() {
+
+ max_ = 0D;
+ onChanged();
+ return this;
+ }
+
+ private double min_ ;
+ /**
+ * double min = 3;
+ * @return The min.
+ */
+ @java.lang.Override
+ public double getMin() {
+ return min_;
+ }
+ /**
+ * double min = 3;
+ * @param value The min to set.
+ * @return This builder for chaining.
+ */
+ public Builder setMin(double value) {
+
+ min_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * double min = 3;
+ * @return This builder for chaining.
+ */
+ public Builder clearMin() {
+
+ min_ = 0D;
+ onChanged();
+ return this;
+ }
+
+ private double mean_ ;
+ /**
+ * double mean = 4;
+ * @return The mean.
+ */
+ @java.lang.Override
+ public double getMean() {
+ return mean_;
+ }
+ /**
+ * double mean = 4;
+ * @param value The mean to set.
+ * @return This builder for chaining.
+ */
+ public Builder setMean(double value) {
+
+ mean_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * double mean = 4;
+ * @return This builder for chaining.
+ */
+ public Builder clearMean() {
+
+ mean_ = 0D;
+ onChanged();
+ return this;
+ }
+
+ private double sumSquares_ ;
+ /**
+ * double sumSquares = 5;
+ * @return The sumSquares.
+ */
+ @java.lang.Override
+ public double getSumSquares() {
+ return sumSquares_;
+ }
+ /**
+ * double sumSquares = 5;
+ * @param value The sumSquares to set.
+ * @return This builder for chaining.
+ */
+ public Builder setSumSquares(double value) {
+
+ sumSquares_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * double sumSquares = 5;
+ * @return This builder for chaining.
+ */
+ public Builder clearSumSquares() {
+
+ sumSquares_ = 0D;
+ onChanged();
+ return this;
+ }
+
+ private long count_ ;
+ /**
+ * int64 count = 6;
+ * @return The count.
+ */
+ @java.lang.Override
+ public long getCount() {
+ return count_;
+ }
+ /**
+ * int64 count = 6;
+ * @param value The count to set.
+ * @return This builder for chaining.
+ */
+ public Builder setCount(long value) {
+
+ count_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * int64 count = 6;
+ * @return This builder for chaining.
+ */
+ public Builder clearCount() {
+
+ count_ = 0L;
+ 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.core.MeanVarianceProto)
+ }
+
+ // @@protoc_insertion_point(class_scope:tribuo.core.MeanVarianceProto)
+ private static final org.tribuo.protos.core.MeanVarianceProto DEFAULT_INSTANCE;
+ static {
+ DEFAULT_INSTANCE = new org.tribuo.protos.core.MeanVarianceProto();
+ }
+
+ public static org.tribuo.protos.core.MeanVarianceProto getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser
+ PARSER = new com.google.protobuf.AbstractParser() {
+ @java.lang.Override
+ public MeanVarianceProto parsePartialFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return new MeanVarianceProto(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.tribuo.protos.core.MeanVarianceProto getDefaultInstanceForType() {
+ return DEFAULT_INSTANCE;
+ }
+
+}
+
diff --git a/Core/src/main/java/org/tribuo/protos/core/MeanVarianceProtoOrBuilder.java b/Core/src/main/java/org/tribuo/protos/core/MeanVarianceProtoOrBuilder.java
new file mode 100644
index 000000000..f934b2e12
--- /dev/null
+++ b/Core/src/main/java/org/tribuo/protos/core/MeanVarianceProtoOrBuilder.java
@@ -0,0 +1,45 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: tribuo-core.proto
+
+package org.tribuo.protos.core;
+
+public interface MeanVarianceProtoOrBuilder extends
+ // @@protoc_insertion_point(interface_extends:tribuo.core.MeanVarianceProto)
+ com.google.protobuf.MessageOrBuilder {
+
+ /**
+ * int32 version = 1;
+ * @return The version.
+ */
+ int getVersion();
+
+ /**
+ * double max = 2;
+ * @return The max.
+ */
+ double getMax();
+
+ /**
+ * double min = 3;
+ * @return The min.
+ */
+ double getMin();
+
+ /**
+ * double mean = 4;
+ * @return The mean.
+ */
+ double getMean();
+
+ /**
+ * double sumSquares = 5;
+ * @return The sumSquares.
+ */
+ double getSumSquares();
+
+ /**
+ * int64 count = 6;
+ * @return The count.
+ */
+ long getCount();
+}
diff --git a/Core/src/main/java/org/tribuo/protos/core/MessageDigestHasherProto.java b/Core/src/main/java/org/tribuo/protos/core/MessageDigestHasherProto.java
new file mode 100644
index 000000000..ce4f5757a
--- /dev/null
+++ b/Core/src/main/java/org/tribuo/protos/core/MessageDigestHasherProto.java
@@ -0,0 +1,567 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: tribuo-core-impl.proto
+
+package org.tribuo.protos.core;
+
+/**
+ *
+ *MessageDigestHasher proto
+ *
+ *
+ * Protobuf type {@code tribuo.core.MessageDigestHasherProto}
+ */
+public final class MessageDigestHasherProto extends
+ com.google.protobuf.GeneratedMessageV3 implements
+ // @@protoc_insertion_point(message_implements:tribuo.core.MessageDigestHasherProto)
+ MessageDigestHasherProtoOrBuilder {
+private static final long serialVersionUID = 0L;
+ // Use MessageDigestHasherProto.newBuilder() to construct.
+ private MessageDigestHasherProto(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
+ super(builder);
+ }
+ private MessageDigestHasherProto() {
+ hashType_ = "";
+ }
+
+ @java.lang.Override
+ @SuppressWarnings({"unused"})
+ protected java.lang.Object newInstance(
+ UnusedPrivateParameter unused) {
+ return new MessageDigestHasherProto();
+ }
+
+ @java.lang.Override
+ public final com.google.protobuf.UnknownFieldSet
+ getUnknownFields() {
+ return this.unknownFields;
+ }
+ private MessageDigestHasherProto(
+ 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 10: {
+ java.lang.String s = input.readStringRequireUtf8();
+
+ hashType_ = s;
+ 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 {
+ this.unknownFields = unknownFields.build();
+ makeExtensionsImmutable();
+ }
+ }
+ public static final com.google.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return org.tribuo.protos.core.TribuoCoreImpl.internal_static_tribuo_core_MessageDigestHasherProto_descriptor;
+ }
+
+ @java.lang.Override
+ protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return org.tribuo.protos.core.TribuoCoreImpl.internal_static_tribuo_core_MessageDigestHasherProto_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ org.tribuo.protos.core.MessageDigestHasherProto.class, org.tribuo.protos.core.MessageDigestHasherProto.Builder.class);
+ }
+
+ public static final int HASH_TYPE_FIELD_NUMBER = 1;
+ private volatile java.lang.Object hashType_;
+ /**
+ * string hash_type = 1;
+ * @return The hashType.
+ */
+ @java.lang.Override
+ public java.lang.String getHashType() {
+ java.lang.Object ref = hashType_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ hashType_ = s;
+ return s;
+ }
+ }
+ /**
+ * string hash_type = 1;
+ * @return The bytes for hashType.
+ */
+ @java.lang.Override
+ public com.google.protobuf.ByteString
+ getHashTypeBytes() {
+ java.lang.Object ref = hashType_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ hashType_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(hashType_)) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 1, hashType_);
+ }
+ unknownFields.writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(hashType_)) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, hashType_);
+ }
+ 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.protos.core.MessageDigestHasherProto)) {
+ return super.equals(obj);
+ }
+ org.tribuo.protos.core.MessageDigestHasherProto other = (org.tribuo.protos.core.MessageDigestHasherProto) obj;
+
+ if (!getHashType()
+ .equals(other.getHashType())) 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) + HASH_TYPE_FIELD_NUMBER;
+ hash = (53 * hash) + getHashType().hashCode();
+ hash = (29 * hash) + unknownFields.hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static org.tribuo.protos.core.MessageDigestHasherProto parseFrom(
+ java.nio.ByteBuffer data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static org.tribuo.protos.core.MessageDigestHasherProto parseFrom(
+ java.nio.ByteBuffer data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static org.tribuo.protos.core.MessageDigestHasherProto parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static org.tribuo.protos.core.MessageDigestHasherProto 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.protos.core.MessageDigestHasherProto parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static org.tribuo.protos.core.MessageDigestHasherProto parseFrom(
+ byte[] data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static org.tribuo.protos.core.MessageDigestHasherProto parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input);
+ }
+ public static org.tribuo.protos.core.MessageDigestHasherProto 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.protos.core.MessageDigestHasherProto parseDelimitedFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseDelimitedWithIOException(PARSER, input);
+ }
+ public static org.tribuo.protos.core.MessageDigestHasherProto 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.protos.core.MessageDigestHasherProto parseFrom(
+ com.google.protobuf.CodedInputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input);
+ }
+ public static org.tribuo.protos.core.MessageDigestHasherProto 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.protos.core.MessageDigestHasherProto 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;
+ }
+ /**
+ *
+ *MessageDigestHasher proto
+ *
+ *
+ * Protobuf type {@code tribuo.core.MessageDigestHasherProto}
+ */
+ public static final class Builder extends
+ com.google.protobuf.GeneratedMessageV3.Builder implements
+ // @@protoc_insertion_point(builder_implements:tribuo.core.MessageDigestHasherProto)
+ org.tribuo.protos.core.MessageDigestHasherProtoOrBuilder {
+ public static final com.google.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return org.tribuo.protos.core.TribuoCoreImpl.internal_static_tribuo_core_MessageDigestHasherProto_descriptor;
+ }
+
+ @java.lang.Override
+ protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return org.tribuo.protos.core.TribuoCoreImpl.internal_static_tribuo_core_MessageDigestHasherProto_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ org.tribuo.protos.core.MessageDigestHasherProto.class, org.tribuo.protos.core.MessageDigestHasherProto.Builder.class);
+ }
+
+ // Construct using org.tribuo.protos.core.MessageDigestHasherProto.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();
+ hashType_ = "";
+
+ return this;
+ }
+
+ @java.lang.Override
+ public com.google.protobuf.Descriptors.Descriptor
+ getDescriptorForType() {
+ return org.tribuo.protos.core.TribuoCoreImpl.internal_static_tribuo_core_MessageDigestHasherProto_descriptor;
+ }
+
+ @java.lang.Override
+ public org.tribuo.protos.core.MessageDigestHasherProto getDefaultInstanceForType() {
+ return org.tribuo.protos.core.MessageDigestHasherProto.getDefaultInstance();
+ }
+
+ @java.lang.Override
+ public org.tribuo.protos.core.MessageDigestHasherProto build() {
+ org.tribuo.protos.core.MessageDigestHasherProto result = buildPartial();
+ if (!result.isInitialized()) {
+ throw newUninitializedMessageException(result);
+ }
+ return result;
+ }
+
+ @java.lang.Override
+ public org.tribuo.protos.core.MessageDigestHasherProto buildPartial() {
+ org.tribuo.protos.core.MessageDigestHasherProto result = new org.tribuo.protos.core.MessageDigestHasherProto(this);
+ result.hashType_ = hashType_;
+ 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.protos.core.MessageDigestHasherProto) {
+ return mergeFrom((org.tribuo.protos.core.MessageDigestHasherProto)other);
+ } else {
+ super.mergeFrom(other);
+ return this;
+ }
+ }
+
+ public Builder mergeFrom(org.tribuo.protos.core.MessageDigestHasherProto other) {
+ if (other == org.tribuo.protos.core.MessageDigestHasherProto.getDefaultInstance()) return this;
+ if (!other.getHashType().isEmpty()) {
+ hashType_ = other.hashType_;
+ 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 {
+ org.tribuo.protos.core.MessageDigestHasherProto parsedMessage = null;
+ try {
+ parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ parsedMessage = (org.tribuo.protos.core.MessageDigestHasherProto) e.getUnfinishedMessage();
+ throw e.unwrapIOException();
+ } finally {
+ if (parsedMessage != null) {
+ mergeFrom(parsedMessage);
+ }
+ }
+ return this;
+ }
+
+ private java.lang.Object hashType_ = "";
+ /**
+ * string hash_type = 1;
+ * @return The hashType.
+ */
+ public java.lang.String getHashType() {
+ java.lang.Object ref = hashType_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ hashType_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ * string hash_type = 1;
+ * @return The bytes for hashType.
+ */
+ public com.google.protobuf.ByteString
+ getHashTypeBytes() {
+ java.lang.Object ref = hashType_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ hashType_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ * string hash_type = 1;
+ * @param value The hashType to set.
+ * @return This builder for chaining.
+ */
+ public Builder setHashType(
+ java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ hashType_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * string hash_type = 1;
+ * @return This builder for chaining.
+ */
+ public Builder clearHashType() {
+
+ hashType_ = getDefaultInstance().getHashType();
+ onChanged();
+ return this;
+ }
+ /**
+ * string hash_type = 1;
+ * @param value The bytes for hashType to set.
+ * @return This builder for chaining.
+ */
+ public Builder setHashTypeBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ hashType_ = value;
+ 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.core.MessageDigestHasherProto)
+ }
+
+ // @@protoc_insertion_point(class_scope:tribuo.core.MessageDigestHasherProto)
+ private static final org.tribuo.protos.core.MessageDigestHasherProto DEFAULT_INSTANCE;
+ static {
+ DEFAULT_INSTANCE = new org.tribuo.protos.core.MessageDigestHasherProto();
+ }
+
+ public static org.tribuo.protos.core.MessageDigestHasherProto getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser
+ PARSER = new com.google.protobuf.AbstractParser() {
+ @java.lang.Override
+ public MessageDigestHasherProto parsePartialFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return new MessageDigestHasherProto(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.tribuo.protos.core.MessageDigestHasherProto getDefaultInstanceForType() {
+ return DEFAULT_INSTANCE;
+ }
+
+}
+
diff --git a/Core/src/main/java/org/tribuo/protos/core/MessageDigestHasherProtoOrBuilder.java b/Core/src/main/java/org/tribuo/protos/core/MessageDigestHasherProtoOrBuilder.java
new file mode 100644
index 000000000..50e3ae8fc
--- /dev/null
+++ b/Core/src/main/java/org/tribuo/protos/core/MessageDigestHasherProtoOrBuilder.java
@@ -0,0 +1,21 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: tribuo-core-impl.proto
+
+package org.tribuo.protos.core;
+
+public interface MessageDigestHasherProtoOrBuilder extends
+ // @@protoc_insertion_point(interface_extends:tribuo.core.MessageDigestHasherProto)
+ com.google.protobuf.MessageOrBuilder {
+
+ /**
+ * string hash_type = 1;
+ * @return The hashType.
+ */
+ java.lang.String getHashType();
+ /**
+ * string hash_type = 1;
+ * @return The bytes for hashType.
+ */
+ com.google.protobuf.ByteString
+ getHashTypeBytes();
+}
diff --git a/Core/src/main/java/org/tribuo/protos/core/ModHashCodeHasherProto.java b/Core/src/main/java/org/tribuo/protos/core/ModHashCodeHasherProto.java
new file mode 100644
index 000000000..4aad39007
--- /dev/null
+++ b/Core/src/main/java/org/tribuo/protos/core/ModHashCodeHasherProto.java
@@ -0,0 +1,493 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: tribuo-core-impl.proto
+
+package org.tribuo.protos.core;
+
+/**
+ *
+ *ModHashCodeHasher proto
+ *
+ *
+ * Protobuf type {@code tribuo.core.ModHashCodeHasherProto}
+ */
+public final class ModHashCodeHasherProto extends
+ com.google.protobuf.GeneratedMessageV3 implements
+ // @@protoc_insertion_point(message_implements:tribuo.core.ModHashCodeHasherProto)
+ ModHashCodeHasherProtoOrBuilder {
+private static final long serialVersionUID = 0L;
+ // Use ModHashCodeHasherProto.newBuilder() to construct.
+ private ModHashCodeHasherProto(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
+ super(builder);
+ }
+ private ModHashCodeHasherProto() {
+ }
+
+ @java.lang.Override
+ @SuppressWarnings({"unused"})
+ protected java.lang.Object newInstance(
+ UnusedPrivateParameter unused) {
+ return new ModHashCodeHasherProto();
+ }
+
+ @java.lang.Override
+ public final com.google.protobuf.UnknownFieldSet
+ getUnknownFields() {
+ return this.unknownFields;
+ }
+ private ModHashCodeHasherProto(
+ 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: {
+
+ dimension_ = input.readInt32();
+ 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 {
+ this.unknownFields = unknownFields.build();
+ makeExtensionsImmutable();
+ }
+ }
+ public static final com.google.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return org.tribuo.protos.core.TribuoCoreImpl.internal_static_tribuo_core_ModHashCodeHasherProto_descriptor;
+ }
+
+ @java.lang.Override
+ protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return org.tribuo.protos.core.TribuoCoreImpl.internal_static_tribuo_core_ModHashCodeHasherProto_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ org.tribuo.protos.core.ModHashCodeHasherProto.class, org.tribuo.protos.core.ModHashCodeHasherProto.Builder.class);
+ }
+
+ public static final int DIMENSION_FIELD_NUMBER = 1;
+ private int dimension_;
+ /**
+ * int32 dimension = 1;
+ * @return The dimension.
+ */
+ @java.lang.Override
+ public int getDimension() {
+ return dimension_;
+ }
+
+ 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 (dimension_ != 0) {
+ output.writeInt32(1, dimension_);
+ }
+ unknownFields.writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (dimension_ != 0) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeInt32Size(1, dimension_);
+ }
+ 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.protos.core.ModHashCodeHasherProto)) {
+ return super.equals(obj);
+ }
+ org.tribuo.protos.core.ModHashCodeHasherProto other = (org.tribuo.protos.core.ModHashCodeHasherProto) obj;
+
+ if (getDimension()
+ != other.getDimension()) 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) + DIMENSION_FIELD_NUMBER;
+ hash = (53 * hash) + getDimension();
+ hash = (29 * hash) + unknownFields.hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static org.tribuo.protos.core.ModHashCodeHasherProto parseFrom(
+ java.nio.ByteBuffer data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static org.tribuo.protos.core.ModHashCodeHasherProto parseFrom(
+ java.nio.ByteBuffer data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static org.tribuo.protos.core.ModHashCodeHasherProto parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static org.tribuo.protos.core.ModHashCodeHasherProto 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.protos.core.ModHashCodeHasherProto parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static org.tribuo.protos.core.ModHashCodeHasherProto parseFrom(
+ byte[] data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static org.tribuo.protos.core.ModHashCodeHasherProto parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input);
+ }
+ public static org.tribuo.protos.core.ModHashCodeHasherProto 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.protos.core.ModHashCodeHasherProto parseDelimitedFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseDelimitedWithIOException(PARSER, input);
+ }
+ public static org.tribuo.protos.core.ModHashCodeHasherProto 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.protos.core.ModHashCodeHasherProto parseFrom(
+ com.google.protobuf.CodedInputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input);
+ }
+ public static org.tribuo.protos.core.ModHashCodeHasherProto 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.protos.core.ModHashCodeHasherProto 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;
+ }
+ /**
+ *
+ *ModHashCodeHasher proto
+ *
+ *
+ * Protobuf type {@code tribuo.core.ModHashCodeHasherProto}
+ */
+ public static final class Builder extends
+ com.google.protobuf.GeneratedMessageV3.Builder implements
+ // @@protoc_insertion_point(builder_implements:tribuo.core.ModHashCodeHasherProto)
+ org.tribuo.protos.core.ModHashCodeHasherProtoOrBuilder {
+ public static final com.google.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return org.tribuo.protos.core.TribuoCoreImpl.internal_static_tribuo_core_ModHashCodeHasherProto_descriptor;
+ }
+
+ @java.lang.Override
+ protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return org.tribuo.protos.core.TribuoCoreImpl.internal_static_tribuo_core_ModHashCodeHasherProto_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ org.tribuo.protos.core.ModHashCodeHasherProto.class, org.tribuo.protos.core.ModHashCodeHasherProto.Builder.class);
+ }
+
+ // Construct using org.tribuo.protos.core.ModHashCodeHasherProto.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();
+ dimension_ = 0;
+
+ return this;
+ }
+
+ @java.lang.Override
+ public com.google.protobuf.Descriptors.Descriptor
+ getDescriptorForType() {
+ return org.tribuo.protos.core.TribuoCoreImpl.internal_static_tribuo_core_ModHashCodeHasherProto_descriptor;
+ }
+
+ @java.lang.Override
+ public org.tribuo.protos.core.ModHashCodeHasherProto getDefaultInstanceForType() {
+ return org.tribuo.protos.core.ModHashCodeHasherProto.getDefaultInstance();
+ }
+
+ @java.lang.Override
+ public org.tribuo.protos.core.ModHashCodeHasherProto build() {
+ org.tribuo.protos.core.ModHashCodeHasherProto result = buildPartial();
+ if (!result.isInitialized()) {
+ throw newUninitializedMessageException(result);
+ }
+ return result;
+ }
+
+ @java.lang.Override
+ public org.tribuo.protos.core.ModHashCodeHasherProto buildPartial() {
+ org.tribuo.protos.core.ModHashCodeHasherProto result = new org.tribuo.protos.core.ModHashCodeHasherProto(this);
+ result.dimension_ = dimension_;
+ 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.protos.core.ModHashCodeHasherProto) {
+ return mergeFrom((org.tribuo.protos.core.ModHashCodeHasherProto)other);
+ } else {
+ super.mergeFrom(other);
+ return this;
+ }
+ }
+
+ public Builder mergeFrom(org.tribuo.protos.core.ModHashCodeHasherProto other) {
+ if (other == org.tribuo.protos.core.ModHashCodeHasherProto.getDefaultInstance()) return this;
+ if (other.getDimension() != 0) {
+ setDimension(other.getDimension());
+ }
+ 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.protos.core.ModHashCodeHasherProto parsedMessage = null;
+ try {
+ parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ parsedMessage = (org.tribuo.protos.core.ModHashCodeHasherProto) e.getUnfinishedMessage();
+ throw e.unwrapIOException();
+ } finally {
+ if (parsedMessage != null) {
+ mergeFrom(parsedMessage);
+ }
+ }
+ return this;
+ }
+
+ private int dimension_ ;
+ /**
+ * int32 dimension = 1;
+ * @return The dimension.
+ */
+ @java.lang.Override
+ public int getDimension() {
+ return dimension_;
+ }
+ /**
+ * int32 dimension = 1;
+ * @param value The dimension to set.
+ * @return This builder for chaining.
+ */
+ public Builder setDimension(int value) {
+
+ dimension_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * int32 dimension = 1;
+ * @return This builder for chaining.
+ */
+ public Builder clearDimension() {
+
+ dimension_ = 0;
+ 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.core.ModHashCodeHasherProto)
+ }
+
+ // @@protoc_insertion_point(class_scope:tribuo.core.ModHashCodeHasherProto)
+ private static final org.tribuo.protos.core.ModHashCodeHasherProto DEFAULT_INSTANCE;
+ static {
+ DEFAULT_INSTANCE = new org.tribuo.protos.core.ModHashCodeHasherProto();
+ }
+
+ public static org.tribuo.protos.core.ModHashCodeHasherProto getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser
+ PARSER = new com.google.protobuf.AbstractParser() {
+ @java.lang.Override
+ public ModHashCodeHasherProto parsePartialFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return new ModHashCodeHasherProto(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.tribuo.protos.core.ModHashCodeHasherProto getDefaultInstanceForType() {
+ return DEFAULT_INSTANCE;
+ }
+
+}
+
diff --git a/Core/src/main/java/org/tribuo/protos/core/ModHashCodeHasherProtoOrBuilder.java b/Core/src/main/java/org/tribuo/protos/core/ModHashCodeHasherProtoOrBuilder.java
new file mode 100644
index 000000000..3f44c2ea6
--- /dev/null
+++ b/Core/src/main/java/org/tribuo/protos/core/ModHashCodeHasherProtoOrBuilder.java
@@ -0,0 +1,15 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: tribuo-core-impl.proto
+
+package org.tribuo.protos.core;
+
+public interface ModHashCodeHasherProtoOrBuilder extends
+ // @@protoc_insertion_point(interface_extends:tribuo.core.ModHashCodeHasherProto)
+ com.google.protobuf.MessageOrBuilder {
+
+ /**
+ * int32 dimension = 1;
+ * @return The dimension.
+ */
+ int getDimension();
+}
diff --git a/Core/src/main/java/org/tribuo/protos/core/ModelDataProto.java b/Core/src/main/java/org/tribuo/protos/core/ModelDataProto.java
new file mode 100644
index 000000000..b18b6ab95
--- /dev/null
+++ b/Core/src/main/java/org/tribuo/protos/core/ModelDataProto.java
@@ -0,0 +1,819 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: tribuo-core.proto
+
+package org.tribuo.protos.core;
+
+/**
+ *
+ *Model data redirection proto
+ *
+ *
+ * Protobuf type {@code tribuo.core.ModelDataProto}
+ */
+public final class ModelDataProto extends
+ com.google.protobuf.GeneratedMessageV3 implements
+ // @@protoc_insertion_point(message_implements:tribuo.core.ModelDataProto)
+ ModelDataProtoOrBuilder {
+private static final long serialVersionUID = 0L;
+ // Use ModelDataProto.newBuilder() to construct.
+ private ModelDataProto(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
+ super(builder);
+ }
+ private ModelDataProto() {
+ className_ = "";
+ }
+
+ @java.lang.Override
+ @SuppressWarnings({"unused"})
+ protected java.lang.Object newInstance(
+ UnusedPrivateParameter unused) {
+ return new ModelDataProto();
+ }
+
+ @java.lang.Override
+ public final com.google.protobuf.UnknownFieldSet
+ getUnknownFields() {
+ return this.unknownFields;
+ }
+ private ModelDataProto(
+ 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: {
+
+ version_ = input.readInt32();
+ break;
+ }
+ case 18: {
+ java.lang.String s = input.readStringRequireUtf8();
+
+ className_ = s;
+ break;
+ }
+ case 26: {
+ com.google.protobuf.Any.Builder subBuilder = null;
+ if (serializedData_ != null) {
+ subBuilder = serializedData_.toBuilder();
+ }
+ serializedData_ = input.readMessage(com.google.protobuf.Any.parser(), extensionRegistry);
+ if (subBuilder != null) {
+ subBuilder.mergeFrom(serializedData_);
+ serializedData_ = subBuilder.buildPartial();
+ }
+
+ 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 {
+ this.unknownFields = unknownFields.build();
+ makeExtensionsImmutable();
+ }
+ }
+ public static final com.google.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return org.tribuo.protos.core.TribuoCore.internal_static_tribuo_core_ModelDataProto_descriptor;
+ }
+
+ @java.lang.Override
+ protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return org.tribuo.protos.core.TribuoCore.internal_static_tribuo_core_ModelDataProto_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ org.tribuo.protos.core.ModelDataProto.class, org.tribuo.protos.core.ModelDataProto.Builder.class);
+ }
+
+ public static final int VERSION_FIELD_NUMBER = 1;
+ private int version_;
+ /**
+ * int32 version = 1;
+ * @return The version.
+ */
+ @java.lang.Override
+ public int getVersion() {
+ return version_;
+ }
+
+ public static final int CLASS_NAME_FIELD_NUMBER = 2;
+ private volatile java.lang.Object className_;
+ /**
+ * string class_name = 2;
+ * @return The className.
+ */
+ @java.lang.Override
+ public java.lang.String getClassName() {
+ java.lang.Object ref = className_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ className_ = s;
+ return s;
+ }
+ }
+ /**
+ * string class_name = 2;
+ * @return The bytes for className.
+ */
+ @java.lang.Override
+ public com.google.protobuf.ByteString
+ getClassNameBytes() {
+ java.lang.Object ref = className_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ className_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int SERIALIZED_DATA_FIELD_NUMBER = 3;
+ private com.google.protobuf.Any serializedData_;
+ /**
+ * .google.protobuf.Any serialized_data = 3;
+ * @return Whether the serializedData field is set.
+ */
+ @java.lang.Override
+ public boolean hasSerializedData() {
+ return serializedData_ != null;
+ }
+ /**
+ * .google.protobuf.Any serialized_data = 3;
+ * @return The serializedData.
+ */
+ @java.lang.Override
+ public com.google.protobuf.Any getSerializedData() {
+ return serializedData_ == null ? com.google.protobuf.Any.getDefaultInstance() : serializedData_;
+ }
+ /**
+ * .google.protobuf.Any serialized_data = 3;
+ */
+ @java.lang.Override
+ public com.google.protobuf.AnyOrBuilder getSerializedDataOrBuilder() {
+ return getSerializedData();
+ }
+
+ 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 (version_ != 0) {
+ output.writeInt32(1, version_);
+ }
+ if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(className_)) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 2, className_);
+ }
+ if (serializedData_ != null) {
+ output.writeMessage(3, getSerializedData());
+ }
+ unknownFields.writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (version_ != 0) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeInt32Size(1, version_);
+ }
+ if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(className_)) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, className_);
+ }
+ if (serializedData_ != null) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeMessageSize(3, getSerializedData());
+ }
+ 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.protos.core.ModelDataProto)) {
+ return super.equals(obj);
+ }
+ org.tribuo.protos.core.ModelDataProto other = (org.tribuo.protos.core.ModelDataProto) obj;
+
+ if (getVersion()
+ != other.getVersion()) return false;
+ if (!getClassName()
+ .equals(other.getClassName())) return false;
+ if (hasSerializedData() != other.hasSerializedData()) return false;
+ if (hasSerializedData()) {
+ if (!getSerializedData()
+ .equals(other.getSerializedData())) 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) + VERSION_FIELD_NUMBER;
+ hash = (53 * hash) + getVersion();
+ hash = (37 * hash) + CLASS_NAME_FIELD_NUMBER;
+ hash = (53 * hash) + getClassName().hashCode();
+ if (hasSerializedData()) {
+ hash = (37 * hash) + SERIALIZED_DATA_FIELD_NUMBER;
+ hash = (53 * hash) + getSerializedData().hashCode();
+ }
+ hash = (29 * hash) + unknownFields.hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static org.tribuo.protos.core.ModelDataProto parseFrom(
+ java.nio.ByteBuffer data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static org.tribuo.protos.core.ModelDataProto parseFrom(
+ java.nio.ByteBuffer data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static org.tribuo.protos.core.ModelDataProto parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static org.tribuo.protos.core.ModelDataProto 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.protos.core.ModelDataProto parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static org.tribuo.protos.core.ModelDataProto parseFrom(
+ byte[] data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static org.tribuo.protos.core.ModelDataProto parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input);
+ }
+ public static org.tribuo.protos.core.ModelDataProto 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.protos.core.ModelDataProto parseDelimitedFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseDelimitedWithIOException(PARSER, input);
+ }
+ public static org.tribuo.protos.core.ModelDataProto 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.protos.core.ModelDataProto parseFrom(
+ com.google.protobuf.CodedInputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input);
+ }
+ public static org.tribuo.protos.core.ModelDataProto 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.protos.core.ModelDataProto 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;
+ }
+ /**
+ *
+ *Model data redirection proto
+ *
+ *
+ * Protobuf type {@code tribuo.core.ModelDataProto}
+ */
+ public static final class Builder extends
+ com.google.protobuf.GeneratedMessageV3.Builder implements
+ // @@protoc_insertion_point(builder_implements:tribuo.core.ModelDataProto)
+ org.tribuo.protos.core.ModelDataProtoOrBuilder {
+ public static final com.google.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return org.tribuo.protos.core.TribuoCore.internal_static_tribuo_core_ModelDataProto_descriptor;
+ }
+
+ @java.lang.Override
+ protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return org.tribuo.protos.core.TribuoCore.internal_static_tribuo_core_ModelDataProto_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ org.tribuo.protos.core.ModelDataProto.class, org.tribuo.protos.core.ModelDataProto.Builder.class);
+ }
+
+ // Construct using org.tribuo.protos.core.ModelDataProto.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();
+ version_ = 0;
+
+ className_ = "";
+
+ if (serializedDataBuilder_ == null) {
+ serializedData_ = null;
+ } else {
+ serializedData_ = null;
+ serializedDataBuilder_ = null;
+ }
+ return this;
+ }
+
+ @java.lang.Override
+ public com.google.protobuf.Descriptors.Descriptor
+ getDescriptorForType() {
+ return org.tribuo.protos.core.TribuoCore.internal_static_tribuo_core_ModelDataProto_descriptor;
+ }
+
+ @java.lang.Override
+ public org.tribuo.protos.core.ModelDataProto getDefaultInstanceForType() {
+ return org.tribuo.protos.core.ModelDataProto.getDefaultInstance();
+ }
+
+ @java.lang.Override
+ public org.tribuo.protos.core.ModelDataProto build() {
+ org.tribuo.protos.core.ModelDataProto result = buildPartial();
+ if (!result.isInitialized()) {
+ throw newUninitializedMessageException(result);
+ }
+ return result;
+ }
+
+ @java.lang.Override
+ public org.tribuo.protos.core.ModelDataProto buildPartial() {
+ org.tribuo.protos.core.ModelDataProto result = new org.tribuo.protos.core.ModelDataProto(this);
+ result.version_ = version_;
+ result.className_ = className_;
+ if (serializedDataBuilder_ == null) {
+ result.serializedData_ = serializedData_;
+ } else {
+ result.serializedData_ = serializedDataBuilder_.build();
+ }
+ 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.protos.core.ModelDataProto) {
+ return mergeFrom((org.tribuo.protos.core.ModelDataProto)other);
+ } else {
+ super.mergeFrom(other);
+ return this;
+ }
+ }
+
+ public Builder mergeFrom(org.tribuo.protos.core.ModelDataProto other) {
+ if (other == org.tribuo.protos.core.ModelDataProto.getDefaultInstance()) return this;
+ if (other.getVersion() != 0) {
+ setVersion(other.getVersion());
+ }
+ if (!other.getClassName().isEmpty()) {
+ className_ = other.className_;
+ onChanged();
+ }
+ if (other.hasSerializedData()) {
+ mergeSerializedData(other.getSerializedData());
+ }
+ 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.protos.core.ModelDataProto parsedMessage = null;
+ try {
+ parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ parsedMessage = (org.tribuo.protos.core.ModelDataProto) e.getUnfinishedMessage();
+ throw e.unwrapIOException();
+ } finally {
+ if (parsedMessage != null) {
+ mergeFrom(parsedMessage);
+ }
+ }
+ return this;
+ }
+
+ private int version_ ;
+ /**
+ * int32 version = 1;
+ * @return The version.
+ */
+ @java.lang.Override
+ public int getVersion() {
+ return version_;
+ }
+ /**
+ * int32 version = 1;
+ * @param value The version to set.
+ * @return This builder for chaining.
+ */
+ public Builder setVersion(int value) {
+
+ version_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * int32 version = 1;
+ * @return This builder for chaining.
+ */
+ public Builder clearVersion() {
+
+ version_ = 0;
+ onChanged();
+ return this;
+ }
+
+ private java.lang.Object className_ = "";
+ /**
+ * string class_name = 2;
+ * @return The className.
+ */
+ public java.lang.String getClassName() {
+ java.lang.Object ref = className_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ className_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ * string class_name = 2;
+ * @return The bytes for className.
+ */
+ public com.google.protobuf.ByteString
+ getClassNameBytes() {
+ java.lang.Object ref = className_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ className_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ * string class_name = 2;
+ * @param value The className to set.
+ * @return This builder for chaining.
+ */
+ public Builder setClassName(
+ java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ className_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * string class_name = 2;
+ * @return This builder for chaining.
+ */
+ public Builder clearClassName() {
+
+ className_ = getDefaultInstance().getClassName();
+ onChanged();
+ return this;
+ }
+ /**
+ * string class_name = 2;
+ * @param value The bytes for className to set.
+ * @return This builder for chaining.
+ */
+ public Builder setClassNameBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ className_ = value;
+ onChanged();
+ return this;
+ }
+
+ private com.google.protobuf.Any serializedData_;
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder> serializedDataBuilder_;
+ /**
+ * .google.protobuf.Any serialized_data = 3;
+ * @return Whether the serializedData field is set.
+ */
+ public boolean hasSerializedData() {
+ return serializedDataBuilder_ != null || serializedData_ != null;
+ }
+ /**
+ * .google.protobuf.Any serialized_data = 3;
+ * @return The serializedData.
+ */
+ public com.google.protobuf.Any getSerializedData() {
+ if (serializedDataBuilder_ == null) {
+ return serializedData_ == null ? com.google.protobuf.Any.getDefaultInstance() : serializedData_;
+ } else {
+ return serializedDataBuilder_.getMessage();
+ }
+ }
+ /**
+ * .google.protobuf.Any serialized_data = 3;
+ */
+ public Builder setSerializedData(com.google.protobuf.Any value) {
+ if (serializedDataBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ serializedData_ = value;
+ onChanged();
+ } else {
+ serializedDataBuilder_.setMessage(value);
+ }
+
+ return this;
+ }
+ /**
+ * .google.protobuf.Any serialized_data = 3;
+ */
+ public Builder setSerializedData(
+ com.google.protobuf.Any.Builder builderForValue) {
+ if (serializedDataBuilder_ == null) {
+ serializedData_ = builderForValue.build();
+ onChanged();
+ } else {
+ serializedDataBuilder_.setMessage(builderForValue.build());
+ }
+
+ return this;
+ }
+ /**
+ * .google.protobuf.Any serialized_data = 3;
+ */
+ public Builder mergeSerializedData(com.google.protobuf.Any value) {
+ if (serializedDataBuilder_ == null) {
+ if (serializedData_ != null) {
+ serializedData_ =
+ com.google.protobuf.Any.newBuilder(serializedData_).mergeFrom(value).buildPartial();
+ } else {
+ serializedData_ = value;
+ }
+ onChanged();
+ } else {
+ serializedDataBuilder_.mergeFrom(value);
+ }
+
+ return this;
+ }
+ /**
+ * .google.protobuf.Any serialized_data = 3;
+ */
+ public Builder clearSerializedData() {
+ if (serializedDataBuilder_ == null) {
+ serializedData_ = null;
+ onChanged();
+ } else {
+ serializedData_ = null;
+ serializedDataBuilder_ = null;
+ }
+
+ return this;
+ }
+ /**
+ * .google.protobuf.Any serialized_data = 3;
+ */
+ public com.google.protobuf.Any.Builder getSerializedDataBuilder() {
+
+ onChanged();
+ return getSerializedDataFieldBuilder().getBuilder();
+ }
+ /**
+ * .google.protobuf.Any serialized_data = 3;
+ */
+ public com.google.protobuf.AnyOrBuilder getSerializedDataOrBuilder() {
+ if (serializedDataBuilder_ != null) {
+ return serializedDataBuilder_.getMessageOrBuilder();
+ } else {
+ return serializedData_ == null ?
+ com.google.protobuf.Any.getDefaultInstance() : serializedData_;
+ }
+ }
+ /**
+ * .google.protobuf.Any serialized_data = 3;
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder>
+ getSerializedDataFieldBuilder() {
+ if (serializedDataBuilder_ == null) {
+ serializedDataBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder>(
+ getSerializedData(),
+ getParentForChildren(),
+ isClean());
+ serializedData_ = null;
+ }
+ return serializedDataBuilder_;
+ }
+ @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.core.ModelDataProto)
+ }
+
+ // @@protoc_insertion_point(class_scope:tribuo.core.ModelDataProto)
+ private static final org.tribuo.protos.core.ModelDataProto DEFAULT_INSTANCE;
+ static {
+ DEFAULT_INSTANCE = new org.tribuo.protos.core.ModelDataProto();
+ }
+
+ public static org.tribuo.protos.core.ModelDataProto getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser
+ PARSER = new com.google.protobuf.AbstractParser() {
+ @java.lang.Override
+ public ModelDataProto parsePartialFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return new ModelDataProto(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.tribuo.protos.core.ModelDataProto getDefaultInstanceForType() {
+ return DEFAULT_INSTANCE;
+ }
+
+}
+
diff --git a/Core/src/main/java/org/tribuo/protos/core/ModelDataProtoOrBuilder.java b/Core/src/main/java/org/tribuo/protos/core/ModelDataProtoOrBuilder.java
new file mode 100644
index 000000000..9139803c7
--- /dev/null
+++ b/Core/src/main/java/org/tribuo/protos/core/ModelDataProtoOrBuilder.java
@@ -0,0 +1,42 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: tribuo-core.proto
+
+package org.tribuo.protos.core;
+
+public interface ModelDataProtoOrBuilder extends
+ // @@protoc_insertion_point(interface_extends:tribuo.core.ModelDataProto)
+ com.google.protobuf.MessageOrBuilder {
+
+ /**
+ * int32 version = 1;
+ * @return The version.
+ */
+ int getVersion();
+
+ /**
+ * string class_name = 2;
+ * @return The className.
+ */
+ java.lang.String getClassName();
+ /**
+ * string class_name = 2;
+ * @return The bytes for className.
+ */
+ com.google.protobuf.ByteString
+ getClassNameBytes();
+
+ /**
+ * .google.protobuf.Any serialized_data = 3;
+ * @return Whether the serializedData field is set.
+ */
+ boolean hasSerializedData();
+ /**
+ * .google.protobuf.Any serialized_data = 3;
+ * @return The serializedData.
+ */
+ com.google.protobuf.Any getSerializedData();
+ /**
+ * .google.protobuf.Any serialized_data = 3;
+ */
+ com.google.protobuf.AnyOrBuilder getSerializedDataOrBuilder();
+}
diff --git a/Core/src/main/java/org/tribuo/protos/core/ModelProto.java b/Core/src/main/java/org/tribuo/protos/core/ModelProto.java
new file mode 100644
index 000000000..80ff1e572
--- /dev/null
+++ b/Core/src/main/java/org/tribuo/protos/core/ModelProto.java
@@ -0,0 +1,1700 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: tribuo-core.proto
+
+package org.tribuo.protos.core;
+
+/**
+ *
+ *Base model protobuf. Contains the core model fields, along with an Any containing model specific information.
+ *
+ *
+ * Protobuf type {@code tribuo.core.ModelProto}
+ */
+public final class ModelProto extends
+ com.google.protobuf.GeneratedMessageV3 implements
+ // @@protoc_insertion_point(message_implements:tribuo.core.ModelProto)
+ ModelProtoOrBuilder {
+private static final long serialVersionUID = 0L;
+ // Use ModelProto.newBuilder() to construct.
+ private ModelProto(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
+ super(builder);
+ }
+ private ModelProto() {
+ name_ = "";
+ }
+
+ @java.lang.Override
+ @SuppressWarnings({"unused"})
+ protected java.lang.Object newInstance(
+ UnusedPrivateParameter unused) {
+ return new ModelProto();
+ }
+
+ @java.lang.Override
+ public final com.google.protobuf.UnknownFieldSet
+ getUnknownFields() {
+ return this.unknownFields;
+ }
+ private ModelProto(
+ 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: {
+
+ version_ = input.readInt32();
+ break;
+ }
+ case 18: {
+ java.lang.String s = input.readStringRequireUtf8();
+
+ name_ = s;
+ break;
+ }
+ case 26: {
+ com.oracle.labs.mlrg.olcut.config.protobuf.protos.RootProvenanceProto.Builder subBuilder = null;
+ if (provenance_ != null) {
+ subBuilder = provenance_.toBuilder();
+ }
+ provenance_ = input.readMessage(com.oracle.labs.mlrg.olcut.config.protobuf.protos.RootProvenanceProto.parser(), extensionRegistry);
+ if (subBuilder != null) {
+ subBuilder.mergeFrom(provenance_);
+ provenance_ = subBuilder.buildPartial();
+ }
+
+ break;
+ }
+ case 32: {
+
+ generateProbabilities_ = input.readBool();
+ break;
+ }
+ case 42: {
+ org.tribuo.protos.core.FeatureDomainProto.Builder subBuilder = null;
+ if (featureDomain_ != null) {
+ subBuilder = featureDomain_.toBuilder();
+ }
+ featureDomain_ = input.readMessage(org.tribuo.protos.core.FeatureDomainProto.parser(), extensionRegistry);
+ if (subBuilder != null) {
+ subBuilder.mergeFrom(featureDomain_);
+ featureDomain_ = subBuilder.buildPartial();
+ }
+
+ break;
+ }
+ case 50: {
+ org.tribuo.protos.core.OutputDomainProto.Builder subBuilder = null;
+ if (outputDomain_ != null) {
+ subBuilder = outputDomain_.toBuilder();
+ }
+ outputDomain_ = input.readMessage(org.tribuo.protos.core.OutputDomainProto.parser(), extensionRegistry);
+ if (subBuilder != null) {
+ subBuilder.mergeFrom(outputDomain_);
+ outputDomain_ = subBuilder.buildPartial();
+ }
+
+ break;
+ }
+ case 58: {
+ org.tribuo.protos.core.ModelDataProto.Builder subBuilder = null;
+ if (modelData_ != null) {
+ subBuilder = modelData_.toBuilder();
+ }
+ modelData_ = input.readMessage(org.tribuo.protos.core.ModelDataProto.parser(), extensionRegistry);
+ if (subBuilder != null) {
+ subBuilder.mergeFrom(modelData_);
+ modelData_ = subBuilder.buildPartial();
+ }
+
+ 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 {
+ this.unknownFields = unknownFields.build();
+ makeExtensionsImmutable();
+ }
+ }
+ public static final com.google.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return org.tribuo.protos.core.TribuoCore.internal_static_tribuo_core_ModelProto_descriptor;
+ }
+
+ @java.lang.Override
+ protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return org.tribuo.protos.core.TribuoCore.internal_static_tribuo_core_ModelProto_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ org.tribuo.protos.core.ModelProto.class, org.tribuo.protos.core.ModelProto.Builder.class);
+ }
+
+ public static final int VERSION_FIELD_NUMBER = 1;
+ private int version_;
+ /**
+ *
+ *Version number of the model proto
+ *
+ *
+ * int32 version = 1;
+ * @return The version.
+ */
+ @java.lang.Override
+ public int getVersion() {
+ return version_;
+ }
+
+ public static final int NAME_FIELD_NUMBER = 2;
+ private volatile java.lang.Object name_;
+ /**
+ *
+ *The model name
+ *
+ *
+ * string name = 2;
+ * @return The name.
+ */
+ @java.lang.Override
+ public java.lang.String getName() {
+ java.lang.Object ref = name_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ name_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ *The model name
+ *
+ *
+ * string name = 2;
+ * @return The bytes for name.
+ */
+ @java.lang.Override
+ public com.google.protobuf.ByteString
+ getNameBytes() {
+ java.lang.Object ref = name_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ name_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int PROVENANCE_FIELD_NUMBER = 3;
+ private com.oracle.labs.mlrg.olcut.config.protobuf.protos.RootProvenanceProto provenance_;
+ /**
+ *
+ *The model provenance
+ *
+ *
+ * .olcut.RootProvenanceProto provenance = 3;
+ * @return Whether the provenance field is set.
+ */
+ @java.lang.Override
+ public boolean hasProvenance() {
+ return provenance_ != null;
+ }
+ /**
+ *
+ *The model provenance
+ *
+ *
+ * .olcut.RootProvenanceProto provenance = 3;
+ * @return The provenance.
+ */
+ @java.lang.Override
+ public com.oracle.labs.mlrg.olcut.config.protobuf.protos.RootProvenanceProto getProvenance() {
+ return provenance_ == null ? com.oracle.labs.mlrg.olcut.config.protobuf.protos.RootProvenanceProto.getDefaultInstance() : provenance_;
+ }
+ /**
+ *
+ *The model provenance
+ *
+ *
+ * .olcut.RootProvenanceProto provenance = 3;
+ */
+ @java.lang.Override
+ public com.oracle.labs.mlrg.olcut.config.protobuf.protos.RootProvenanceProtoOrBuilder getProvenanceOrBuilder() {
+ return getProvenance();
+ }
+
+ public static final int GENERATE_PROBABILITIES_FIELD_NUMBER = 4;
+ private boolean generateProbabilities_;
+ /**
+ *
+ *Does the model generate probabilities
+ *
+ *
+ * bool generate_probabilities = 4;
+ * @return The generateProbabilities.
+ */
+ @java.lang.Override
+ public boolean getGenerateProbabilities() {
+ return generateProbabilities_;
+ }
+
+ public static final int FEATURE_DOMAIN_FIELD_NUMBER = 5;
+ private org.tribuo.protos.core.FeatureDomainProto featureDomain_;
+ /**
+ *
+ *Model feature domain
+ *
+ *
+ * .tribuo.core.FeatureDomainProto feature_domain = 5;
+ * @return Whether the featureDomain field is set.
+ */
+ @java.lang.Override
+ public boolean hasFeatureDomain() {
+ return featureDomain_ != null;
+ }
+ /**
+ *
+ *Model feature domain
+ *
+ *
+ * .tribuo.core.FeatureDomainProto feature_domain = 5;
+ * @return The featureDomain.
+ */
+ @java.lang.Override
+ public org.tribuo.protos.core.FeatureDomainProto getFeatureDomain() {
+ return featureDomain_ == null ? org.tribuo.protos.core.FeatureDomainProto.getDefaultInstance() : featureDomain_;
+ }
+ /**
+ *
+ *Model feature domain
+ *
+ *
+ * .tribuo.core.FeatureDomainProto feature_domain = 5;
+ */
+ @java.lang.Override
+ public org.tribuo.protos.core.FeatureDomainProtoOrBuilder getFeatureDomainOrBuilder() {
+ return getFeatureDomain();
+ }
+
+ public static final int OUTPUT_DOMAIN_FIELD_NUMBER = 6;
+ private org.tribuo.protos.core.OutputDomainProto outputDomain_;
+ /**
+ *
+ *Model output domain
+ *
+ *
+ * .tribuo.core.OutputDomainProto output_domain = 6;
+ * @return Whether the outputDomain field is set.
+ */
+ @java.lang.Override
+ public boolean hasOutputDomain() {
+ return outputDomain_ != null;
+ }
+ /**
+ *
+ *Model output domain
+ *
+ *
+ * .tribuo.core.OutputDomainProto output_domain = 6;
+ * @return The outputDomain.
+ */
+ @java.lang.Override
+ public org.tribuo.protos.core.OutputDomainProto getOutputDomain() {
+ return outputDomain_ == null ? org.tribuo.protos.core.OutputDomainProto.getDefaultInstance() : outputDomain_;
+ }
+ /**
+ *
+ *Model output domain
+ *
+ *
+ * .tribuo.core.OutputDomainProto output_domain = 6;
+ */
+ @java.lang.Override
+ public org.tribuo.protos.core.OutputDomainProtoOrBuilder getOutputDomainOrBuilder() {
+ return getOutputDomain();
+ }
+
+ public static final int MODEL_DATA_FIELD_NUMBER = 7;
+ private org.tribuo.protos.core.ModelDataProto modelData_;
+ /**
+ *
+ *Model data
+ *
+ *
+ * .tribuo.core.ModelDataProto model_data = 7;
+ * @return Whether the modelData field is set.
+ */
+ @java.lang.Override
+ public boolean hasModelData() {
+ return modelData_ != null;
+ }
+ /**
+ *
+ *Model data
+ *
+ *
+ * .tribuo.core.ModelDataProto model_data = 7;
+ * @return The modelData.
+ */
+ @java.lang.Override
+ public org.tribuo.protos.core.ModelDataProto getModelData() {
+ return modelData_ == null ? org.tribuo.protos.core.ModelDataProto.getDefaultInstance() : modelData_;
+ }
+ /**
+ *
+ *Model data
+ *
+ *
+ * .tribuo.core.ModelDataProto model_data = 7;
+ */
+ @java.lang.Override
+ public org.tribuo.protos.core.ModelDataProtoOrBuilder getModelDataOrBuilder() {
+ return getModelData();
+ }
+
+ 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 (version_ != 0) {
+ output.writeInt32(1, version_);
+ }
+ if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 2, name_);
+ }
+ if (provenance_ != null) {
+ output.writeMessage(3, getProvenance());
+ }
+ if (generateProbabilities_ != false) {
+ output.writeBool(4, generateProbabilities_);
+ }
+ if (featureDomain_ != null) {
+ output.writeMessage(5, getFeatureDomain());
+ }
+ if (outputDomain_ != null) {
+ output.writeMessage(6, getOutputDomain());
+ }
+ if (modelData_ != null) {
+ output.writeMessage(7, getModelData());
+ }
+ unknownFields.writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (version_ != 0) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeInt32Size(1, version_);
+ }
+ if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, name_);
+ }
+ if (provenance_ != null) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeMessageSize(3, getProvenance());
+ }
+ if (generateProbabilities_ != false) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeBoolSize(4, generateProbabilities_);
+ }
+ if (featureDomain_ != null) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeMessageSize(5, getFeatureDomain());
+ }
+ if (outputDomain_ != null) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeMessageSize(6, getOutputDomain());
+ }
+ if (modelData_ != null) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeMessageSize(7, getModelData());
+ }
+ 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.protos.core.ModelProto)) {
+ return super.equals(obj);
+ }
+ org.tribuo.protos.core.ModelProto other = (org.tribuo.protos.core.ModelProto) obj;
+
+ if (getVersion()
+ != other.getVersion()) return false;
+ if (!getName()
+ .equals(other.getName())) return false;
+ if (hasProvenance() != other.hasProvenance()) return false;
+ if (hasProvenance()) {
+ if (!getProvenance()
+ .equals(other.getProvenance())) return false;
+ }
+ if (getGenerateProbabilities()
+ != other.getGenerateProbabilities()) return false;
+ if (hasFeatureDomain() != other.hasFeatureDomain()) return false;
+ if (hasFeatureDomain()) {
+ if (!getFeatureDomain()
+ .equals(other.getFeatureDomain())) return false;
+ }
+ if (hasOutputDomain() != other.hasOutputDomain()) return false;
+ if (hasOutputDomain()) {
+ if (!getOutputDomain()
+ .equals(other.getOutputDomain())) return false;
+ }
+ if (hasModelData() != other.hasModelData()) return false;
+ if (hasModelData()) {
+ if (!getModelData()
+ .equals(other.getModelData())) 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) + VERSION_FIELD_NUMBER;
+ hash = (53 * hash) + getVersion();
+ hash = (37 * hash) + NAME_FIELD_NUMBER;
+ hash = (53 * hash) + getName().hashCode();
+ if (hasProvenance()) {
+ hash = (37 * hash) + PROVENANCE_FIELD_NUMBER;
+ hash = (53 * hash) + getProvenance().hashCode();
+ }
+ hash = (37 * hash) + GENERATE_PROBABILITIES_FIELD_NUMBER;
+ hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
+ getGenerateProbabilities());
+ if (hasFeatureDomain()) {
+ hash = (37 * hash) + FEATURE_DOMAIN_FIELD_NUMBER;
+ hash = (53 * hash) + getFeatureDomain().hashCode();
+ }
+ if (hasOutputDomain()) {
+ hash = (37 * hash) + OUTPUT_DOMAIN_FIELD_NUMBER;
+ hash = (53 * hash) + getOutputDomain().hashCode();
+ }
+ if (hasModelData()) {
+ hash = (37 * hash) + MODEL_DATA_FIELD_NUMBER;
+ hash = (53 * hash) + getModelData().hashCode();
+ }
+ hash = (29 * hash) + unknownFields.hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static org.tribuo.protos.core.ModelProto parseFrom(
+ java.nio.ByteBuffer data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static org.tribuo.protos.core.ModelProto parseFrom(
+ java.nio.ByteBuffer data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static org.tribuo.protos.core.ModelProto parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static org.tribuo.protos.core.ModelProto 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.protos.core.ModelProto parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static org.tribuo.protos.core.ModelProto parseFrom(
+ byte[] data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static org.tribuo.protos.core.ModelProto parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input);
+ }
+ public static org.tribuo.protos.core.ModelProto 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.protos.core.ModelProto parseDelimitedFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseDelimitedWithIOException(PARSER, input);
+ }
+ public static org.tribuo.protos.core.ModelProto 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.protos.core.ModelProto parseFrom(
+ com.google.protobuf.CodedInputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input);
+ }
+ public static org.tribuo.protos.core.ModelProto 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.protos.core.ModelProto 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;
+ }
+ /**
+ *
+ *Base model protobuf. Contains the core model fields, along with an Any containing model specific information.
+ *
+ *
+ * Protobuf type {@code tribuo.core.ModelProto}
+ */
+ public static final class Builder extends
+ com.google.protobuf.GeneratedMessageV3.Builder implements
+ // @@protoc_insertion_point(builder_implements:tribuo.core.ModelProto)
+ org.tribuo.protos.core.ModelProtoOrBuilder {
+ public static final com.google.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return org.tribuo.protos.core.TribuoCore.internal_static_tribuo_core_ModelProto_descriptor;
+ }
+
+ @java.lang.Override
+ protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return org.tribuo.protos.core.TribuoCore.internal_static_tribuo_core_ModelProto_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ org.tribuo.protos.core.ModelProto.class, org.tribuo.protos.core.ModelProto.Builder.class);
+ }
+
+ // Construct using org.tribuo.protos.core.ModelProto.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();
+ version_ = 0;
+
+ name_ = "";
+
+ if (provenanceBuilder_ == null) {
+ provenance_ = null;
+ } else {
+ provenance_ = null;
+ provenanceBuilder_ = null;
+ }
+ generateProbabilities_ = false;
+
+ if (featureDomainBuilder_ == null) {
+ featureDomain_ = null;
+ } else {
+ featureDomain_ = null;
+ featureDomainBuilder_ = null;
+ }
+ if (outputDomainBuilder_ == null) {
+ outputDomain_ = null;
+ } else {
+ outputDomain_ = null;
+ outputDomainBuilder_ = null;
+ }
+ if (modelDataBuilder_ == null) {
+ modelData_ = null;
+ } else {
+ modelData_ = null;
+ modelDataBuilder_ = null;
+ }
+ return this;
+ }
+
+ @java.lang.Override
+ public com.google.protobuf.Descriptors.Descriptor
+ getDescriptorForType() {
+ return org.tribuo.protos.core.TribuoCore.internal_static_tribuo_core_ModelProto_descriptor;
+ }
+
+ @java.lang.Override
+ public org.tribuo.protos.core.ModelProto getDefaultInstanceForType() {
+ return org.tribuo.protos.core.ModelProto.getDefaultInstance();
+ }
+
+ @java.lang.Override
+ public org.tribuo.protos.core.ModelProto build() {
+ org.tribuo.protos.core.ModelProto result = buildPartial();
+ if (!result.isInitialized()) {
+ throw newUninitializedMessageException(result);
+ }
+ return result;
+ }
+
+ @java.lang.Override
+ public org.tribuo.protos.core.ModelProto buildPartial() {
+ org.tribuo.protos.core.ModelProto result = new org.tribuo.protos.core.ModelProto(this);
+ result.version_ = version_;
+ result.name_ = name_;
+ if (provenanceBuilder_ == null) {
+ result.provenance_ = provenance_;
+ } else {
+ result.provenance_ = provenanceBuilder_.build();
+ }
+ result.generateProbabilities_ = generateProbabilities_;
+ if (featureDomainBuilder_ == null) {
+ result.featureDomain_ = featureDomain_;
+ } else {
+ result.featureDomain_ = featureDomainBuilder_.build();
+ }
+ if (outputDomainBuilder_ == null) {
+ result.outputDomain_ = outputDomain_;
+ } else {
+ result.outputDomain_ = outputDomainBuilder_.build();
+ }
+ if (modelDataBuilder_ == null) {
+ result.modelData_ = modelData_;
+ } else {
+ result.modelData_ = modelDataBuilder_.build();
+ }
+ 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.protos.core.ModelProto) {
+ return mergeFrom((org.tribuo.protos.core.ModelProto)other);
+ } else {
+ super.mergeFrom(other);
+ return this;
+ }
+ }
+
+ public Builder mergeFrom(org.tribuo.protos.core.ModelProto other) {
+ if (other == org.tribuo.protos.core.ModelProto.getDefaultInstance()) return this;
+ if (other.getVersion() != 0) {
+ setVersion(other.getVersion());
+ }
+ if (!other.getName().isEmpty()) {
+ name_ = other.name_;
+ onChanged();
+ }
+ if (other.hasProvenance()) {
+ mergeProvenance(other.getProvenance());
+ }
+ if (other.getGenerateProbabilities() != false) {
+ setGenerateProbabilities(other.getGenerateProbabilities());
+ }
+ if (other.hasFeatureDomain()) {
+ mergeFeatureDomain(other.getFeatureDomain());
+ }
+ if (other.hasOutputDomain()) {
+ mergeOutputDomain(other.getOutputDomain());
+ }
+ if (other.hasModelData()) {
+ mergeModelData(other.getModelData());
+ }
+ 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.protos.core.ModelProto parsedMessage = null;
+ try {
+ parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ parsedMessage = (org.tribuo.protos.core.ModelProto) e.getUnfinishedMessage();
+ throw e.unwrapIOException();
+ } finally {
+ if (parsedMessage != null) {
+ mergeFrom(parsedMessage);
+ }
+ }
+ return this;
+ }
+
+ private int version_ ;
+ /**
+ *
+ *Version number of the model proto
+ *
+ *
+ * int32 version = 1;
+ * @return The version.
+ */
+ @java.lang.Override
+ public int getVersion() {
+ return version_;
+ }
+ /**
+ *
+ *Version number of the model proto
+ *
+ *
+ * int32 version = 1;
+ * @param value The version to set.
+ * @return This builder for chaining.
+ */
+ public Builder setVersion(int value) {
+
+ version_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *Version number of the model proto
+ *
+ *
+ * int32 version = 1;
+ * @return This builder for chaining.
+ */
+ public Builder clearVersion() {
+
+ version_ = 0;
+ onChanged();
+ return this;
+ }
+
+ private java.lang.Object name_ = "";
+ /**
+ *
+ *The model name
+ *
+ *
+ * string name = 2;
+ * @return The name.
+ */
+ public java.lang.String getName() {
+ java.lang.Object ref = name_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ name_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ *The model name
+ *
+ *
+ * string name = 2;
+ * @return The bytes for name.
+ */
+ public com.google.protobuf.ByteString
+ getNameBytes() {
+ java.lang.Object ref = name_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ name_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ *The model name
+ *
+ *
+ * string name = 2;
+ * @param value The name to set.
+ * @return This builder for chaining.
+ */
+ public Builder setName(
+ java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ name_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *The model name
+ *
+ *
+ * string name = 2;
+ * @return This builder for chaining.
+ */
+ public Builder clearName() {
+
+ name_ = getDefaultInstance().getName();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *The model name
+ *
+ *
+ * string name = 2;
+ * @param value The bytes for name to set.
+ * @return This builder for chaining.
+ */
+ public Builder setNameBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ name_ = value;
+ onChanged();
+ return this;
+ }
+
+ private com.oracle.labs.mlrg.olcut.config.protobuf.protos.RootProvenanceProto provenance_;
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.oracle.labs.mlrg.olcut.config.protobuf.protos.RootProvenanceProto, com.oracle.labs.mlrg.olcut.config.protobuf.protos.RootProvenanceProto.Builder, com.oracle.labs.mlrg.olcut.config.protobuf.protos.RootProvenanceProtoOrBuilder> provenanceBuilder_;
+ /**
+ *
+ *The model provenance
+ *
+ *
+ * .olcut.RootProvenanceProto provenance = 3;
+ * @return Whether the provenance field is set.
+ */
+ public boolean hasProvenance() {
+ return provenanceBuilder_ != null || provenance_ != null;
+ }
+ /**
+ *
+ *The model provenance
+ *
+ *
+ * .olcut.RootProvenanceProto provenance = 3;
+ * @return The provenance.
+ */
+ public com.oracle.labs.mlrg.olcut.config.protobuf.protos.RootProvenanceProto getProvenance() {
+ if (provenanceBuilder_ == null) {
+ return provenance_ == null ? com.oracle.labs.mlrg.olcut.config.protobuf.protos.RootProvenanceProto.getDefaultInstance() : provenance_;
+ } else {
+ return provenanceBuilder_.getMessage();
+ }
+ }
+ /**
+ *
+ *The model provenance
+ *
+ *
+ * .olcut.RootProvenanceProto provenance = 3;
+ */
+ public Builder setProvenance(com.oracle.labs.mlrg.olcut.config.protobuf.protos.RootProvenanceProto value) {
+ if (provenanceBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ provenance_ = value;
+ onChanged();
+ } else {
+ provenanceBuilder_.setMessage(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *The model provenance
+ *
+ *
+ * .olcut.RootProvenanceProto provenance = 3;
+ */
+ public Builder setProvenance(
+ com.oracle.labs.mlrg.olcut.config.protobuf.protos.RootProvenanceProto.Builder builderForValue) {
+ if (provenanceBuilder_ == null) {
+ provenance_ = builderForValue.build();
+ onChanged();
+ } else {
+ provenanceBuilder_.setMessage(builderForValue.build());
+ }
+
+ return this;
+ }
+ /**
+ *
+ *The model provenance
+ *
+ *
+ * .olcut.RootProvenanceProto provenance = 3;
+ */
+ public Builder mergeProvenance(com.oracle.labs.mlrg.olcut.config.protobuf.protos.RootProvenanceProto value) {
+ if (provenanceBuilder_ == null) {
+ if (provenance_ != null) {
+ provenance_ =
+ com.oracle.labs.mlrg.olcut.config.protobuf.protos.RootProvenanceProto.newBuilder(provenance_).mergeFrom(value).buildPartial();
+ } else {
+ provenance_ = value;
+ }
+ onChanged();
+ } else {
+ provenanceBuilder_.mergeFrom(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *The model provenance
+ *
+ *
+ * .olcut.RootProvenanceProto provenance = 3;
+ */
+ public Builder clearProvenance() {
+ if (provenanceBuilder_ == null) {
+ provenance_ = null;
+ onChanged();
+ } else {
+ provenance_ = null;
+ provenanceBuilder_ = null;
+ }
+
+ return this;
+ }
+ /**
+ *
+ *The model provenance
+ *
+ *
+ * .olcut.RootProvenanceProto provenance = 3;
+ */
+ public com.oracle.labs.mlrg.olcut.config.protobuf.protos.RootProvenanceProto.Builder getProvenanceBuilder() {
+
+ onChanged();
+ return getProvenanceFieldBuilder().getBuilder();
+ }
+ /**
+ *
+ *The model provenance
+ *
+ *
+ * .olcut.RootProvenanceProto provenance = 3;
+ */
+ public com.oracle.labs.mlrg.olcut.config.protobuf.protos.RootProvenanceProtoOrBuilder getProvenanceOrBuilder() {
+ if (provenanceBuilder_ != null) {
+ return provenanceBuilder_.getMessageOrBuilder();
+ } else {
+ return provenance_ == null ?
+ com.oracle.labs.mlrg.olcut.config.protobuf.protos.RootProvenanceProto.getDefaultInstance() : provenance_;
+ }
+ }
+ /**
+ *
+ *The model provenance
+ *
+ *
+ * .olcut.RootProvenanceProto provenance = 3;
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.oracle.labs.mlrg.olcut.config.protobuf.protos.RootProvenanceProto, com.oracle.labs.mlrg.olcut.config.protobuf.protos.RootProvenanceProto.Builder, com.oracle.labs.mlrg.olcut.config.protobuf.protos.RootProvenanceProtoOrBuilder>
+ getProvenanceFieldBuilder() {
+ if (provenanceBuilder_ == null) {
+ provenanceBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
+ com.oracle.labs.mlrg.olcut.config.protobuf.protos.RootProvenanceProto, com.oracle.labs.mlrg.olcut.config.protobuf.protos.RootProvenanceProto.Builder, com.oracle.labs.mlrg.olcut.config.protobuf.protos.RootProvenanceProtoOrBuilder>(
+ getProvenance(),
+ getParentForChildren(),
+ isClean());
+ provenance_ = null;
+ }
+ return provenanceBuilder_;
+ }
+
+ private boolean generateProbabilities_ ;
+ /**
+ *
+ *Does the model generate probabilities
+ *
+ *
+ * bool generate_probabilities = 4;
+ * @return The generateProbabilities.
+ */
+ @java.lang.Override
+ public boolean getGenerateProbabilities() {
+ return generateProbabilities_;
+ }
+ /**
+ *
+ *Does the model generate probabilities
+ *
+ *
+ * bool generate_probabilities = 4;
+ * @param value The generateProbabilities to set.
+ * @return This builder for chaining.
+ */
+ public Builder setGenerateProbabilities(boolean value) {
+
+ generateProbabilities_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *Does the model generate probabilities
+ *
+ *
+ * bool generate_probabilities = 4;
+ * @return This builder for chaining.
+ */
+ public Builder clearGenerateProbabilities() {
+
+ generateProbabilities_ = false;
+ onChanged();
+ return this;
+ }
+
+ private org.tribuo.protos.core.FeatureDomainProto featureDomain_;
+ private com.google.protobuf.SingleFieldBuilderV3<
+ org.tribuo.protos.core.FeatureDomainProto, org.tribuo.protos.core.FeatureDomainProto.Builder, org.tribuo.protos.core.FeatureDomainProtoOrBuilder> featureDomainBuilder_;
+ /**
+ *
+ *Model feature domain
+ *
+ *
+ * .tribuo.core.FeatureDomainProto feature_domain = 5;
+ * @return Whether the featureDomain field is set.
+ */
+ public boolean hasFeatureDomain() {
+ return featureDomainBuilder_ != null || featureDomain_ != null;
+ }
+ /**
+ *
+ *Model feature domain
+ *
+ *
+ * .tribuo.core.FeatureDomainProto feature_domain = 5;
+ * @return The featureDomain.
+ */
+ public org.tribuo.protos.core.FeatureDomainProto getFeatureDomain() {
+ if (featureDomainBuilder_ == null) {
+ return featureDomain_ == null ? org.tribuo.protos.core.FeatureDomainProto.getDefaultInstance() : featureDomain_;
+ } else {
+ return featureDomainBuilder_.getMessage();
+ }
+ }
+ /**
+ *
+ *Model feature domain
+ *
+ *
+ * .tribuo.core.FeatureDomainProto feature_domain = 5;
+ */
+ public Builder setFeatureDomain(org.tribuo.protos.core.FeatureDomainProto value) {
+ if (featureDomainBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ featureDomain_ = value;
+ onChanged();
+ } else {
+ featureDomainBuilder_.setMessage(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *Model feature domain
+ *
+ *
+ * .tribuo.core.FeatureDomainProto feature_domain = 5;
+ */
+ public Builder setFeatureDomain(
+ org.tribuo.protos.core.FeatureDomainProto.Builder builderForValue) {
+ if (featureDomainBuilder_ == null) {
+ featureDomain_ = builderForValue.build();
+ onChanged();
+ } else {
+ featureDomainBuilder_.setMessage(builderForValue.build());
+ }
+
+ return this;
+ }
+ /**
+ *
+ *Model feature domain
+ *
+ *
+ * .tribuo.core.FeatureDomainProto feature_domain = 5;
+ */
+ public Builder mergeFeatureDomain(org.tribuo.protos.core.FeatureDomainProto value) {
+ if (featureDomainBuilder_ == null) {
+ if (featureDomain_ != null) {
+ featureDomain_ =
+ org.tribuo.protos.core.FeatureDomainProto.newBuilder(featureDomain_).mergeFrom(value).buildPartial();
+ } else {
+ featureDomain_ = value;
+ }
+ onChanged();
+ } else {
+ featureDomainBuilder_.mergeFrom(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *Model feature domain
+ *
+ *
+ * .tribuo.core.FeatureDomainProto feature_domain = 5;
+ */
+ public Builder clearFeatureDomain() {
+ if (featureDomainBuilder_ == null) {
+ featureDomain_ = null;
+ onChanged();
+ } else {
+ featureDomain_ = null;
+ featureDomainBuilder_ = null;
+ }
+
+ return this;
+ }
+ /**
+ *
+ *Model feature domain
+ *
+ *
+ * .tribuo.core.FeatureDomainProto feature_domain = 5;
+ */
+ public org.tribuo.protos.core.FeatureDomainProto.Builder getFeatureDomainBuilder() {
+
+ onChanged();
+ return getFeatureDomainFieldBuilder().getBuilder();
+ }
+ /**
+ *
+ *Model feature domain
+ *
+ *
+ * .tribuo.core.FeatureDomainProto feature_domain = 5;
+ */
+ public org.tribuo.protos.core.FeatureDomainProtoOrBuilder getFeatureDomainOrBuilder() {
+ if (featureDomainBuilder_ != null) {
+ return featureDomainBuilder_.getMessageOrBuilder();
+ } else {
+ return featureDomain_ == null ?
+ org.tribuo.protos.core.FeatureDomainProto.getDefaultInstance() : featureDomain_;
+ }
+ }
+ /**
+ *
+ *Model feature domain
+ *
+ *
+ * .tribuo.core.FeatureDomainProto feature_domain = 5;
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ org.tribuo.protos.core.FeatureDomainProto, org.tribuo.protos.core.FeatureDomainProto.Builder, org.tribuo.protos.core.FeatureDomainProtoOrBuilder>
+ getFeatureDomainFieldBuilder() {
+ if (featureDomainBuilder_ == null) {
+ featureDomainBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
+ org.tribuo.protos.core.FeatureDomainProto, org.tribuo.protos.core.FeatureDomainProto.Builder, org.tribuo.protos.core.FeatureDomainProtoOrBuilder>(
+ getFeatureDomain(),
+ getParentForChildren(),
+ isClean());
+ featureDomain_ = null;
+ }
+ return featureDomainBuilder_;
+ }
+
+ private org.tribuo.protos.core.OutputDomainProto outputDomain_;
+ private com.google.protobuf.SingleFieldBuilderV3<
+ org.tribuo.protos.core.OutputDomainProto, org.tribuo.protos.core.OutputDomainProto.Builder, org.tribuo.protos.core.OutputDomainProtoOrBuilder> outputDomainBuilder_;
+ /**
+ *
+ *Model output domain
+ *
+ *
+ * .tribuo.core.OutputDomainProto output_domain = 6;
+ * @return Whether the outputDomain field is set.
+ */
+ public boolean hasOutputDomain() {
+ return outputDomainBuilder_ != null || outputDomain_ != null;
+ }
+ /**
+ *
+ *Model output domain
+ *
+ *
+ * .tribuo.core.OutputDomainProto output_domain = 6;
+ * @return The outputDomain.
+ */
+ public org.tribuo.protos.core.OutputDomainProto getOutputDomain() {
+ if (outputDomainBuilder_ == null) {
+ return outputDomain_ == null ? org.tribuo.protos.core.OutputDomainProto.getDefaultInstance() : outputDomain_;
+ } else {
+ return outputDomainBuilder_.getMessage();
+ }
+ }
+ /**
+ *
+ *Model output domain
+ *
+ *
+ * .tribuo.core.OutputDomainProto output_domain = 6;
+ */
+ public Builder setOutputDomain(org.tribuo.protos.core.OutputDomainProto value) {
+ if (outputDomainBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ outputDomain_ = value;
+ onChanged();
+ } else {
+ outputDomainBuilder_.setMessage(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *Model output domain
+ *
+ *
+ * .tribuo.core.OutputDomainProto output_domain = 6;
+ */
+ public Builder setOutputDomain(
+ org.tribuo.protos.core.OutputDomainProto.Builder builderForValue) {
+ if (outputDomainBuilder_ == null) {
+ outputDomain_ = builderForValue.build();
+ onChanged();
+ } else {
+ outputDomainBuilder_.setMessage(builderForValue.build());
+ }
+
+ return this;
+ }
+ /**
+ *
+ *Model output domain
+ *
+ *
+ * .tribuo.core.OutputDomainProto output_domain = 6;
+ */
+ public Builder mergeOutputDomain(org.tribuo.protos.core.OutputDomainProto value) {
+ if (outputDomainBuilder_ == null) {
+ if (outputDomain_ != null) {
+ outputDomain_ =
+ org.tribuo.protos.core.OutputDomainProto.newBuilder(outputDomain_).mergeFrom(value).buildPartial();
+ } else {
+ outputDomain_ = value;
+ }
+ onChanged();
+ } else {
+ outputDomainBuilder_.mergeFrom(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *Model output domain
+ *
+ *
+ * .tribuo.core.OutputDomainProto output_domain = 6;
+ */
+ public Builder clearOutputDomain() {
+ if (outputDomainBuilder_ == null) {
+ outputDomain_ = null;
+ onChanged();
+ } else {
+ outputDomain_ = null;
+ outputDomainBuilder_ = null;
+ }
+
+ return this;
+ }
+ /**
+ *
+ *Model output domain
+ *
+ *
+ * .tribuo.core.OutputDomainProto output_domain = 6;
+ */
+ public org.tribuo.protos.core.OutputDomainProto.Builder getOutputDomainBuilder() {
+
+ onChanged();
+ return getOutputDomainFieldBuilder().getBuilder();
+ }
+ /**
+ *
+ *Model output domain
+ *
+ *
+ * .tribuo.core.OutputDomainProto output_domain = 6;
+ */
+ public org.tribuo.protos.core.OutputDomainProtoOrBuilder getOutputDomainOrBuilder() {
+ if (outputDomainBuilder_ != null) {
+ return outputDomainBuilder_.getMessageOrBuilder();
+ } else {
+ return outputDomain_ == null ?
+ org.tribuo.protos.core.OutputDomainProto.getDefaultInstance() : outputDomain_;
+ }
+ }
+ /**
+ *
+ *Model output domain
+ *
+ *
+ * .tribuo.core.OutputDomainProto output_domain = 6;
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ org.tribuo.protos.core.OutputDomainProto, org.tribuo.protos.core.OutputDomainProto.Builder, org.tribuo.protos.core.OutputDomainProtoOrBuilder>
+ getOutputDomainFieldBuilder() {
+ if (outputDomainBuilder_ == null) {
+ outputDomainBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
+ org.tribuo.protos.core.OutputDomainProto, org.tribuo.protos.core.OutputDomainProto.Builder, org.tribuo.protos.core.OutputDomainProtoOrBuilder>(
+ getOutputDomain(),
+ getParentForChildren(),
+ isClean());
+ outputDomain_ = null;
+ }
+ return outputDomainBuilder_;
+ }
+
+ private org.tribuo.protos.core.ModelDataProto modelData_;
+ private com.google.protobuf.SingleFieldBuilderV3<
+ org.tribuo.protos.core.ModelDataProto, org.tribuo.protos.core.ModelDataProto.Builder, org.tribuo.protos.core.ModelDataProtoOrBuilder> modelDataBuilder_;
+ /**
+ *
+ *Model data
+ *
+ *
+ * .tribuo.core.ModelDataProto model_data = 7;
+ * @return Whether the modelData field is set.
+ */
+ public boolean hasModelData() {
+ return modelDataBuilder_ != null || modelData_ != null;
+ }
+ /**
+ *
+ *Model data
+ *
+ *
+ * .tribuo.core.ModelDataProto model_data = 7;
+ * @return The modelData.
+ */
+ public org.tribuo.protos.core.ModelDataProto getModelData() {
+ if (modelDataBuilder_ == null) {
+ return modelData_ == null ? org.tribuo.protos.core.ModelDataProto.getDefaultInstance() : modelData_;
+ } else {
+ return modelDataBuilder_.getMessage();
+ }
+ }
+ /**
+ *
+ *Model data
+ *
+ *
+ * .tribuo.core.ModelDataProto model_data = 7;
+ */
+ public Builder setModelData(org.tribuo.protos.core.ModelDataProto value) {
+ if (modelDataBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ modelData_ = value;
+ onChanged();
+ } else {
+ modelDataBuilder_.setMessage(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *Model data
+ *
+ *
+ * .tribuo.core.ModelDataProto model_data = 7;
+ */
+ public Builder setModelData(
+ org.tribuo.protos.core.ModelDataProto.Builder builderForValue) {
+ if (modelDataBuilder_ == null) {
+ modelData_ = builderForValue.build();
+ onChanged();
+ } else {
+ modelDataBuilder_.setMessage(builderForValue.build());
+ }
+
+ return this;
+ }
+ /**
+ *
+ *Model data
+ *
+ *
+ * .tribuo.core.ModelDataProto model_data = 7;
+ */
+ public Builder mergeModelData(org.tribuo.protos.core.ModelDataProto value) {
+ if (modelDataBuilder_ == null) {
+ if (modelData_ != null) {
+ modelData_ =
+ org.tribuo.protos.core.ModelDataProto.newBuilder(modelData_).mergeFrom(value).buildPartial();
+ } else {
+ modelData_ = value;
+ }
+ onChanged();
+ } else {
+ modelDataBuilder_.mergeFrom(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *Model data
+ *
+ *
+ * .tribuo.core.ModelDataProto model_data = 7;
+ */
+ public Builder clearModelData() {
+ if (modelDataBuilder_ == null) {
+ modelData_ = null;
+ onChanged();
+ } else {
+ modelData_ = null;
+ modelDataBuilder_ = null;
+ }
+
+ return this;
+ }
+ /**
+ *
+ *Model data
+ *
+ *
+ * .tribuo.core.ModelDataProto model_data = 7;
+ */
+ public org.tribuo.protos.core.ModelDataProto.Builder getModelDataBuilder() {
+
+ onChanged();
+ return getModelDataFieldBuilder().getBuilder();
+ }
+ /**
+ *
+ *Model data
+ *
+ *
+ * .tribuo.core.ModelDataProto model_data = 7;
+ */
+ public org.tribuo.protos.core.ModelDataProtoOrBuilder getModelDataOrBuilder() {
+ if (modelDataBuilder_ != null) {
+ return modelDataBuilder_.getMessageOrBuilder();
+ } else {
+ return modelData_ == null ?
+ org.tribuo.protos.core.ModelDataProto.getDefaultInstance() : modelData_;
+ }
+ }
+ /**
+ *
+ *Model data
+ *
+ *
+ * .tribuo.core.ModelDataProto model_data = 7;
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ org.tribuo.protos.core.ModelDataProto, org.tribuo.protos.core.ModelDataProto.Builder, org.tribuo.protos.core.ModelDataProtoOrBuilder>
+ getModelDataFieldBuilder() {
+ if (modelDataBuilder_ == null) {
+ modelDataBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
+ org.tribuo.protos.core.ModelDataProto, org.tribuo.protos.core.ModelDataProto.Builder, org.tribuo.protos.core.ModelDataProtoOrBuilder>(
+ getModelData(),
+ getParentForChildren(),
+ isClean());
+ modelData_ = null;
+ }
+ return modelDataBuilder_;
+ }
+ @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.core.ModelProto)
+ }
+
+ // @@protoc_insertion_point(class_scope:tribuo.core.ModelProto)
+ private static final org.tribuo.protos.core.ModelProto DEFAULT_INSTANCE;
+ static {
+ DEFAULT_INSTANCE = new org.tribuo.protos.core.ModelProto();
+ }
+
+ public static org.tribuo.protos.core.ModelProto getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser
+ PARSER = new com.google.protobuf.AbstractParser() {
+ @java.lang.Override
+ public ModelProto parsePartialFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return new ModelProto(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.tribuo.protos.core.ModelProto getDefaultInstanceForType() {
+ return DEFAULT_INSTANCE;
+ }
+
+}
+
diff --git a/Core/src/main/java/org/tribuo/protos/core/ModelProtoOrBuilder.java b/Core/src/main/java/org/tribuo/protos/core/ModelProtoOrBuilder.java
new file mode 100644
index 000000000..dc0dad2e1
--- /dev/null
+++ b/Core/src/main/java/org/tribuo/protos/core/ModelProtoOrBuilder.java
@@ -0,0 +1,157 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: tribuo-core.proto
+
+package org.tribuo.protos.core;
+
+public interface ModelProtoOrBuilder extends
+ // @@protoc_insertion_point(interface_extends:tribuo.core.ModelProto)
+ com.google.protobuf.MessageOrBuilder {
+
+ /**
+ *
+ *Version number of the model proto
+ *
+ *
+ * int32 version = 1;
+ * @return The version.
+ */
+ int getVersion();
+
+ /**
+ *
+ *The model name
+ *
+ *
+ * string name = 2;
+ * @return The name.
+ */
+ java.lang.String getName();
+ /**
+ *
+ *The model name
+ *
+ *
+ * string name = 2;
+ * @return The bytes for name.
+ */
+ com.google.protobuf.ByteString
+ getNameBytes();
+
+ /**
+ *
+ *The model provenance
+ *
+ *
+ * .olcut.RootProvenanceProto provenance = 3;
+ * @return Whether the provenance field is set.
+ */
+ boolean hasProvenance();
+ /**
+ *
+ *The model provenance
+ *
+ *
+ * .olcut.RootProvenanceProto provenance = 3;
+ * @return The provenance.
+ */
+ com.oracle.labs.mlrg.olcut.config.protobuf.protos.RootProvenanceProto getProvenance();
+ /**
+ *
+ *The model provenance
+ *
+ *
+ * .olcut.RootProvenanceProto provenance = 3;
+ */
+ com.oracle.labs.mlrg.olcut.config.protobuf.protos.RootProvenanceProtoOrBuilder getProvenanceOrBuilder();
+
+ /**
+ *
+ *Does the model generate probabilities
+ *
+ *
+ * bool generate_probabilities = 4;
+ * @return The generateProbabilities.
+ */
+ boolean getGenerateProbabilities();
+
+ /**
+ *
+ *Model feature domain
+ *
+ *
+ * .tribuo.core.FeatureDomainProto feature_domain = 5;
+ * @return Whether the featureDomain field is set.
+ */
+ boolean hasFeatureDomain();
+ /**
+ *
+ *Model feature domain
+ *
+ *
+ * .tribuo.core.FeatureDomainProto feature_domain = 5;
+ * @return The featureDomain.
+ */
+ org.tribuo.protos.core.FeatureDomainProto getFeatureDomain();
+ /**
+ *
+ *Model feature domain
+ *
+ *
+ * .tribuo.core.FeatureDomainProto feature_domain = 5;
+ */
+ org.tribuo.protos.core.FeatureDomainProtoOrBuilder getFeatureDomainOrBuilder();
+
+ /**
+ *
+ *Model output domain
+ *
+ *
+ * .tribuo.core.OutputDomainProto output_domain = 6;
+ * @return Whether the outputDomain field is set.
+ */
+ boolean hasOutputDomain();
+ /**
+ *
+ *Model output domain
+ *
+ *
+ * .tribuo.core.OutputDomainProto output_domain = 6;
+ * @return The outputDomain.
+ */
+ org.tribuo.protos.core.OutputDomainProto getOutputDomain();
+ /**
+ *
+ *Model output domain
+ *
+ *
+ * .tribuo.core.OutputDomainProto output_domain = 6;
+ */
+ org.tribuo.protos.core.OutputDomainProtoOrBuilder getOutputDomainOrBuilder();
+
+ /**
+ *
+ *Model data
+ *
+ *
+ * .tribuo.core.ModelDataProto model_data = 7;
+ * @return Whether the modelData field is set.
+ */
+ boolean hasModelData();
+ /**
+ *
+ *Model data
+ *
+ *
+ * .tribuo.core.ModelDataProto model_data = 7;
+ * @return The modelData.
+ */
+ org.tribuo.protos.core.ModelDataProto getModelData();
+ /**
+ *
+ *Model data
+ *
+ *
+ * .tribuo.core.ModelDataProto model_data = 7;
+ */
+ org.tribuo.protos.core.ModelDataProtoOrBuilder getModelDataOrBuilder();
+}
diff --git a/Core/src/main/java/org/tribuo/protos/core/MutableFeatureMapProto.java b/Core/src/main/java/org/tribuo/protos/core/MutableFeatureMapProto.java
new file mode 100644
index 000000000..a4e6928af
--- /dev/null
+++ b/Core/src/main/java/org/tribuo/protos/core/MutableFeatureMapProto.java
@@ -0,0 +1,845 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: tribuo-core-impl.proto
+
+package org.tribuo.protos.core;
+
+/**
+ *
+ *MutableFeatureMap proto
+ *
+ *
+ * Protobuf type {@code tribuo.core.MutableFeatureMapProto}
+ */
+public final class MutableFeatureMapProto extends
+ com.google.protobuf.GeneratedMessageV3 implements
+ // @@protoc_insertion_point(message_implements:tribuo.core.MutableFeatureMapProto)
+ MutableFeatureMapProtoOrBuilder {
+private static final long serialVersionUID = 0L;
+ // Use MutableFeatureMapProto.newBuilder() to construct.
+ private MutableFeatureMapProto(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
+ super(builder);
+ }
+ private MutableFeatureMapProto() {
+ info_ = java.util.Collections.emptyList();
+ }
+
+ @java.lang.Override
+ @SuppressWarnings({"unused"})
+ protected java.lang.Object newInstance(
+ UnusedPrivateParameter unused) {
+ return new MutableFeatureMapProto();
+ }
+
+ @java.lang.Override
+ public final com.google.protobuf.UnknownFieldSet
+ getUnknownFields() {
+ return this.unknownFields;
+ }
+ private MutableFeatureMapProto(
+ 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: {
+
+ convertHighCardinality_ = input.readBool();
+ break;
+ }
+ case 18: {
+ if (!((mutable_bitField0_ & 0x00000001) != 0)) {
+ info_ = new java.util.ArrayList();
+ mutable_bitField0_ |= 0x00000001;
+ }
+ info_.add(
+ input.readMessage(org.tribuo.protos.core.VariableInfoProto.parser(), extensionRegistry));
+ 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)) {
+ info_ = java.util.Collections.unmodifiableList(info_);
+ }
+ this.unknownFields = unknownFields.build();
+ makeExtensionsImmutable();
+ }
+ }
+ public static final com.google.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return org.tribuo.protos.core.TribuoCoreImpl.internal_static_tribuo_core_MutableFeatureMapProto_descriptor;
+ }
+
+ @java.lang.Override
+ protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return org.tribuo.protos.core.TribuoCoreImpl.internal_static_tribuo_core_MutableFeatureMapProto_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ org.tribuo.protos.core.MutableFeatureMapProto.class, org.tribuo.protos.core.MutableFeatureMapProto.Builder.class);
+ }
+
+ public static final int CONVERT_HIGH_CARDINALITY_FIELD_NUMBER = 1;
+ private boolean convertHighCardinality_;
+ /**
+ * bool convert_high_cardinality = 1;
+ * @return The convertHighCardinality.
+ */
+ @java.lang.Override
+ public boolean getConvertHighCardinality() {
+ return convertHighCardinality_;
+ }
+
+ public static final int INFO_FIELD_NUMBER = 2;
+ private java.util.List info_;
+ /**
+ * repeated .tribuo.core.VariableInfoProto info = 2;
+ */
+ @java.lang.Override
+ public java.util.List getInfoList() {
+ return info_;
+ }
+ /**
+ * repeated .tribuo.core.VariableInfoProto info = 2;
+ */
+ @java.lang.Override
+ public java.util.List extends org.tribuo.protos.core.VariableInfoProtoOrBuilder>
+ getInfoOrBuilderList() {
+ return info_;
+ }
+ /**
+ * repeated .tribuo.core.VariableInfoProto info = 2;
+ */
+ @java.lang.Override
+ public int getInfoCount() {
+ return info_.size();
+ }
+ /**
+ * repeated .tribuo.core.VariableInfoProto info = 2;
+ */
+ @java.lang.Override
+ public org.tribuo.protos.core.VariableInfoProto getInfo(int index) {
+ return info_.get(index);
+ }
+ /**
+ * repeated .tribuo.core.VariableInfoProto info = 2;
+ */
+ @java.lang.Override
+ public org.tribuo.protos.core.VariableInfoProtoOrBuilder getInfoOrBuilder(
+ int index) {
+ return info_.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 (convertHighCardinality_ != false) {
+ output.writeBool(1, convertHighCardinality_);
+ }
+ for (int i = 0; i < info_.size(); i++) {
+ output.writeMessage(2, info_.get(i));
+ }
+ unknownFields.writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (convertHighCardinality_ != false) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeBoolSize(1, convertHighCardinality_);
+ }
+ for (int i = 0; i < info_.size(); i++) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeMessageSize(2, info_.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.tribuo.protos.core.MutableFeatureMapProto)) {
+ return super.equals(obj);
+ }
+ org.tribuo.protos.core.MutableFeatureMapProto other = (org.tribuo.protos.core.MutableFeatureMapProto) obj;
+
+ if (getConvertHighCardinality()
+ != other.getConvertHighCardinality()) return false;
+ if (!getInfoList()
+ .equals(other.getInfoList())) 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) + CONVERT_HIGH_CARDINALITY_FIELD_NUMBER;
+ hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
+ getConvertHighCardinality());
+ if (getInfoCount() > 0) {
+ hash = (37 * hash) + INFO_FIELD_NUMBER;
+ hash = (53 * hash) + getInfoList().hashCode();
+ }
+ hash = (29 * hash) + unknownFields.hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static org.tribuo.protos.core.MutableFeatureMapProto parseFrom(
+ java.nio.ByteBuffer data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static org.tribuo.protos.core.MutableFeatureMapProto parseFrom(
+ java.nio.ByteBuffer data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static org.tribuo.protos.core.MutableFeatureMapProto parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static org.tribuo.protos.core.MutableFeatureMapProto 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.protos.core.MutableFeatureMapProto parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static org.tribuo.protos.core.MutableFeatureMapProto parseFrom(
+ byte[] data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static org.tribuo.protos.core.MutableFeatureMapProto parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input);
+ }
+ public static org.tribuo.protos.core.MutableFeatureMapProto 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.protos.core.MutableFeatureMapProto parseDelimitedFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseDelimitedWithIOException(PARSER, input);
+ }
+ public static org.tribuo.protos.core.MutableFeatureMapProto 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.protos.core.MutableFeatureMapProto parseFrom(
+ com.google.protobuf.CodedInputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input);
+ }
+ public static org.tribuo.protos.core.MutableFeatureMapProto 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.protos.core.MutableFeatureMapProto 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;
+ }
+ /**
+ *
+ *MutableFeatureMap proto
+ *
+ *
+ * Protobuf type {@code tribuo.core.MutableFeatureMapProto}
+ */
+ public static final class Builder extends
+ com.google.protobuf.GeneratedMessageV3.Builder implements
+ // @@protoc_insertion_point(builder_implements:tribuo.core.MutableFeatureMapProto)
+ org.tribuo.protos.core.MutableFeatureMapProtoOrBuilder {
+ public static final com.google.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return org.tribuo.protos.core.TribuoCoreImpl.internal_static_tribuo_core_MutableFeatureMapProto_descriptor;
+ }
+
+ @java.lang.Override
+ protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return org.tribuo.protos.core.TribuoCoreImpl.internal_static_tribuo_core_MutableFeatureMapProto_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ org.tribuo.protos.core.MutableFeatureMapProto.class, org.tribuo.protos.core.MutableFeatureMapProto.Builder.class);
+ }
+
+ // Construct using org.tribuo.protos.core.MutableFeatureMapProto.newBuilder()
+ private Builder() {
+ maybeForceBuilderInitialization();
+ }
+
+ private Builder(
+ com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+ super(parent);
+ maybeForceBuilderInitialization();
+ }
+ private void maybeForceBuilderInitialization() {
+ if (com.google.protobuf.GeneratedMessageV3
+ .alwaysUseFieldBuilders) {
+ getInfoFieldBuilder();
+ }
+ }
+ @java.lang.Override
+ public Builder clear() {
+ super.clear();
+ convertHighCardinality_ = false;
+
+ if (infoBuilder_ == null) {
+ info_ = java.util.Collections.emptyList();
+ bitField0_ = (bitField0_ & ~0x00000001);
+ } else {
+ infoBuilder_.clear();
+ }
+ return this;
+ }
+
+ @java.lang.Override
+ public com.google.protobuf.Descriptors.Descriptor
+ getDescriptorForType() {
+ return org.tribuo.protos.core.TribuoCoreImpl.internal_static_tribuo_core_MutableFeatureMapProto_descriptor;
+ }
+
+ @java.lang.Override
+ public org.tribuo.protos.core.MutableFeatureMapProto getDefaultInstanceForType() {
+ return org.tribuo.protos.core.MutableFeatureMapProto.getDefaultInstance();
+ }
+
+ @java.lang.Override
+ public org.tribuo.protos.core.MutableFeatureMapProto build() {
+ org.tribuo.protos.core.MutableFeatureMapProto result = buildPartial();
+ if (!result.isInitialized()) {
+ throw newUninitializedMessageException(result);
+ }
+ return result;
+ }
+
+ @java.lang.Override
+ public org.tribuo.protos.core.MutableFeatureMapProto buildPartial() {
+ org.tribuo.protos.core.MutableFeatureMapProto result = new org.tribuo.protos.core.MutableFeatureMapProto(this);
+ int from_bitField0_ = bitField0_;
+ result.convertHighCardinality_ = convertHighCardinality_;
+ if (infoBuilder_ == null) {
+ if (((bitField0_ & 0x00000001) != 0)) {
+ info_ = java.util.Collections.unmodifiableList(info_);
+ bitField0_ = (bitField0_ & ~0x00000001);
+ }
+ result.info_ = info_;
+ } else {
+ result.info_ = infoBuilder_.build();
+ }
+ 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.protos.core.MutableFeatureMapProto) {
+ return mergeFrom((org.tribuo.protos.core.MutableFeatureMapProto)other);
+ } else {
+ super.mergeFrom(other);
+ return this;
+ }
+ }
+
+ public Builder mergeFrom(org.tribuo.protos.core.MutableFeatureMapProto other) {
+ if (other == org.tribuo.protos.core.MutableFeatureMapProto.getDefaultInstance()) return this;
+ if (other.getConvertHighCardinality() != false) {
+ setConvertHighCardinality(other.getConvertHighCardinality());
+ }
+ if (infoBuilder_ == null) {
+ if (!other.info_.isEmpty()) {
+ if (info_.isEmpty()) {
+ info_ = other.info_;
+ bitField0_ = (bitField0_ & ~0x00000001);
+ } else {
+ ensureInfoIsMutable();
+ info_.addAll(other.info_);
+ }
+ onChanged();
+ }
+ } else {
+ if (!other.info_.isEmpty()) {
+ if (infoBuilder_.isEmpty()) {
+ infoBuilder_.dispose();
+ infoBuilder_ = null;
+ info_ = other.info_;
+ bitField0_ = (bitField0_ & ~0x00000001);
+ infoBuilder_ =
+ com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
+ getInfoFieldBuilder() : null;
+ } else {
+ infoBuilder_.addAllMessages(other.info_);
+ }
+ }
+ }
+ 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.protos.core.MutableFeatureMapProto parsedMessage = null;
+ try {
+ parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ parsedMessage = (org.tribuo.protos.core.MutableFeatureMapProto) e.getUnfinishedMessage();
+ throw e.unwrapIOException();
+ } finally {
+ if (parsedMessage != null) {
+ mergeFrom(parsedMessage);
+ }
+ }
+ return this;
+ }
+ private int bitField0_;
+
+ private boolean convertHighCardinality_ ;
+ /**
+ * bool convert_high_cardinality = 1;
+ * @return The convertHighCardinality.
+ */
+ @java.lang.Override
+ public boolean getConvertHighCardinality() {
+ return convertHighCardinality_;
+ }
+ /**
+ * bool convert_high_cardinality = 1;
+ * @param value The convertHighCardinality to set.
+ * @return This builder for chaining.
+ */
+ public Builder setConvertHighCardinality(boolean value) {
+
+ convertHighCardinality_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * bool convert_high_cardinality = 1;
+ * @return This builder for chaining.
+ */
+ public Builder clearConvertHighCardinality() {
+
+ convertHighCardinality_ = false;
+ onChanged();
+ return this;
+ }
+
+ private java.util.List info_ =
+ java.util.Collections.emptyList();
+ private void ensureInfoIsMutable() {
+ if (!((bitField0_ & 0x00000001) != 0)) {
+ info_ = new java.util.ArrayList(info_);
+ bitField0_ |= 0x00000001;
+ }
+ }
+
+ private com.google.protobuf.RepeatedFieldBuilderV3<
+ org.tribuo.protos.core.VariableInfoProto, org.tribuo.protos.core.VariableInfoProto.Builder, org.tribuo.protos.core.VariableInfoProtoOrBuilder> infoBuilder_;
+
+ /**
+ * repeated .tribuo.core.VariableInfoProto info = 2;
+ */
+ public java.util.List getInfoList() {
+ if (infoBuilder_ == null) {
+ return java.util.Collections.unmodifiableList(info_);
+ } else {
+ return infoBuilder_.getMessageList();
+ }
+ }
+ /**
+ * repeated .tribuo.core.VariableInfoProto info = 2;
+ */
+ public int getInfoCount() {
+ if (infoBuilder_ == null) {
+ return info_.size();
+ } else {
+ return infoBuilder_.getCount();
+ }
+ }
+ /**
+ * repeated .tribuo.core.VariableInfoProto info = 2;
+ */
+ public org.tribuo.protos.core.VariableInfoProto getInfo(int index) {
+ if (infoBuilder_ == null) {
+ return info_.get(index);
+ } else {
+ return infoBuilder_.getMessage(index);
+ }
+ }
+ /**
+ * repeated .tribuo.core.VariableInfoProto info = 2;
+ */
+ public Builder setInfo(
+ int index, org.tribuo.protos.core.VariableInfoProto value) {
+ if (infoBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureInfoIsMutable();
+ info_.set(index, value);
+ onChanged();
+ } else {
+ infoBuilder_.setMessage(index, value);
+ }
+ return this;
+ }
+ /**
+ * repeated .tribuo.core.VariableInfoProto info = 2;
+ */
+ public Builder setInfo(
+ int index, org.tribuo.protos.core.VariableInfoProto.Builder builderForValue) {
+ if (infoBuilder_ == null) {
+ ensureInfoIsMutable();
+ info_.set(index, builderForValue.build());
+ onChanged();
+ } else {
+ infoBuilder_.setMessage(index, builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ * repeated .tribuo.core.VariableInfoProto info = 2;
+ */
+ public Builder addInfo(org.tribuo.protos.core.VariableInfoProto value) {
+ if (infoBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureInfoIsMutable();
+ info_.add(value);
+ onChanged();
+ } else {
+ infoBuilder_.addMessage(value);
+ }
+ return this;
+ }
+ /**
+ * repeated .tribuo.core.VariableInfoProto info = 2;
+ */
+ public Builder addInfo(
+ int index, org.tribuo.protos.core.VariableInfoProto value) {
+ if (infoBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureInfoIsMutable();
+ info_.add(index, value);
+ onChanged();
+ } else {
+ infoBuilder_.addMessage(index, value);
+ }
+ return this;
+ }
+ /**
+ * repeated .tribuo.core.VariableInfoProto info = 2;
+ */
+ public Builder addInfo(
+ org.tribuo.protos.core.VariableInfoProto.Builder builderForValue) {
+ if (infoBuilder_ == null) {
+ ensureInfoIsMutable();
+ info_.add(builderForValue.build());
+ onChanged();
+ } else {
+ infoBuilder_.addMessage(builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ * repeated .tribuo.core.VariableInfoProto info = 2;
+ */
+ public Builder addInfo(
+ int index, org.tribuo.protos.core.VariableInfoProto.Builder builderForValue) {
+ if (infoBuilder_ == null) {
+ ensureInfoIsMutable();
+ info_.add(index, builderForValue.build());
+ onChanged();
+ } else {
+ infoBuilder_.addMessage(index, builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ * repeated .tribuo.core.VariableInfoProto info = 2;
+ */
+ public Builder addAllInfo(
+ java.lang.Iterable extends org.tribuo.protos.core.VariableInfoProto> values) {
+ if (infoBuilder_ == null) {
+ ensureInfoIsMutable();
+ com.google.protobuf.AbstractMessageLite.Builder.addAll(
+ values, info_);
+ onChanged();
+ } else {
+ infoBuilder_.addAllMessages(values);
+ }
+ return this;
+ }
+ /**
+ * repeated .tribuo.core.VariableInfoProto info = 2;
+ */
+ public Builder clearInfo() {
+ if (infoBuilder_ == null) {
+ info_ = java.util.Collections.emptyList();
+ bitField0_ = (bitField0_ & ~0x00000001);
+ onChanged();
+ } else {
+ infoBuilder_.clear();
+ }
+ return this;
+ }
+ /**
+ * repeated .tribuo.core.VariableInfoProto info = 2;
+ */
+ public Builder removeInfo(int index) {
+ if (infoBuilder_ == null) {
+ ensureInfoIsMutable();
+ info_.remove(index);
+ onChanged();
+ } else {
+ infoBuilder_.remove(index);
+ }
+ return this;
+ }
+ /**
+ * repeated .tribuo.core.VariableInfoProto info = 2;
+ */
+ public org.tribuo.protos.core.VariableInfoProto.Builder getInfoBuilder(
+ int index) {
+ return getInfoFieldBuilder().getBuilder(index);
+ }
+ /**
+ * repeated .tribuo.core.VariableInfoProto info = 2;
+ */
+ public org.tribuo.protos.core.VariableInfoProtoOrBuilder getInfoOrBuilder(
+ int index) {
+ if (infoBuilder_ == null) {
+ return info_.get(index); } else {
+ return infoBuilder_.getMessageOrBuilder(index);
+ }
+ }
+ /**
+ * repeated .tribuo.core.VariableInfoProto info = 2;
+ */
+ public java.util.List extends org.tribuo.protos.core.VariableInfoProtoOrBuilder>
+ getInfoOrBuilderList() {
+ if (infoBuilder_ != null) {
+ return infoBuilder_.getMessageOrBuilderList();
+ } else {
+ return java.util.Collections.unmodifiableList(info_);
+ }
+ }
+ /**
+ * repeated .tribuo.core.VariableInfoProto info = 2;
+ */
+ public org.tribuo.protos.core.VariableInfoProto.Builder addInfoBuilder() {
+ return getInfoFieldBuilder().addBuilder(
+ org.tribuo.protos.core.VariableInfoProto.getDefaultInstance());
+ }
+ /**
+ * repeated .tribuo.core.VariableInfoProto info = 2;
+ */
+ public org.tribuo.protos.core.VariableInfoProto.Builder addInfoBuilder(
+ int index) {
+ return getInfoFieldBuilder().addBuilder(
+ index, org.tribuo.protos.core.VariableInfoProto.getDefaultInstance());
+ }
+ /**
+ * repeated .tribuo.core.VariableInfoProto info = 2;
+ */
+ public java.util.List
+ getInfoBuilderList() {
+ return getInfoFieldBuilder().getBuilderList();
+ }
+ private com.google.protobuf.RepeatedFieldBuilderV3<
+ org.tribuo.protos.core.VariableInfoProto, org.tribuo.protos.core.VariableInfoProto.Builder, org.tribuo.protos.core.VariableInfoProtoOrBuilder>
+ getInfoFieldBuilder() {
+ if (infoBuilder_ == null) {
+ infoBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
+ org.tribuo.protos.core.VariableInfoProto, org.tribuo.protos.core.VariableInfoProto.Builder, org.tribuo.protos.core.VariableInfoProtoOrBuilder>(
+ info_,
+ ((bitField0_ & 0x00000001) != 0),
+ getParentForChildren(),
+ isClean());
+ info_ = null;
+ }
+ return infoBuilder_;
+ }
+ @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.core.MutableFeatureMapProto)
+ }
+
+ // @@protoc_insertion_point(class_scope:tribuo.core.MutableFeatureMapProto)
+ private static final org.tribuo.protos.core.MutableFeatureMapProto DEFAULT_INSTANCE;
+ static {
+ DEFAULT_INSTANCE = new org.tribuo.protos.core.MutableFeatureMapProto();
+ }
+
+ public static org.tribuo.protos.core.MutableFeatureMapProto getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser
+ PARSER = new com.google.protobuf.AbstractParser() {
+ @java.lang.Override
+ public MutableFeatureMapProto parsePartialFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return new MutableFeatureMapProto(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.tribuo.protos.core.MutableFeatureMapProto getDefaultInstanceForType() {
+ return DEFAULT_INSTANCE;
+ }
+
+}
+
diff --git a/Core/src/main/java/org/tribuo/protos/core/MutableFeatureMapProtoOrBuilder.java b/Core/src/main/java/org/tribuo/protos/core/MutableFeatureMapProtoOrBuilder.java
new file mode 100644
index 000000000..666cb9b6b
--- /dev/null
+++ b/Core/src/main/java/org/tribuo/protos/core/MutableFeatureMapProtoOrBuilder.java
@@ -0,0 +1,39 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: tribuo-core-impl.proto
+
+package org.tribuo.protos.core;
+
+public interface MutableFeatureMapProtoOrBuilder extends
+ // @@protoc_insertion_point(interface_extends:tribuo.core.MutableFeatureMapProto)
+ com.google.protobuf.MessageOrBuilder {
+
+ /**
+ * bool convert_high_cardinality = 1;
+ * @return The convertHighCardinality.
+ */
+ boolean getConvertHighCardinality();
+
+ /**
+ * repeated .tribuo.core.VariableInfoProto info = 2;
+ */
+ java.util.List
+ getInfoList();
+ /**
+ * repeated .tribuo.core.VariableInfoProto info = 2;
+ */
+ org.tribuo.protos.core.VariableInfoProto getInfo(int index);
+ /**
+ * repeated .tribuo.core.VariableInfoProto info = 2;
+ */
+ int getInfoCount();
+ /**
+ * repeated .tribuo.core.VariableInfoProto info = 2;
+ */
+ java.util.List extends org.tribuo.protos.core.VariableInfoProtoOrBuilder>
+ getInfoOrBuilderList();
+ /**
+ * repeated .tribuo.core.VariableInfoProto info = 2;
+ */
+ org.tribuo.protos.core.VariableInfoProtoOrBuilder getInfoOrBuilder(
+ int index);
+}
diff --git a/Core/src/main/java/org/tribuo/protos/core/OutputDomainProto.java b/Core/src/main/java/org/tribuo/protos/core/OutputDomainProto.java
new file mode 100644
index 000000000..b64635f46
--- /dev/null
+++ b/Core/src/main/java/org/tribuo/protos/core/OutputDomainProto.java
@@ -0,0 +1,819 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: tribuo-core.proto
+
+package org.tribuo.protos.core;
+
+/**
+ *
+ *Output domain redirection proto
+ *
+ *
+ * Protobuf type {@code tribuo.core.OutputDomainProto}
+ */
+public final class OutputDomainProto extends
+ com.google.protobuf.GeneratedMessageV3 implements
+ // @@protoc_insertion_point(message_implements:tribuo.core.OutputDomainProto)
+ OutputDomainProtoOrBuilder {
+private static final long serialVersionUID = 0L;
+ // Use OutputDomainProto.newBuilder() to construct.
+ private OutputDomainProto(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
+ super(builder);
+ }
+ private OutputDomainProto() {
+ className_ = "";
+ }
+
+ @java.lang.Override
+ @SuppressWarnings({"unused"})
+ protected java.lang.Object newInstance(
+ UnusedPrivateParameter unused) {
+ return new OutputDomainProto();
+ }
+
+ @java.lang.Override
+ public final com.google.protobuf.UnknownFieldSet
+ getUnknownFields() {
+ return this.unknownFields;
+ }
+ private OutputDomainProto(
+ 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: {
+
+ version_ = input.readInt32();
+ break;
+ }
+ case 18: {
+ java.lang.String s = input.readStringRequireUtf8();
+
+ className_ = s;
+ break;
+ }
+ case 26: {
+ com.google.protobuf.Any.Builder subBuilder = null;
+ if (serializedData_ != null) {
+ subBuilder = serializedData_.toBuilder();
+ }
+ serializedData_ = input.readMessage(com.google.protobuf.Any.parser(), extensionRegistry);
+ if (subBuilder != null) {
+ subBuilder.mergeFrom(serializedData_);
+ serializedData_ = subBuilder.buildPartial();
+ }
+
+ 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 {
+ this.unknownFields = unknownFields.build();
+ makeExtensionsImmutable();
+ }
+ }
+ public static final com.google.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return org.tribuo.protos.core.TribuoCore.internal_static_tribuo_core_OutputDomainProto_descriptor;
+ }
+
+ @java.lang.Override
+ protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return org.tribuo.protos.core.TribuoCore.internal_static_tribuo_core_OutputDomainProto_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ org.tribuo.protos.core.OutputDomainProto.class, org.tribuo.protos.core.OutputDomainProto.Builder.class);
+ }
+
+ public static final int VERSION_FIELD_NUMBER = 1;
+ private int version_;
+ /**
+ * int32 version = 1;
+ * @return The version.
+ */
+ @java.lang.Override
+ public int getVersion() {
+ return version_;
+ }
+
+ public static final int CLASS_NAME_FIELD_NUMBER = 2;
+ private volatile java.lang.Object className_;
+ /**
+ * string class_name = 2;
+ * @return The className.
+ */
+ @java.lang.Override
+ public java.lang.String getClassName() {
+ java.lang.Object ref = className_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ className_ = s;
+ return s;
+ }
+ }
+ /**
+ * string class_name = 2;
+ * @return The bytes for className.
+ */
+ @java.lang.Override
+ public com.google.protobuf.ByteString
+ getClassNameBytes() {
+ java.lang.Object ref = className_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ className_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int SERIALIZED_DATA_FIELD_NUMBER = 3;
+ private com.google.protobuf.Any serializedData_;
+ /**
+ * .google.protobuf.Any serialized_data = 3;
+ * @return Whether the serializedData field is set.
+ */
+ @java.lang.Override
+ public boolean hasSerializedData() {
+ return serializedData_ != null;
+ }
+ /**
+ * .google.protobuf.Any serialized_data = 3;
+ * @return The serializedData.
+ */
+ @java.lang.Override
+ public com.google.protobuf.Any getSerializedData() {
+ return serializedData_ == null ? com.google.protobuf.Any.getDefaultInstance() : serializedData_;
+ }
+ /**
+ * .google.protobuf.Any serialized_data = 3;
+ */
+ @java.lang.Override
+ public com.google.protobuf.AnyOrBuilder getSerializedDataOrBuilder() {
+ return getSerializedData();
+ }
+
+ 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 (version_ != 0) {
+ output.writeInt32(1, version_);
+ }
+ if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(className_)) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 2, className_);
+ }
+ if (serializedData_ != null) {
+ output.writeMessage(3, getSerializedData());
+ }
+ unknownFields.writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (version_ != 0) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeInt32Size(1, version_);
+ }
+ if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(className_)) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, className_);
+ }
+ if (serializedData_ != null) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeMessageSize(3, getSerializedData());
+ }
+ 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.protos.core.OutputDomainProto)) {
+ return super.equals(obj);
+ }
+ org.tribuo.protos.core.OutputDomainProto other = (org.tribuo.protos.core.OutputDomainProto) obj;
+
+ if (getVersion()
+ != other.getVersion()) return false;
+ if (!getClassName()
+ .equals(other.getClassName())) return false;
+ if (hasSerializedData() != other.hasSerializedData()) return false;
+ if (hasSerializedData()) {
+ if (!getSerializedData()
+ .equals(other.getSerializedData())) 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) + VERSION_FIELD_NUMBER;
+ hash = (53 * hash) + getVersion();
+ hash = (37 * hash) + CLASS_NAME_FIELD_NUMBER;
+ hash = (53 * hash) + getClassName().hashCode();
+ if (hasSerializedData()) {
+ hash = (37 * hash) + SERIALIZED_DATA_FIELD_NUMBER;
+ hash = (53 * hash) + getSerializedData().hashCode();
+ }
+ hash = (29 * hash) + unknownFields.hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static org.tribuo.protos.core.OutputDomainProto parseFrom(
+ java.nio.ByteBuffer data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static org.tribuo.protos.core.OutputDomainProto parseFrom(
+ java.nio.ByteBuffer data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static org.tribuo.protos.core.OutputDomainProto parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static org.tribuo.protos.core.OutputDomainProto 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.protos.core.OutputDomainProto parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static org.tribuo.protos.core.OutputDomainProto parseFrom(
+ byte[] data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static org.tribuo.protos.core.OutputDomainProto parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input);
+ }
+ public static org.tribuo.protos.core.OutputDomainProto 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.protos.core.OutputDomainProto parseDelimitedFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseDelimitedWithIOException(PARSER, input);
+ }
+ public static org.tribuo.protos.core.OutputDomainProto 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.protos.core.OutputDomainProto parseFrom(
+ com.google.protobuf.CodedInputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input);
+ }
+ public static org.tribuo.protos.core.OutputDomainProto 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.protos.core.OutputDomainProto 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;
+ }
+ /**
+ *
+ *Output domain redirection proto
+ *
+ *
+ * Protobuf type {@code tribuo.core.OutputDomainProto}
+ */
+ public static final class Builder extends
+ com.google.protobuf.GeneratedMessageV3.Builder implements
+ // @@protoc_insertion_point(builder_implements:tribuo.core.OutputDomainProto)
+ org.tribuo.protos.core.OutputDomainProtoOrBuilder {
+ public static final com.google.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return org.tribuo.protos.core.TribuoCore.internal_static_tribuo_core_OutputDomainProto_descriptor;
+ }
+
+ @java.lang.Override
+ protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return org.tribuo.protos.core.TribuoCore.internal_static_tribuo_core_OutputDomainProto_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ org.tribuo.protos.core.OutputDomainProto.class, org.tribuo.protos.core.OutputDomainProto.Builder.class);
+ }
+
+ // Construct using org.tribuo.protos.core.OutputDomainProto.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();
+ version_ = 0;
+
+ className_ = "";
+
+ if (serializedDataBuilder_ == null) {
+ serializedData_ = null;
+ } else {
+ serializedData_ = null;
+ serializedDataBuilder_ = null;
+ }
+ return this;
+ }
+
+ @java.lang.Override
+ public com.google.protobuf.Descriptors.Descriptor
+ getDescriptorForType() {
+ return org.tribuo.protos.core.TribuoCore.internal_static_tribuo_core_OutputDomainProto_descriptor;
+ }
+
+ @java.lang.Override
+ public org.tribuo.protos.core.OutputDomainProto getDefaultInstanceForType() {
+ return org.tribuo.protos.core.OutputDomainProto.getDefaultInstance();
+ }
+
+ @java.lang.Override
+ public org.tribuo.protos.core.OutputDomainProto build() {
+ org.tribuo.protos.core.OutputDomainProto result = buildPartial();
+ if (!result.isInitialized()) {
+ throw newUninitializedMessageException(result);
+ }
+ return result;
+ }
+
+ @java.lang.Override
+ public org.tribuo.protos.core.OutputDomainProto buildPartial() {
+ org.tribuo.protos.core.OutputDomainProto result = new org.tribuo.protos.core.OutputDomainProto(this);
+ result.version_ = version_;
+ result.className_ = className_;
+ if (serializedDataBuilder_ == null) {
+ result.serializedData_ = serializedData_;
+ } else {
+ result.serializedData_ = serializedDataBuilder_.build();
+ }
+ 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.protos.core.OutputDomainProto) {
+ return mergeFrom((org.tribuo.protos.core.OutputDomainProto)other);
+ } else {
+ super.mergeFrom(other);
+ return this;
+ }
+ }
+
+ public Builder mergeFrom(org.tribuo.protos.core.OutputDomainProto other) {
+ if (other == org.tribuo.protos.core.OutputDomainProto.getDefaultInstance()) return this;
+ if (other.getVersion() != 0) {
+ setVersion(other.getVersion());
+ }
+ if (!other.getClassName().isEmpty()) {
+ className_ = other.className_;
+ onChanged();
+ }
+ if (other.hasSerializedData()) {
+ mergeSerializedData(other.getSerializedData());
+ }
+ 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.protos.core.OutputDomainProto parsedMessage = null;
+ try {
+ parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ parsedMessage = (org.tribuo.protos.core.OutputDomainProto) e.getUnfinishedMessage();
+ throw e.unwrapIOException();
+ } finally {
+ if (parsedMessage != null) {
+ mergeFrom(parsedMessage);
+ }
+ }
+ return this;
+ }
+
+ private int version_ ;
+ /**
+ * int32 version = 1;
+ * @return The version.
+ */
+ @java.lang.Override
+ public int getVersion() {
+ return version_;
+ }
+ /**
+ * int32 version = 1;
+ * @param value The version to set.
+ * @return This builder for chaining.
+ */
+ public Builder setVersion(int value) {
+
+ version_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * int32 version = 1;
+ * @return This builder for chaining.
+ */
+ public Builder clearVersion() {
+
+ version_ = 0;
+ onChanged();
+ return this;
+ }
+
+ private java.lang.Object className_ = "";
+ /**
+ * string class_name = 2;
+ * @return The className.
+ */
+ public java.lang.String getClassName() {
+ java.lang.Object ref = className_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ className_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ * string class_name = 2;
+ * @return The bytes for className.
+ */
+ public com.google.protobuf.ByteString
+ getClassNameBytes() {
+ java.lang.Object ref = className_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ className_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ * string class_name = 2;
+ * @param value The className to set.
+ * @return This builder for chaining.
+ */
+ public Builder setClassName(
+ java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ className_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * string class_name = 2;
+ * @return This builder for chaining.
+ */
+ public Builder clearClassName() {
+
+ className_ = getDefaultInstance().getClassName();
+ onChanged();
+ return this;
+ }
+ /**
+ * string class_name = 2;
+ * @param value The bytes for className to set.
+ * @return This builder for chaining.
+ */
+ public Builder setClassNameBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ className_ = value;
+ onChanged();
+ return this;
+ }
+
+ private com.google.protobuf.Any serializedData_;
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder> serializedDataBuilder_;
+ /**
+ * .google.protobuf.Any serialized_data = 3;
+ * @return Whether the serializedData field is set.
+ */
+ public boolean hasSerializedData() {
+ return serializedDataBuilder_ != null || serializedData_ != null;
+ }
+ /**
+ * .google.protobuf.Any serialized_data = 3;
+ * @return The serializedData.
+ */
+ public com.google.protobuf.Any getSerializedData() {
+ if (serializedDataBuilder_ == null) {
+ return serializedData_ == null ? com.google.protobuf.Any.getDefaultInstance() : serializedData_;
+ } else {
+ return serializedDataBuilder_.getMessage();
+ }
+ }
+ /**
+ * .google.protobuf.Any serialized_data = 3;
+ */
+ public Builder setSerializedData(com.google.protobuf.Any value) {
+ if (serializedDataBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ serializedData_ = value;
+ onChanged();
+ } else {
+ serializedDataBuilder_.setMessage(value);
+ }
+
+ return this;
+ }
+ /**
+ * .google.protobuf.Any serialized_data = 3;
+ */
+ public Builder setSerializedData(
+ com.google.protobuf.Any.Builder builderForValue) {
+ if (serializedDataBuilder_ == null) {
+ serializedData_ = builderForValue.build();
+ onChanged();
+ } else {
+ serializedDataBuilder_.setMessage(builderForValue.build());
+ }
+
+ return this;
+ }
+ /**
+ * .google.protobuf.Any serialized_data = 3;
+ */
+ public Builder mergeSerializedData(com.google.protobuf.Any value) {
+ if (serializedDataBuilder_ == null) {
+ if (serializedData_ != null) {
+ serializedData_ =
+ com.google.protobuf.Any.newBuilder(serializedData_).mergeFrom(value).buildPartial();
+ } else {
+ serializedData_ = value;
+ }
+ onChanged();
+ } else {
+ serializedDataBuilder_.mergeFrom(value);
+ }
+
+ return this;
+ }
+ /**
+ * .google.protobuf.Any serialized_data = 3;
+ */
+ public Builder clearSerializedData() {
+ if (serializedDataBuilder_ == null) {
+ serializedData_ = null;
+ onChanged();
+ } else {
+ serializedData_ = null;
+ serializedDataBuilder_ = null;
+ }
+
+ return this;
+ }
+ /**
+ * .google.protobuf.Any serialized_data = 3;
+ */
+ public com.google.protobuf.Any.Builder getSerializedDataBuilder() {
+
+ onChanged();
+ return getSerializedDataFieldBuilder().getBuilder();
+ }
+ /**
+ * .google.protobuf.Any serialized_data = 3;
+ */
+ public com.google.protobuf.AnyOrBuilder getSerializedDataOrBuilder() {
+ if (serializedDataBuilder_ != null) {
+ return serializedDataBuilder_.getMessageOrBuilder();
+ } else {
+ return serializedData_ == null ?
+ com.google.protobuf.Any.getDefaultInstance() : serializedData_;
+ }
+ }
+ /**
+ * .google.protobuf.Any serialized_data = 3;
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder>
+ getSerializedDataFieldBuilder() {
+ if (serializedDataBuilder_ == null) {
+ serializedDataBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder>(
+ getSerializedData(),
+ getParentForChildren(),
+ isClean());
+ serializedData_ = null;
+ }
+ return serializedDataBuilder_;
+ }
+ @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.core.OutputDomainProto)
+ }
+
+ // @@protoc_insertion_point(class_scope:tribuo.core.OutputDomainProto)
+ private static final org.tribuo.protos.core.OutputDomainProto DEFAULT_INSTANCE;
+ static {
+ DEFAULT_INSTANCE = new org.tribuo.protos.core.OutputDomainProto();
+ }
+
+ public static org.tribuo.protos.core.OutputDomainProto getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser
+ PARSER = new com.google.protobuf.AbstractParser() {
+ @java.lang.Override
+ public OutputDomainProto parsePartialFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return new OutputDomainProto(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.tribuo.protos.core.OutputDomainProto getDefaultInstanceForType() {
+ return DEFAULT_INSTANCE;
+ }
+
+}
+
diff --git a/Core/src/main/java/org/tribuo/protos/core/OutputDomainProtoOrBuilder.java b/Core/src/main/java/org/tribuo/protos/core/OutputDomainProtoOrBuilder.java
new file mode 100644
index 000000000..ac992a241
--- /dev/null
+++ b/Core/src/main/java/org/tribuo/protos/core/OutputDomainProtoOrBuilder.java
@@ -0,0 +1,42 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: tribuo-core.proto
+
+package org.tribuo.protos.core;
+
+public interface OutputDomainProtoOrBuilder extends
+ // @@protoc_insertion_point(interface_extends:tribuo.core.OutputDomainProto)
+ com.google.protobuf.MessageOrBuilder {
+
+ /**
+ * int32 version = 1;
+ * @return The version.
+ */
+ int getVersion();
+
+ /**
+ * string class_name = 2;
+ * @return The className.
+ */
+ java.lang.String getClassName();
+ /**
+ * string class_name = 2;
+ * @return The bytes for className.
+ */
+ com.google.protobuf.ByteString
+ getClassNameBytes();
+
+ /**
+ * .google.protobuf.Any serialized_data = 3;
+ * @return Whether the serializedData field is set.
+ */
+ boolean hasSerializedData();
+ /**
+ * .google.protobuf.Any serialized_data = 3;
+ * @return The serializedData.
+ */
+ com.google.protobuf.Any getSerializedData();
+ /**
+ * .google.protobuf.Any serialized_data = 3;
+ */
+ com.google.protobuf.AnyOrBuilder getSerializedDataOrBuilder();
+}
diff --git a/Core/src/main/java/org/tribuo/protos/core/OutputFactoryProto.java b/Core/src/main/java/org/tribuo/protos/core/OutputFactoryProto.java
new file mode 100644
index 000000000..83abc9d83
--- /dev/null
+++ b/Core/src/main/java/org/tribuo/protos/core/OutputFactoryProto.java
@@ -0,0 +1,819 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: tribuo-core.proto
+
+package org.tribuo.protos.core;
+
+/**
+ *
+ *Output Factory redirection proto
+ *
+ *
+ * Protobuf type {@code tribuo.core.OutputFactoryProto}
+ */
+public final class OutputFactoryProto extends
+ com.google.protobuf.GeneratedMessageV3 implements
+ // @@protoc_insertion_point(message_implements:tribuo.core.OutputFactoryProto)
+ OutputFactoryProtoOrBuilder {
+private static final long serialVersionUID = 0L;
+ // Use OutputFactoryProto.newBuilder() to construct.
+ private OutputFactoryProto(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
+ super(builder);
+ }
+ private OutputFactoryProto() {
+ className_ = "";
+ }
+
+ @java.lang.Override
+ @SuppressWarnings({"unused"})
+ protected java.lang.Object newInstance(
+ UnusedPrivateParameter unused) {
+ return new OutputFactoryProto();
+ }
+
+ @java.lang.Override
+ public final com.google.protobuf.UnknownFieldSet
+ getUnknownFields() {
+ return this.unknownFields;
+ }
+ private OutputFactoryProto(
+ 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: {
+
+ version_ = input.readInt32();
+ break;
+ }
+ case 18: {
+ java.lang.String s = input.readStringRequireUtf8();
+
+ className_ = s;
+ break;
+ }
+ case 26: {
+ com.google.protobuf.Any.Builder subBuilder = null;
+ if (serializedData_ != null) {
+ subBuilder = serializedData_.toBuilder();
+ }
+ serializedData_ = input.readMessage(com.google.protobuf.Any.parser(), extensionRegistry);
+ if (subBuilder != null) {
+ subBuilder.mergeFrom(serializedData_);
+ serializedData_ = subBuilder.buildPartial();
+ }
+
+ 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 {
+ this.unknownFields = unknownFields.build();
+ makeExtensionsImmutable();
+ }
+ }
+ public static final com.google.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return org.tribuo.protos.core.TribuoCore.internal_static_tribuo_core_OutputFactoryProto_descriptor;
+ }
+
+ @java.lang.Override
+ protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return org.tribuo.protos.core.TribuoCore.internal_static_tribuo_core_OutputFactoryProto_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ org.tribuo.protos.core.OutputFactoryProto.class, org.tribuo.protos.core.OutputFactoryProto.Builder.class);
+ }
+
+ public static final int VERSION_FIELD_NUMBER = 1;
+ private int version_;
+ /**
+ * int32 version = 1;
+ * @return The version.
+ */
+ @java.lang.Override
+ public int getVersion() {
+ return version_;
+ }
+
+ public static final int CLASS_NAME_FIELD_NUMBER = 2;
+ private volatile java.lang.Object className_;
+ /**
+ * string class_name = 2;
+ * @return The className.
+ */
+ @java.lang.Override
+ public java.lang.String getClassName() {
+ java.lang.Object ref = className_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ className_ = s;
+ return s;
+ }
+ }
+ /**
+ * string class_name = 2;
+ * @return The bytes for className.
+ */
+ @java.lang.Override
+ public com.google.protobuf.ByteString
+ getClassNameBytes() {
+ java.lang.Object ref = className_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ className_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int SERIALIZED_DATA_FIELD_NUMBER = 3;
+ private com.google.protobuf.Any serializedData_;
+ /**
+ * .google.protobuf.Any serialized_data = 3;
+ * @return Whether the serializedData field is set.
+ */
+ @java.lang.Override
+ public boolean hasSerializedData() {
+ return serializedData_ != null;
+ }
+ /**
+ * .google.protobuf.Any serialized_data = 3;
+ * @return The serializedData.
+ */
+ @java.lang.Override
+ public com.google.protobuf.Any getSerializedData() {
+ return serializedData_ == null ? com.google.protobuf.Any.getDefaultInstance() : serializedData_;
+ }
+ /**
+ * .google.protobuf.Any serialized_data = 3;
+ */
+ @java.lang.Override
+ public com.google.protobuf.AnyOrBuilder getSerializedDataOrBuilder() {
+ return getSerializedData();
+ }
+
+ 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 (version_ != 0) {
+ output.writeInt32(1, version_);
+ }
+ if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(className_)) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 2, className_);
+ }
+ if (serializedData_ != null) {
+ output.writeMessage(3, getSerializedData());
+ }
+ unknownFields.writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (version_ != 0) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeInt32Size(1, version_);
+ }
+ if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(className_)) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, className_);
+ }
+ if (serializedData_ != null) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeMessageSize(3, getSerializedData());
+ }
+ 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.protos.core.OutputFactoryProto)) {
+ return super.equals(obj);
+ }
+ org.tribuo.protos.core.OutputFactoryProto other = (org.tribuo.protos.core.OutputFactoryProto) obj;
+
+ if (getVersion()
+ != other.getVersion()) return false;
+ if (!getClassName()
+ .equals(other.getClassName())) return false;
+ if (hasSerializedData() != other.hasSerializedData()) return false;
+ if (hasSerializedData()) {
+ if (!getSerializedData()
+ .equals(other.getSerializedData())) 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) + VERSION_FIELD_NUMBER;
+ hash = (53 * hash) + getVersion();
+ hash = (37 * hash) + CLASS_NAME_FIELD_NUMBER;
+ hash = (53 * hash) + getClassName().hashCode();
+ if (hasSerializedData()) {
+ hash = (37 * hash) + SERIALIZED_DATA_FIELD_NUMBER;
+ hash = (53 * hash) + getSerializedData().hashCode();
+ }
+ hash = (29 * hash) + unknownFields.hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static org.tribuo.protos.core.OutputFactoryProto parseFrom(
+ java.nio.ByteBuffer data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static org.tribuo.protos.core.OutputFactoryProto parseFrom(
+ java.nio.ByteBuffer data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static org.tribuo.protos.core.OutputFactoryProto parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static org.tribuo.protos.core.OutputFactoryProto 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.protos.core.OutputFactoryProto parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static org.tribuo.protos.core.OutputFactoryProto parseFrom(
+ byte[] data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static org.tribuo.protos.core.OutputFactoryProto parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input);
+ }
+ public static org.tribuo.protos.core.OutputFactoryProto 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.protos.core.OutputFactoryProto parseDelimitedFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseDelimitedWithIOException(PARSER, input);
+ }
+ public static org.tribuo.protos.core.OutputFactoryProto 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.protos.core.OutputFactoryProto parseFrom(
+ com.google.protobuf.CodedInputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input);
+ }
+ public static org.tribuo.protos.core.OutputFactoryProto 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.protos.core.OutputFactoryProto 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;
+ }
+ /**
+ *
+ *Output Factory redirection proto
+ *
+ *
+ * Protobuf type {@code tribuo.core.OutputFactoryProto}
+ */
+ public static final class Builder extends
+ com.google.protobuf.GeneratedMessageV3.Builder implements
+ // @@protoc_insertion_point(builder_implements:tribuo.core.OutputFactoryProto)
+ org.tribuo.protos.core.OutputFactoryProtoOrBuilder {
+ public static final com.google.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return org.tribuo.protos.core.TribuoCore.internal_static_tribuo_core_OutputFactoryProto_descriptor;
+ }
+
+ @java.lang.Override
+ protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return org.tribuo.protos.core.TribuoCore.internal_static_tribuo_core_OutputFactoryProto_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ org.tribuo.protos.core.OutputFactoryProto.class, org.tribuo.protos.core.OutputFactoryProto.Builder.class);
+ }
+
+ // Construct using org.tribuo.protos.core.OutputFactoryProto.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();
+ version_ = 0;
+
+ className_ = "";
+
+ if (serializedDataBuilder_ == null) {
+ serializedData_ = null;
+ } else {
+ serializedData_ = null;
+ serializedDataBuilder_ = null;
+ }
+ return this;
+ }
+
+ @java.lang.Override
+ public com.google.protobuf.Descriptors.Descriptor
+ getDescriptorForType() {
+ return org.tribuo.protos.core.TribuoCore.internal_static_tribuo_core_OutputFactoryProto_descriptor;
+ }
+
+ @java.lang.Override
+ public org.tribuo.protos.core.OutputFactoryProto getDefaultInstanceForType() {
+ return org.tribuo.protos.core.OutputFactoryProto.getDefaultInstance();
+ }
+
+ @java.lang.Override
+ public org.tribuo.protos.core.OutputFactoryProto build() {
+ org.tribuo.protos.core.OutputFactoryProto result = buildPartial();
+ if (!result.isInitialized()) {
+ throw newUninitializedMessageException(result);
+ }
+ return result;
+ }
+
+ @java.lang.Override
+ public org.tribuo.protos.core.OutputFactoryProto buildPartial() {
+ org.tribuo.protos.core.OutputFactoryProto result = new org.tribuo.protos.core.OutputFactoryProto(this);
+ result.version_ = version_;
+ result.className_ = className_;
+ if (serializedDataBuilder_ == null) {
+ result.serializedData_ = serializedData_;
+ } else {
+ result.serializedData_ = serializedDataBuilder_.build();
+ }
+ 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.protos.core.OutputFactoryProto) {
+ return mergeFrom((org.tribuo.protos.core.OutputFactoryProto)other);
+ } else {
+ super.mergeFrom(other);
+ return this;
+ }
+ }
+
+ public Builder mergeFrom(org.tribuo.protos.core.OutputFactoryProto other) {
+ if (other == org.tribuo.protos.core.OutputFactoryProto.getDefaultInstance()) return this;
+ if (other.getVersion() != 0) {
+ setVersion(other.getVersion());
+ }
+ if (!other.getClassName().isEmpty()) {
+ className_ = other.className_;
+ onChanged();
+ }
+ if (other.hasSerializedData()) {
+ mergeSerializedData(other.getSerializedData());
+ }
+ 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.protos.core.OutputFactoryProto parsedMessage = null;
+ try {
+ parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ parsedMessage = (org.tribuo.protos.core.OutputFactoryProto) e.getUnfinishedMessage();
+ throw e.unwrapIOException();
+ } finally {
+ if (parsedMessage != null) {
+ mergeFrom(parsedMessage);
+ }
+ }
+ return this;
+ }
+
+ private int version_ ;
+ /**
+ * int32 version = 1;
+ * @return The version.
+ */
+ @java.lang.Override
+ public int getVersion() {
+ return version_;
+ }
+ /**
+ * int32 version = 1;
+ * @param value The version to set.
+ * @return This builder for chaining.
+ */
+ public Builder setVersion(int value) {
+
+ version_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * int32 version = 1;
+ * @return This builder for chaining.
+ */
+ public Builder clearVersion() {
+
+ version_ = 0;
+ onChanged();
+ return this;
+ }
+
+ private java.lang.Object className_ = "";
+ /**
+ * string class_name = 2;
+ * @return The className.
+ */
+ public java.lang.String getClassName() {
+ java.lang.Object ref = className_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ className_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ * string class_name = 2;
+ * @return The bytes for className.
+ */
+ public com.google.protobuf.ByteString
+ getClassNameBytes() {
+ java.lang.Object ref = className_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ className_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ * string class_name = 2;
+ * @param value The className to set.
+ * @return This builder for chaining.
+ */
+ public Builder setClassName(
+ java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ className_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * string class_name = 2;
+ * @return This builder for chaining.
+ */
+ public Builder clearClassName() {
+
+ className_ = getDefaultInstance().getClassName();
+ onChanged();
+ return this;
+ }
+ /**
+ * string class_name = 2;
+ * @param value The bytes for className to set.
+ * @return This builder for chaining.
+ */
+ public Builder setClassNameBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ className_ = value;
+ onChanged();
+ return this;
+ }
+
+ private com.google.protobuf.Any serializedData_;
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder> serializedDataBuilder_;
+ /**
+ * .google.protobuf.Any serialized_data = 3;
+ * @return Whether the serializedData field is set.
+ */
+ public boolean hasSerializedData() {
+ return serializedDataBuilder_ != null || serializedData_ != null;
+ }
+ /**
+ * .google.protobuf.Any serialized_data = 3;
+ * @return The serializedData.
+ */
+ public com.google.protobuf.Any getSerializedData() {
+ if (serializedDataBuilder_ == null) {
+ return serializedData_ == null ? com.google.protobuf.Any.getDefaultInstance() : serializedData_;
+ } else {
+ return serializedDataBuilder_.getMessage();
+ }
+ }
+ /**
+ * .google.protobuf.Any serialized_data = 3;
+ */
+ public Builder setSerializedData(com.google.protobuf.Any value) {
+ if (serializedDataBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ serializedData_ = value;
+ onChanged();
+ } else {
+ serializedDataBuilder_.setMessage(value);
+ }
+
+ return this;
+ }
+ /**
+ * .google.protobuf.Any serialized_data = 3;
+ */
+ public Builder setSerializedData(
+ com.google.protobuf.Any.Builder builderForValue) {
+ if (serializedDataBuilder_ == null) {
+ serializedData_ = builderForValue.build();
+ onChanged();
+ } else {
+ serializedDataBuilder_.setMessage(builderForValue.build());
+ }
+
+ return this;
+ }
+ /**
+ * .google.protobuf.Any serialized_data = 3;
+ */
+ public Builder mergeSerializedData(com.google.protobuf.Any value) {
+ if (serializedDataBuilder_ == null) {
+ if (serializedData_ != null) {
+ serializedData_ =
+ com.google.protobuf.Any.newBuilder(serializedData_).mergeFrom(value).buildPartial();
+ } else {
+ serializedData_ = value;
+ }
+ onChanged();
+ } else {
+ serializedDataBuilder_.mergeFrom(value);
+ }
+
+ return this;
+ }
+ /**
+ * .google.protobuf.Any serialized_data = 3;
+ */
+ public Builder clearSerializedData() {
+ if (serializedDataBuilder_ == null) {
+ serializedData_ = null;
+ onChanged();
+ } else {
+ serializedData_ = null;
+ serializedDataBuilder_ = null;
+ }
+
+ return this;
+ }
+ /**
+ * .google.protobuf.Any serialized_data = 3;
+ */
+ public com.google.protobuf.Any.Builder getSerializedDataBuilder() {
+
+ onChanged();
+ return getSerializedDataFieldBuilder().getBuilder();
+ }
+ /**
+ * .google.protobuf.Any serialized_data = 3;
+ */
+ public com.google.protobuf.AnyOrBuilder getSerializedDataOrBuilder() {
+ if (serializedDataBuilder_ != null) {
+ return serializedDataBuilder_.getMessageOrBuilder();
+ } else {
+ return serializedData_ == null ?
+ com.google.protobuf.Any.getDefaultInstance() : serializedData_;
+ }
+ }
+ /**
+ * .google.protobuf.Any serialized_data = 3;
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder>
+ getSerializedDataFieldBuilder() {
+ if (serializedDataBuilder_ == null) {
+ serializedDataBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder>(
+ getSerializedData(),
+ getParentForChildren(),
+ isClean());
+ serializedData_ = null;
+ }
+ return serializedDataBuilder_;
+ }
+ @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.core.OutputFactoryProto)
+ }
+
+ // @@protoc_insertion_point(class_scope:tribuo.core.OutputFactoryProto)
+ private static final org.tribuo.protos.core.OutputFactoryProto DEFAULT_INSTANCE;
+ static {
+ DEFAULT_INSTANCE = new org.tribuo.protos.core.OutputFactoryProto();
+ }
+
+ public static org.tribuo.protos.core.OutputFactoryProto getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser
+ PARSER = new com.google.protobuf.AbstractParser() {
+ @java.lang.Override
+ public OutputFactoryProto parsePartialFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return new OutputFactoryProto(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.tribuo.protos.core.OutputFactoryProto getDefaultInstanceForType() {
+ return DEFAULT_INSTANCE;
+ }
+
+}
+
diff --git a/Core/src/main/java/org/tribuo/protos/core/OutputFactoryProtoOrBuilder.java b/Core/src/main/java/org/tribuo/protos/core/OutputFactoryProtoOrBuilder.java
new file mode 100644
index 000000000..76c059484
--- /dev/null
+++ b/Core/src/main/java/org/tribuo/protos/core/OutputFactoryProtoOrBuilder.java
@@ -0,0 +1,42 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: tribuo-core.proto
+
+package org.tribuo.protos.core;
+
+public interface OutputFactoryProtoOrBuilder extends
+ // @@protoc_insertion_point(interface_extends:tribuo.core.OutputFactoryProto)
+ com.google.protobuf.MessageOrBuilder {
+
+ /**
+ * int32 version = 1;
+ * @return The version.
+ */
+ int getVersion();
+
+ /**
+ * string class_name = 2;
+ * @return The className.
+ */
+ java.lang.String getClassName();
+ /**
+ * string class_name = 2;
+ * @return The bytes for className.
+ */
+ com.google.protobuf.ByteString
+ getClassNameBytes();
+
+ /**
+ * .google.protobuf.Any serialized_data = 3;
+ * @return Whether the serializedData field is set.
+ */
+ boolean hasSerializedData();
+ /**
+ * .google.protobuf.Any serialized_data = 3;
+ * @return The serializedData.
+ */
+ com.google.protobuf.Any getSerializedData();
+ /**
+ * .google.protobuf.Any serialized_data = 3;
+ */
+ com.google.protobuf.AnyOrBuilder getSerializedDataOrBuilder();
+}
diff --git a/Core/src/main/java/org/tribuo/protos/core/OutputProto.java b/Core/src/main/java/org/tribuo/protos/core/OutputProto.java
new file mode 100644
index 000000000..14ef48f45
--- /dev/null
+++ b/Core/src/main/java/org/tribuo/protos/core/OutputProto.java
@@ -0,0 +1,819 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: tribuo-core.proto
+
+package org.tribuo.protos.core;
+
+/**
+ *
+ *Output redirection proto
+ *
+ *
+ * Protobuf type {@code tribuo.core.OutputProto}
+ */
+public final class OutputProto extends
+ com.google.protobuf.GeneratedMessageV3 implements
+ // @@protoc_insertion_point(message_implements:tribuo.core.OutputProto)
+ OutputProtoOrBuilder {
+private static final long serialVersionUID = 0L;
+ // Use OutputProto.newBuilder() to construct.
+ private OutputProto(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
+ super(builder);
+ }
+ private OutputProto() {
+ className_ = "";
+ }
+
+ @java.lang.Override
+ @SuppressWarnings({"unused"})
+ protected java.lang.Object newInstance(
+ UnusedPrivateParameter unused) {
+ return new OutputProto();
+ }
+
+ @java.lang.Override
+ public final com.google.protobuf.UnknownFieldSet
+ getUnknownFields() {
+ return this.unknownFields;
+ }
+ private OutputProto(
+ 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: {
+
+ version_ = input.readInt32();
+ break;
+ }
+ case 18: {
+ java.lang.String s = input.readStringRequireUtf8();
+
+ className_ = s;
+ break;
+ }
+ case 26: {
+ com.google.protobuf.Any.Builder subBuilder = null;
+ if (serializedData_ != null) {
+ subBuilder = serializedData_.toBuilder();
+ }
+ serializedData_ = input.readMessage(com.google.protobuf.Any.parser(), extensionRegistry);
+ if (subBuilder != null) {
+ subBuilder.mergeFrom(serializedData_);
+ serializedData_ = subBuilder.buildPartial();
+ }
+
+ 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 {
+ this.unknownFields = unknownFields.build();
+ makeExtensionsImmutable();
+ }
+ }
+ public static final com.google.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return org.tribuo.protos.core.TribuoCore.internal_static_tribuo_core_OutputProto_descriptor;
+ }
+
+ @java.lang.Override
+ protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return org.tribuo.protos.core.TribuoCore.internal_static_tribuo_core_OutputProto_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ org.tribuo.protos.core.OutputProto.class, org.tribuo.protos.core.OutputProto.Builder.class);
+ }
+
+ public static final int VERSION_FIELD_NUMBER = 1;
+ private int version_;
+ /**
+ * int32 version = 1;
+ * @return The version.
+ */
+ @java.lang.Override
+ public int getVersion() {
+ return version_;
+ }
+
+ public static final int CLASS_NAME_FIELD_NUMBER = 2;
+ private volatile java.lang.Object className_;
+ /**
+ * string class_name = 2;
+ * @return The className.
+ */
+ @java.lang.Override
+ public java.lang.String getClassName() {
+ java.lang.Object ref = className_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ className_ = s;
+ return s;
+ }
+ }
+ /**
+ * string class_name = 2;
+ * @return The bytes for className.
+ */
+ @java.lang.Override
+ public com.google.protobuf.ByteString
+ getClassNameBytes() {
+ java.lang.Object ref = className_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ className_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int SERIALIZED_DATA_FIELD_NUMBER = 3;
+ private com.google.protobuf.Any serializedData_;
+ /**
+ * .google.protobuf.Any serialized_data = 3;
+ * @return Whether the serializedData field is set.
+ */
+ @java.lang.Override
+ public boolean hasSerializedData() {
+ return serializedData_ != null;
+ }
+ /**
+ * .google.protobuf.Any serialized_data = 3;
+ * @return The serializedData.
+ */
+ @java.lang.Override
+ public com.google.protobuf.Any getSerializedData() {
+ return serializedData_ == null ? com.google.protobuf.Any.getDefaultInstance() : serializedData_;
+ }
+ /**
+ * .google.protobuf.Any serialized_data = 3;
+ */
+ @java.lang.Override
+ public com.google.protobuf.AnyOrBuilder getSerializedDataOrBuilder() {
+ return getSerializedData();
+ }
+
+ 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 (version_ != 0) {
+ output.writeInt32(1, version_);
+ }
+ if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(className_)) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 2, className_);
+ }
+ if (serializedData_ != null) {
+ output.writeMessage(3, getSerializedData());
+ }
+ unknownFields.writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (version_ != 0) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeInt32Size(1, version_);
+ }
+ if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(className_)) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, className_);
+ }
+ if (serializedData_ != null) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeMessageSize(3, getSerializedData());
+ }
+ 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.protos.core.OutputProto)) {
+ return super.equals(obj);
+ }
+ org.tribuo.protos.core.OutputProto other = (org.tribuo.protos.core.OutputProto) obj;
+
+ if (getVersion()
+ != other.getVersion()) return false;
+ if (!getClassName()
+ .equals(other.getClassName())) return false;
+ if (hasSerializedData() != other.hasSerializedData()) return false;
+ if (hasSerializedData()) {
+ if (!getSerializedData()
+ .equals(other.getSerializedData())) 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) + VERSION_FIELD_NUMBER;
+ hash = (53 * hash) + getVersion();
+ hash = (37 * hash) + CLASS_NAME_FIELD_NUMBER;
+ hash = (53 * hash) + getClassName().hashCode();
+ if (hasSerializedData()) {
+ hash = (37 * hash) + SERIALIZED_DATA_FIELD_NUMBER;
+ hash = (53 * hash) + getSerializedData().hashCode();
+ }
+ hash = (29 * hash) + unknownFields.hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static org.tribuo.protos.core.OutputProto parseFrom(
+ java.nio.ByteBuffer data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static org.tribuo.protos.core.OutputProto parseFrom(
+ java.nio.ByteBuffer data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static org.tribuo.protos.core.OutputProto parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static org.tribuo.protos.core.OutputProto 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.protos.core.OutputProto parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static org.tribuo.protos.core.OutputProto parseFrom(
+ byte[] data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static org.tribuo.protos.core.OutputProto parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input);
+ }
+ public static org.tribuo.protos.core.OutputProto 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.protos.core.OutputProto parseDelimitedFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseDelimitedWithIOException(PARSER, input);
+ }
+ public static org.tribuo.protos.core.OutputProto 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.protos.core.OutputProto parseFrom(
+ com.google.protobuf.CodedInputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input);
+ }
+ public static org.tribuo.protos.core.OutputProto 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.protos.core.OutputProto 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;
+ }
+ /**
+ *
+ *Output redirection proto
+ *
+ *
+ * Protobuf type {@code tribuo.core.OutputProto}
+ */
+ public static final class Builder extends
+ com.google.protobuf.GeneratedMessageV3.Builder implements
+ // @@protoc_insertion_point(builder_implements:tribuo.core.OutputProto)
+ org.tribuo.protos.core.OutputProtoOrBuilder {
+ public static final com.google.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return org.tribuo.protos.core.TribuoCore.internal_static_tribuo_core_OutputProto_descriptor;
+ }
+
+ @java.lang.Override
+ protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return org.tribuo.protos.core.TribuoCore.internal_static_tribuo_core_OutputProto_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ org.tribuo.protos.core.OutputProto.class, org.tribuo.protos.core.OutputProto.Builder.class);
+ }
+
+ // Construct using org.tribuo.protos.core.OutputProto.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();
+ version_ = 0;
+
+ className_ = "";
+
+ if (serializedDataBuilder_ == null) {
+ serializedData_ = null;
+ } else {
+ serializedData_ = null;
+ serializedDataBuilder_ = null;
+ }
+ return this;
+ }
+
+ @java.lang.Override
+ public com.google.protobuf.Descriptors.Descriptor
+ getDescriptorForType() {
+ return org.tribuo.protos.core.TribuoCore.internal_static_tribuo_core_OutputProto_descriptor;
+ }
+
+ @java.lang.Override
+ public org.tribuo.protos.core.OutputProto getDefaultInstanceForType() {
+ return org.tribuo.protos.core.OutputProto.getDefaultInstance();
+ }
+
+ @java.lang.Override
+ public org.tribuo.protos.core.OutputProto build() {
+ org.tribuo.protos.core.OutputProto result = buildPartial();
+ if (!result.isInitialized()) {
+ throw newUninitializedMessageException(result);
+ }
+ return result;
+ }
+
+ @java.lang.Override
+ public org.tribuo.protos.core.OutputProto buildPartial() {
+ org.tribuo.protos.core.OutputProto result = new org.tribuo.protos.core.OutputProto(this);
+ result.version_ = version_;
+ result.className_ = className_;
+ if (serializedDataBuilder_ == null) {
+ result.serializedData_ = serializedData_;
+ } else {
+ result.serializedData_ = serializedDataBuilder_.build();
+ }
+ 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.protos.core.OutputProto) {
+ return mergeFrom((org.tribuo.protos.core.OutputProto)other);
+ } else {
+ super.mergeFrom(other);
+ return this;
+ }
+ }
+
+ public Builder mergeFrom(org.tribuo.protos.core.OutputProto other) {
+ if (other == org.tribuo.protos.core.OutputProto.getDefaultInstance()) return this;
+ if (other.getVersion() != 0) {
+ setVersion(other.getVersion());
+ }
+ if (!other.getClassName().isEmpty()) {
+ className_ = other.className_;
+ onChanged();
+ }
+ if (other.hasSerializedData()) {
+ mergeSerializedData(other.getSerializedData());
+ }
+ 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.protos.core.OutputProto parsedMessage = null;
+ try {
+ parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ parsedMessage = (org.tribuo.protos.core.OutputProto) e.getUnfinishedMessage();
+ throw e.unwrapIOException();
+ } finally {
+ if (parsedMessage != null) {
+ mergeFrom(parsedMessage);
+ }
+ }
+ return this;
+ }
+
+ private int version_ ;
+ /**
+ * int32 version = 1;
+ * @return The version.
+ */
+ @java.lang.Override
+ public int getVersion() {
+ return version_;
+ }
+ /**
+ * int32 version = 1;
+ * @param value The version to set.
+ * @return This builder for chaining.
+ */
+ public Builder setVersion(int value) {
+
+ version_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * int32 version = 1;
+ * @return This builder for chaining.
+ */
+ public Builder clearVersion() {
+
+ version_ = 0;
+ onChanged();
+ return this;
+ }
+
+ private java.lang.Object className_ = "";
+ /**
+ * string class_name = 2;
+ * @return The className.
+ */
+ public java.lang.String getClassName() {
+ java.lang.Object ref = className_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ className_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ * string class_name = 2;
+ * @return The bytes for className.
+ */
+ public com.google.protobuf.ByteString
+ getClassNameBytes() {
+ java.lang.Object ref = className_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ className_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ * string class_name = 2;
+ * @param value The className to set.
+ * @return This builder for chaining.
+ */
+ public Builder setClassName(
+ java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ className_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * string class_name = 2;
+ * @return This builder for chaining.
+ */
+ public Builder clearClassName() {
+
+ className_ = getDefaultInstance().getClassName();
+ onChanged();
+ return this;
+ }
+ /**
+ * string class_name = 2;
+ * @param value The bytes for className to set.
+ * @return This builder for chaining.
+ */
+ public Builder setClassNameBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ className_ = value;
+ onChanged();
+ return this;
+ }
+
+ private com.google.protobuf.Any serializedData_;
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder> serializedDataBuilder_;
+ /**
+ * .google.protobuf.Any serialized_data = 3;
+ * @return Whether the serializedData field is set.
+ */
+ public boolean hasSerializedData() {
+ return serializedDataBuilder_ != null || serializedData_ != null;
+ }
+ /**
+ * .google.protobuf.Any serialized_data = 3;
+ * @return The serializedData.
+ */
+ public com.google.protobuf.Any getSerializedData() {
+ if (serializedDataBuilder_ == null) {
+ return serializedData_ == null ? com.google.protobuf.Any.getDefaultInstance() : serializedData_;
+ } else {
+ return serializedDataBuilder_.getMessage();
+ }
+ }
+ /**
+ * .google.protobuf.Any serialized_data = 3;
+ */
+ public Builder setSerializedData(com.google.protobuf.Any value) {
+ if (serializedDataBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ serializedData_ = value;
+ onChanged();
+ } else {
+ serializedDataBuilder_.setMessage(value);
+ }
+
+ return this;
+ }
+ /**
+ * .google.protobuf.Any serialized_data = 3;
+ */
+ public Builder setSerializedData(
+ com.google.protobuf.Any.Builder builderForValue) {
+ if (serializedDataBuilder_ == null) {
+ serializedData_ = builderForValue.build();
+ onChanged();
+ } else {
+ serializedDataBuilder_.setMessage(builderForValue.build());
+ }
+
+ return this;
+ }
+ /**
+ * .google.protobuf.Any serialized_data = 3;
+ */
+ public Builder mergeSerializedData(com.google.protobuf.Any value) {
+ if (serializedDataBuilder_ == null) {
+ if (serializedData_ != null) {
+ serializedData_ =
+ com.google.protobuf.Any.newBuilder(serializedData_).mergeFrom(value).buildPartial();
+ } else {
+ serializedData_ = value;
+ }
+ onChanged();
+ } else {
+ serializedDataBuilder_.mergeFrom(value);
+ }
+
+ return this;
+ }
+ /**
+ * .google.protobuf.Any serialized_data = 3;
+ */
+ public Builder clearSerializedData() {
+ if (serializedDataBuilder_ == null) {
+ serializedData_ = null;
+ onChanged();
+ } else {
+ serializedData_ = null;
+ serializedDataBuilder_ = null;
+ }
+
+ return this;
+ }
+ /**
+ * .google.protobuf.Any serialized_data = 3;
+ */
+ public com.google.protobuf.Any.Builder getSerializedDataBuilder() {
+
+ onChanged();
+ return getSerializedDataFieldBuilder().getBuilder();
+ }
+ /**
+ * .google.protobuf.Any serialized_data = 3;
+ */
+ public com.google.protobuf.AnyOrBuilder getSerializedDataOrBuilder() {
+ if (serializedDataBuilder_ != null) {
+ return serializedDataBuilder_.getMessageOrBuilder();
+ } else {
+ return serializedData_ == null ?
+ com.google.protobuf.Any.getDefaultInstance() : serializedData_;
+ }
+ }
+ /**
+ * .google.protobuf.Any serialized_data = 3;
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder>
+ getSerializedDataFieldBuilder() {
+ if (serializedDataBuilder_ == null) {
+ serializedDataBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder>(
+ getSerializedData(),
+ getParentForChildren(),
+ isClean());
+ serializedData_ = null;
+ }
+ return serializedDataBuilder_;
+ }
+ @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.core.OutputProto)
+ }
+
+ // @@protoc_insertion_point(class_scope:tribuo.core.OutputProto)
+ private static final org.tribuo.protos.core.OutputProto DEFAULT_INSTANCE;
+ static {
+ DEFAULT_INSTANCE = new org.tribuo.protos.core.OutputProto();
+ }
+
+ public static org.tribuo.protos.core.OutputProto getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser
+ PARSER = new com.google.protobuf.AbstractParser() {
+ @java.lang.Override
+ public OutputProto parsePartialFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return new OutputProto(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.tribuo.protos.core.OutputProto getDefaultInstanceForType() {
+ return DEFAULT_INSTANCE;
+ }
+
+}
+
diff --git a/Core/src/main/java/org/tribuo/protos/core/OutputProtoOrBuilder.java b/Core/src/main/java/org/tribuo/protos/core/OutputProtoOrBuilder.java
new file mode 100644
index 000000000..aad78275b
--- /dev/null
+++ b/Core/src/main/java/org/tribuo/protos/core/OutputProtoOrBuilder.java
@@ -0,0 +1,42 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: tribuo-core.proto
+
+package org.tribuo.protos.core;
+
+public interface OutputProtoOrBuilder extends
+ // @@protoc_insertion_point(interface_extends:tribuo.core.OutputProto)
+ com.google.protobuf.MessageOrBuilder {
+
+ /**
+ * int32 version = 1;
+ * @return The version.
+ */
+ int getVersion();
+
+ /**
+ * string class_name = 2;
+ * @return The className.
+ */
+ java.lang.String getClassName();
+ /**
+ * string class_name = 2;
+ * @return The bytes for className.
+ */
+ com.google.protobuf.ByteString
+ getClassNameBytes();
+
+ /**
+ * .google.protobuf.Any serialized_data = 3;
+ * @return Whether the serializedData field is set.
+ */
+ boolean hasSerializedData();
+ /**
+ * .google.protobuf.Any serialized_data = 3;
+ * @return The serializedData.
+ */
+ com.google.protobuf.Any getSerializedData();
+ /**
+ * .google.protobuf.Any serialized_data = 3;
+ */
+ com.google.protobuf.AnyOrBuilder getSerializedDataOrBuilder();
+}
diff --git a/Core/src/main/java/org/tribuo/protos/core/PredictionProto.java b/Core/src/main/java/org/tribuo/protos/core/PredictionProto.java
new file mode 100644
index 000000000..48165e096
--- /dev/null
+++ b/Core/src/main/java/org/tribuo/protos/core/PredictionProto.java
@@ -0,0 +1,1489 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: tribuo-core.proto
+
+package org.tribuo.protos.core;
+
+/**
+ *
+ *Prediction proto
+ *
+ *
+ * Protobuf type {@code tribuo.core.PredictionProto}
+ */
+public final class PredictionProto extends
+ com.google.protobuf.GeneratedMessageV3 implements
+ // @@protoc_insertion_point(message_implements:tribuo.core.PredictionProto)
+ PredictionProtoOrBuilder {
+private static final long serialVersionUID = 0L;
+ // Use PredictionProto.newBuilder() to construct.
+ private PredictionProto(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
+ super(builder);
+ }
+ private PredictionProto() {
+ className_ = "";
+ }
+
+ @java.lang.Override
+ @SuppressWarnings({"unused"})
+ protected java.lang.Object newInstance(
+ UnusedPrivateParameter unused) {
+ return new PredictionProto();
+ }
+
+ @java.lang.Override
+ public final com.google.protobuf.UnknownFieldSet
+ getUnknownFields() {
+ return this.unknownFields;
+ }
+ private PredictionProto(
+ 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: {
+
+ version_ = input.readInt32();
+ break;
+ }
+ case 18: {
+ java.lang.String s = input.readStringRequireUtf8();
+
+ className_ = s;
+ break;
+ }
+ case 26: {
+ org.tribuo.protos.core.ExampleProto.Builder subBuilder = null;
+ if (example_ != null) {
+ subBuilder = example_.toBuilder();
+ }
+ example_ = input.readMessage(org.tribuo.protos.core.ExampleProto.parser(), extensionRegistry);
+ if (subBuilder != null) {
+ subBuilder.mergeFrom(example_);
+ example_ = subBuilder.buildPartial();
+ }
+
+ break;
+ }
+ case 34: {
+ org.tribuo.protos.core.OutputProto.Builder subBuilder = null;
+ if (output_ != null) {
+ subBuilder = output_.toBuilder();
+ }
+ output_ = input.readMessage(org.tribuo.protos.core.OutputProto.parser(), extensionRegistry);
+ if (subBuilder != null) {
+ subBuilder.mergeFrom(output_);
+ output_ = subBuilder.buildPartial();
+ }
+
+ break;
+ }
+ case 40: {
+
+ probability_ = input.readBool();
+ break;
+ }
+ case 48: {
+
+ numUsed_ = input.readInt32();
+ break;
+ }
+ case 56: {
+
+ exampleSize_ = input.readInt32();
+ break;
+ }
+ case 66: {
+ if (!((mutable_bitField0_ & 0x00000001) != 0)) {
+ outputScores_ = com.google.protobuf.MapField.newMapField(
+ OutputScoresDefaultEntryHolder.defaultEntry);
+ mutable_bitField0_ |= 0x00000001;
+ }
+ com.google.protobuf.MapEntry
+ outputScores__ = input.readMessage(
+ OutputScoresDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry);
+ outputScores_.getMutableMap().put(
+ outputScores__.getKey(), outputScores__.getValue());
+ 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 {
+ this.unknownFields = unknownFields.build();
+ makeExtensionsImmutable();
+ }
+ }
+ public static final com.google.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return org.tribuo.protos.core.TribuoCore.internal_static_tribuo_core_PredictionProto_descriptor;
+ }
+
+ @SuppressWarnings({"rawtypes"})
+ @java.lang.Override
+ protected com.google.protobuf.MapField internalGetMapField(
+ int number) {
+ switch (number) {
+ case 8:
+ return internalGetOutputScores();
+ default:
+ throw new RuntimeException(
+ "Invalid map field number: " + number);
+ }
+ }
+ @java.lang.Override
+ protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return org.tribuo.protos.core.TribuoCore.internal_static_tribuo_core_PredictionProto_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ org.tribuo.protos.core.PredictionProto.class, org.tribuo.protos.core.PredictionProto.Builder.class);
+ }
+
+ public static final int VERSION_FIELD_NUMBER = 1;
+ private int version_;
+ /**
+ * int32 version = 1;
+ * @return The version.
+ */
+ @java.lang.Override
+ public int getVersion() {
+ return version_;
+ }
+
+ public static final int CLASS_NAME_FIELD_NUMBER = 2;
+ private volatile java.lang.Object className_;
+ /**
+ * string class_name = 2;
+ * @return The className.
+ */
+ @java.lang.Override
+ public java.lang.String getClassName() {
+ java.lang.Object ref = className_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ className_ = s;
+ return s;
+ }
+ }
+ /**
+ * string class_name = 2;
+ * @return The bytes for className.
+ */
+ @java.lang.Override
+ public com.google.protobuf.ByteString
+ getClassNameBytes() {
+ java.lang.Object ref = className_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ className_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int EXAMPLE_FIELD_NUMBER = 3;
+ private org.tribuo.protos.core.ExampleProto example_;
+ /**
+ * .tribuo.core.ExampleProto example = 3;
+ * @return Whether the example field is set.
+ */
+ @java.lang.Override
+ public boolean hasExample() {
+ return example_ != null;
+ }
+ /**
+ * .tribuo.core.ExampleProto example = 3;
+ * @return The example.
+ */
+ @java.lang.Override
+ public org.tribuo.protos.core.ExampleProto getExample() {
+ return example_ == null ? org.tribuo.protos.core.ExampleProto.getDefaultInstance() : example_;
+ }
+ /**
+ * .tribuo.core.ExampleProto example = 3;
+ */
+ @java.lang.Override
+ public org.tribuo.protos.core.ExampleProtoOrBuilder getExampleOrBuilder() {
+ return getExample();
+ }
+
+ public static final int OUTPUT_FIELD_NUMBER = 4;
+ private org.tribuo.protos.core.OutputProto output_;
+ /**
+ * .tribuo.core.OutputProto output = 4;
+ * @return Whether the output field is set.
+ */
+ @java.lang.Override
+ public boolean hasOutput() {
+ return output_ != null;
+ }
+ /**
+ * .tribuo.core.OutputProto output = 4;
+ * @return The output.
+ */
+ @java.lang.Override
+ public org.tribuo.protos.core.OutputProto getOutput() {
+ return output_ == null ? org.tribuo.protos.core.OutputProto.getDefaultInstance() : output_;
+ }
+ /**
+ * .tribuo.core.OutputProto output = 4;
+ */
+ @java.lang.Override
+ public org.tribuo.protos.core.OutputProtoOrBuilder getOutputOrBuilder() {
+ return getOutput();
+ }
+
+ public static final int PROBABILITY_FIELD_NUMBER = 5;
+ private boolean probability_;
+ /**
+ * bool probability = 5;
+ * @return The probability.
+ */
+ @java.lang.Override
+ public boolean getProbability() {
+ return probability_;
+ }
+
+ public static final int NUM_USED_FIELD_NUMBER = 6;
+ private int numUsed_;
+ /**
+ * int32 num_used = 6;
+ * @return The numUsed.
+ */
+ @java.lang.Override
+ public int getNumUsed() {
+ return numUsed_;
+ }
+
+ public static final int EXAMPLE_SIZE_FIELD_NUMBER = 7;
+ private int exampleSize_;
+ /**
+ * int32 example_size = 7;
+ * @return The exampleSize.
+ */
+ @java.lang.Override
+ public int getExampleSize() {
+ return exampleSize_;
+ }
+
+ public static final int OUTPUT_SCORES_FIELD_NUMBER = 8;
+ private static final class OutputScoresDefaultEntryHolder {
+ static final com.google.protobuf.MapEntry<
+ java.lang.String, org.tribuo.protos.core.OutputProto> defaultEntry =
+ com.google.protobuf.MapEntry
+ .newDefaultInstance(
+ org.tribuo.protos.core.TribuoCore.internal_static_tribuo_core_PredictionProto_OutputScoresEntry_descriptor,
+ com.google.protobuf.WireFormat.FieldType.STRING,
+ "",
+ com.google.protobuf.WireFormat.FieldType.MESSAGE,
+ org.tribuo.protos.core.OutputProto.getDefaultInstance());
+ }
+ private com.google.protobuf.MapField<
+ java.lang.String, org.tribuo.protos.core.OutputProto> outputScores_;
+ private com.google.protobuf.MapField
+ internalGetOutputScores() {
+ if (outputScores_ == null) {
+ return com.google.protobuf.MapField.emptyMapField(
+ OutputScoresDefaultEntryHolder.defaultEntry);
+ }
+ return outputScores_;
+ }
+
+ public int getOutputScoresCount() {
+ return internalGetOutputScores().getMap().size();
+ }
+ /**
+ * map<string, .tribuo.core.OutputProto> output_scores = 8;
+ */
+
+ @java.lang.Override
+ public boolean containsOutputScores(
+ java.lang.String key) {
+ if (key == null) { throw new NullPointerException("map key"); }
+ return internalGetOutputScores().getMap().containsKey(key);
+ }
+ /**
+ * Use {@link #getOutputScoresMap()} instead.
+ */
+ @java.lang.Override
+ @java.lang.Deprecated
+ public java.util.Map getOutputScores() {
+ return getOutputScoresMap();
+ }
+ /**
+ * map<string, .tribuo.core.OutputProto> output_scores = 8;
+ */
+ @java.lang.Override
+
+ public java.util.Map getOutputScoresMap() {
+ return internalGetOutputScores().getMap();
+ }
+ /**
+ * map<string, .tribuo.core.OutputProto> output_scores = 8;
+ */
+ @java.lang.Override
+
+ public org.tribuo.protos.core.OutputProto getOutputScoresOrDefault(
+ java.lang.String key,
+ org.tribuo.protos.core.OutputProto defaultValue) {
+ if (key == null) { throw new NullPointerException("map key"); }
+ java.util.Map map =
+ internalGetOutputScores().getMap();
+ return map.containsKey(key) ? map.get(key) : defaultValue;
+ }
+ /**
+ * map<string, .tribuo.core.OutputProto> output_scores = 8;
+ */
+ @java.lang.Override
+
+ public org.tribuo.protos.core.OutputProto getOutputScoresOrThrow(
+ java.lang.String key) {
+ if (key == null) { throw new NullPointerException("map key"); }
+ java.util.Map map =
+ internalGetOutputScores().getMap();
+ if (!map.containsKey(key)) {
+ throw new java.lang.IllegalArgumentException();
+ }
+ return map.get(key);
+ }
+
+ 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 (version_ != 0) {
+ output.writeInt32(1, version_);
+ }
+ if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(className_)) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 2, className_);
+ }
+ if (example_ != null) {
+ output.writeMessage(3, getExample());
+ }
+ if (output_ != null) {
+ output.writeMessage(4, getOutput());
+ }
+ if (probability_ != false) {
+ output.writeBool(5, probability_);
+ }
+ if (numUsed_ != 0) {
+ output.writeInt32(6, numUsed_);
+ }
+ if (exampleSize_ != 0) {
+ output.writeInt32(7, exampleSize_);
+ }
+ com.google.protobuf.GeneratedMessageV3
+ .serializeStringMapTo(
+ output,
+ internalGetOutputScores(),
+ OutputScoresDefaultEntryHolder.defaultEntry,
+ 8);
+ unknownFields.writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (version_ != 0) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeInt32Size(1, version_);
+ }
+ if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(className_)) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, className_);
+ }
+ if (example_ != null) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeMessageSize(3, getExample());
+ }
+ if (output_ != null) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeMessageSize(4, getOutput());
+ }
+ if (probability_ != false) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeBoolSize(5, probability_);
+ }
+ if (numUsed_ != 0) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeInt32Size(6, numUsed_);
+ }
+ if (exampleSize_ != 0) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeInt32Size(7, exampleSize_);
+ }
+ for (java.util.Map.Entry entry
+ : internalGetOutputScores().getMap().entrySet()) {
+ com.google.protobuf.MapEntry
+ outputScores__ = OutputScoresDefaultEntryHolder.defaultEntry.newBuilderForType()
+ .setKey(entry.getKey())
+ .setValue(entry.getValue())
+ .build();
+ size += com.google.protobuf.CodedOutputStream
+ .computeMessageSize(8, outputScores__);
+ }
+ 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.protos.core.PredictionProto)) {
+ return super.equals(obj);
+ }
+ org.tribuo.protos.core.PredictionProto other = (org.tribuo.protos.core.PredictionProto) obj;
+
+ if (getVersion()
+ != other.getVersion()) return false;
+ if (!getClassName()
+ .equals(other.getClassName())) return false;
+ if (hasExample() != other.hasExample()) return false;
+ if (hasExample()) {
+ if (!getExample()
+ .equals(other.getExample())) return false;
+ }
+ if (hasOutput() != other.hasOutput()) return false;
+ if (hasOutput()) {
+ if (!getOutput()
+ .equals(other.getOutput())) return false;
+ }
+ if (getProbability()
+ != other.getProbability()) return false;
+ if (getNumUsed()
+ != other.getNumUsed()) return false;
+ if (getExampleSize()
+ != other.getExampleSize()) return false;
+ if (!internalGetOutputScores().equals(
+ other.internalGetOutputScores())) 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) + VERSION_FIELD_NUMBER;
+ hash = (53 * hash) + getVersion();
+ hash = (37 * hash) + CLASS_NAME_FIELD_NUMBER;
+ hash = (53 * hash) + getClassName().hashCode();
+ if (hasExample()) {
+ hash = (37 * hash) + EXAMPLE_FIELD_NUMBER;
+ hash = (53 * hash) + getExample().hashCode();
+ }
+ if (hasOutput()) {
+ hash = (37 * hash) + OUTPUT_FIELD_NUMBER;
+ hash = (53 * hash) + getOutput().hashCode();
+ }
+ hash = (37 * hash) + PROBABILITY_FIELD_NUMBER;
+ hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
+ getProbability());
+ hash = (37 * hash) + NUM_USED_FIELD_NUMBER;
+ hash = (53 * hash) + getNumUsed();
+ hash = (37 * hash) + EXAMPLE_SIZE_FIELD_NUMBER;
+ hash = (53 * hash) + getExampleSize();
+ if (!internalGetOutputScores().getMap().isEmpty()) {
+ hash = (37 * hash) + OUTPUT_SCORES_FIELD_NUMBER;
+ hash = (53 * hash) + internalGetOutputScores().hashCode();
+ }
+ hash = (29 * hash) + unknownFields.hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static org.tribuo.protos.core.PredictionProto parseFrom(
+ java.nio.ByteBuffer data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static org.tribuo.protos.core.PredictionProto parseFrom(
+ java.nio.ByteBuffer data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static org.tribuo.protos.core.PredictionProto parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static org.tribuo.protos.core.PredictionProto 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.protos.core.PredictionProto parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static org.tribuo.protos.core.PredictionProto parseFrom(
+ byte[] data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static org.tribuo.protos.core.PredictionProto parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input);
+ }
+ public static org.tribuo.protos.core.PredictionProto 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.protos.core.PredictionProto parseDelimitedFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseDelimitedWithIOException(PARSER, input);
+ }
+ public static org.tribuo.protos.core.PredictionProto 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.protos.core.PredictionProto parseFrom(
+ com.google.protobuf.CodedInputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input);
+ }
+ public static org.tribuo.protos.core.PredictionProto 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.protos.core.PredictionProto 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;
+ }
+ /**
+ *
+ *Prediction proto
+ *
+ *
+ * Protobuf type {@code tribuo.core.PredictionProto}
+ */
+ public static final class Builder extends
+ com.google.protobuf.GeneratedMessageV3.Builder implements
+ // @@protoc_insertion_point(builder_implements:tribuo.core.PredictionProto)
+ org.tribuo.protos.core.PredictionProtoOrBuilder {
+ public static final com.google.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return org.tribuo.protos.core.TribuoCore.internal_static_tribuo_core_PredictionProto_descriptor;
+ }
+
+ @SuppressWarnings({"rawtypes"})
+ protected com.google.protobuf.MapField internalGetMapField(
+ int number) {
+ switch (number) {
+ case 8:
+ return internalGetOutputScores();
+ default:
+ throw new RuntimeException(
+ "Invalid map field number: " + number);
+ }
+ }
+ @SuppressWarnings({"rawtypes"})
+ protected com.google.protobuf.MapField internalGetMutableMapField(
+ int number) {
+ switch (number) {
+ case 8:
+ return internalGetMutableOutputScores();
+ default:
+ throw new RuntimeException(
+ "Invalid map field number: " + number);
+ }
+ }
+ @java.lang.Override
+ protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return org.tribuo.protos.core.TribuoCore.internal_static_tribuo_core_PredictionProto_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ org.tribuo.protos.core.PredictionProto.class, org.tribuo.protos.core.PredictionProto.Builder.class);
+ }
+
+ // Construct using org.tribuo.protos.core.PredictionProto.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();
+ version_ = 0;
+
+ className_ = "";
+
+ if (exampleBuilder_ == null) {
+ example_ = null;
+ } else {
+ example_ = null;
+ exampleBuilder_ = null;
+ }
+ if (outputBuilder_ == null) {
+ output_ = null;
+ } else {
+ output_ = null;
+ outputBuilder_ = null;
+ }
+ probability_ = false;
+
+ numUsed_ = 0;
+
+ exampleSize_ = 0;
+
+ internalGetMutableOutputScores().clear();
+ return this;
+ }
+
+ @java.lang.Override
+ public com.google.protobuf.Descriptors.Descriptor
+ getDescriptorForType() {
+ return org.tribuo.protos.core.TribuoCore.internal_static_tribuo_core_PredictionProto_descriptor;
+ }
+
+ @java.lang.Override
+ public org.tribuo.protos.core.PredictionProto getDefaultInstanceForType() {
+ return org.tribuo.protos.core.PredictionProto.getDefaultInstance();
+ }
+
+ @java.lang.Override
+ public org.tribuo.protos.core.PredictionProto build() {
+ org.tribuo.protos.core.PredictionProto result = buildPartial();
+ if (!result.isInitialized()) {
+ throw newUninitializedMessageException(result);
+ }
+ return result;
+ }
+
+ @java.lang.Override
+ public org.tribuo.protos.core.PredictionProto buildPartial() {
+ org.tribuo.protos.core.PredictionProto result = new org.tribuo.protos.core.PredictionProto(this);
+ int from_bitField0_ = bitField0_;
+ result.version_ = version_;
+ result.className_ = className_;
+ if (exampleBuilder_ == null) {
+ result.example_ = example_;
+ } else {
+ result.example_ = exampleBuilder_.build();
+ }
+ if (outputBuilder_ == null) {
+ result.output_ = output_;
+ } else {
+ result.output_ = outputBuilder_.build();
+ }
+ result.probability_ = probability_;
+ result.numUsed_ = numUsed_;
+ result.exampleSize_ = exampleSize_;
+ result.outputScores_ = internalGetOutputScores();
+ result.outputScores_.makeImmutable();
+ 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.protos.core.PredictionProto) {
+ return mergeFrom((org.tribuo.protos.core.PredictionProto)other);
+ } else {
+ super.mergeFrom(other);
+ return this;
+ }
+ }
+
+ public Builder mergeFrom(org.tribuo.protos.core.PredictionProto other) {
+ if (other == org.tribuo.protos.core.PredictionProto.getDefaultInstance()) return this;
+ if (other.getVersion() != 0) {
+ setVersion(other.getVersion());
+ }
+ if (!other.getClassName().isEmpty()) {
+ className_ = other.className_;
+ onChanged();
+ }
+ if (other.hasExample()) {
+ mergeExample(other.getExample());
+ }
+ if (other.hasOutput()) {
+ mergeOutput(other.getOutput());
+ }
+ if (other.getProbability() != false) {
+ setProbability(other.getProbability());
+ }
+ if (other.getNumUsed() != 0) {
+ setNumUsed(other.getNumUsed());
+ }
+ if (other.getExampleSize() != 0) {
+ setExampleSize(other.getExampleSize());
+ }
+ internalGetMutableOutputScores().mergeFrom(
+ other.internalGetOutputScores());
+ 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.protos.core.PredictionProto parsedMessage = null;
+ try {
+ parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ parsedMessage = (org.tribuo.protos.core.PredictionProto) e.getUnfinishedMessage();
+ throw e.unwrapIOException();
+ } finally {
+ if (parsedMessage != null) {
+ mergeFrom(parsedMessage);
+ }
+ }
+ return this;
+ }
+ private int bitField0_;
+
+ private int version_ ;
+ /**
+ * int32 version = 1;
+ * @return The version.
+ */
+ @java.lang.Override
+ public int getVersion() {
+ return version_;
+ }
+ /**
+ * int32 version = 1;
+ * @param value The version to set.
+ * @return This builder for chaining.
+ */
+ public Builder setVersion(int value) {
+
+ version_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * int32 version = 1;
+ * @return This builder for chaining.
+ */
+ public Builder clearVersion() {
+
+ version_ = 0;
+ onChanged();
+ return this;
+ }
+
+ private java.lang.Object className_ = "";
+ /**
+ * string class_name = 2;
+ * @return The className.
+ */
+ public java.lang.String getClassName() {
+ java.lang.Object ref = className_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ className_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ * string class_name = 2;
+ * @return The bytes for className.
+ */
+ public com.google.protobuf.ByteString
+ getClassNameBytes() {
+ java.lang.Object ref = className_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ className_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ * string class_name = 2;
+ * @param value The className to set.
+ * @return This builder for chaining.
+ */
+ public Builder setClassName(
+ java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ className_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * string class_name = 2;
+ * @return This builder for chaining.
+ */
+ public Builder clearClassName() {
+
+ className_ = getDefaultInstance().getClassName();
+ onChanged();
+ return this;
+ }
+ /**
+ * string class_name = 2;
+ * @param value The bytes for className to set.
+ * @return This builder for chaining.
+ */
+ public Builder setClassNameBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ className_ = value;
+ onChanged();
+ return this;
+ }
+
+ private org.tribuo.protos.core.ExampleProto example_;
+ private com.google.protobuf.SingleFieldBuilderV3<
+ org.tribuo.protos.core.ExampleProto, org.tribuo.protos.core.ExampleProto.Builder, org.tribuo.protos.core.ExampleProtoOrBuilder> exampleBuilder_;
+ /**
+ * .tribuo.core.ExampleProto example = 3;
+ * @return Whether the example field is set.
+ */
+ public boolean hasExample() {
+ return exampleBuilder_ != null || example_ != null;
+ }
+ /**
+ * .tribuo.core.ExampleProto example = 3;
+ * @return The example.
+ */
+ public org.tribuo.protos.core.ExampleProto getExample() {
+ if (exampleBuilder_ == null) {
+ return example_ == null ? org.tribuo.protos.core.ExampleProto.getDefaultInstance() : example_;
+ } else {
+ return exampleBuilder_.getMessage();
+ }
+ }
+ /**
+ * .tribuo.core.ExampleProto example = 3;
+ */
+ public Builder setExample(org.tribuo.protos.core.ExampleProto value) {
+ if (exampleBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ example_ = value;
+ onChanged();
+ } else {
+ exampleBuilder_.setMessage(value);
+ }
+
+ return this;
+ }
+ /**
+ * .tribuo.core.ExampleProto example = 3;
+ */
+ public Builder setExample(
+ org.tribuo.protos.core.ExampleProto.Builder builderForValue) {
+ if (exampleBuilder_ == null) {
+ example_ = builderForValue.build();
+ onChanged();
+ } else {
+ exampleBuilder_.setMessage(builderForValue.build());
+ }
+
+ return this;
+ }
+ /**
+ * .tribuo.core.ExampleProto example = 3;
+ */
+ public Builder mergeExample(org.tribuo.protos.core.ExampleProto value) {
+ if (exampleBuilder_ == null) {
+ if (example_ != null) {
+ example_ =
+ org.tribuo.protos.core.ExampleProto.newBuilder(example_).mergeFrom(value).buildPartial();
+ } else {
+ example_ = value;
+ }
+ onChanged();
+ } else {
+ exampleBuilder_.mergeFrom(value);
+ }
+
+ return this;
+ }
+ /**
+ * .tribuo.core.ExampleProto example = 3;
+ */
+ public Builder clearExample() {
+ if (exampleBuilder_ == null) {
+ example_ = null;
+ onChanged();
+ } else {
+ example_ = null;
+ exampleBuilder_ = null;
+ }
+
+ return this;
+ }
+ /**
+ * .tribuo.core.ExampleProto example = 3;
+ */
+ public org.tribuo.protos.core.ExampleProto.Builder getExampleBuilder() {
+
+ onChanged();
+ return getExampleFieldBuilder().getBuilder();
+ }
+ /**
+ * .tribuo.core.ExampleProto example = 3;
+ */
+ public org.tribuo.protos.core.ExampleProtoOrBuilder getExampleOrBuilder() {
+ if (exampleBuilder_ != null) {
+ return exampleBuilder_.getMessageOrBuilder();
+ } else {
+ return example_ == null ?
+ org.tribuo.protos.core.ExampleProto.getDefaultInstance() : example_;
+ }
+ }
+ /**
+ * .tribuo.core.ExampleProto example = 3;
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ org.tribuo.protos.core.ExampleProto, org.tribuo.protos.core.ExampleProto.Builder, org.tribuo.protos.core.ExampleProtoOrBuilder>
+ getExampleFieldBuilder() {
+ if (exampleBuilder_ == null) {
+ exampleBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
+ org.tribuo.protos.core.ExampleProto, org.tribuo.protos.core.ExampleProto.Builder, org.tribuo.protos.core.ExampleProtoOrBuilder>(
+ getExample(),
+ getParentForChildren(),
+ isClean());
+ example_ = null;
+ }
+ return exampleBuilder_;
+ }
+
+ private org.tribuo.protos.core.OutputProto output_;
+ private com.google.protobuf.SingleFieldBuilderV3<
+ org.tribuo.protos.core.OutputProto, org.tribuo.protos.core.OutputProto.Builder, org.tribuo.protos.core.OutputProtoOrBuilder> outputBuilder_;
+ /**
+ * .tribuo.core.OutputProto output = 4;
+ * @return Whether the output field is set.
+ */
+ public boolean hasOutput() {
+ return outputBuilder_ != null || output_ != null;
+ }
+ /**
+ * .tribuo.core.OutputProto output = 4;
+ * @return The output.
+ */
+ public org.tribuo.protos.core.OutputProto getOutput() {
+ if (outputBuilder_ == null) {
+ return output_ == null ? org.tribuo.protos.core.OutputProto.getDefaultInstance() : output_;
+ } else {
+ return outputBuilder_.getMessage();
+ }
+ }
+ /**
+ * .tribuo.core.OutputProto output = 4;
+ */
+ public Builder setOutput(org.tribuo.protos.core.OutputProto value) {
+ if (outputBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ output_ = value;
+ onChanged();
+ } else {
+ outputBuilder_.setMessage(value);
+ }
+
+ return this;
+ }
+ /**
+ * .tribuo.core.OutputProto output = 4;
+ */
+ public Builder setOutput(
+ org.tribuo.protos.core.OutputProto.Builder builderForValue) {
+ if (outputBuilder_ == null) {
+ output_ = builderForValue.build();
+ onChanged();
+ } else {
+ outputBuilder_.setMessage(builderForValue.build());
+ }
+
+ return this;
+ }
+ /**
+ * .tribuo.core.OutputProto output = 4;
+ */
+ public Builder mergeOutput(org.tribuo.protos.core.OutputProto value) {
+ if (outputBuilder_ == null) {
+ if (output_ != null) {
+ output_ =
+ org.tribuo.protos.core.OutputProto.newBuilder(output_).mergeFrom(value).buildPartial();
+ } else {
+ output_ = value;
+ }
+ onChanged();
+ } else {
+ outputBuilder_.mergeFrom(value);
+ }
+
+ return this;
+ }
+ /**
+ * .tribuo.core.OutputProto output = 4;
+ */
+ public Builder clearOutput() {
+ if (outputBuilder_ == null) {
+ output_ = null;
+ onChanged();
+ } else {
+ output_ = null;
+ outputBuilder_ = null;
+ }
+
+ return this;
+ }
+ /**
+ * .tribuo.core.OutputProto output = 4;
+ */
+ public org.tribuo.protos.core.OutputProto.Builder getOutputBuilder() {
+
+ onChanged();
+ return getOutputFieldBuilder().getBuilder();
+ }
+ /**
+ * .tribuo.core.OutputProto output = 4;
+ */
+ public org.tribuo.protos.core.OutputProtoOrBuilder getOutputOrBuilder() {
+ if (outputBuilder_ != null) {
+ return outputBuilder_.getMessageOrBuilder();
+ } else {
+ return output_ == null ?
+ org.tribuo.protos.core.OutputProto.getDefaultInstance() : output_;
+ }
+ }
+ /**
+ * .tribuo.core.OutputProto output = 4;
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ org.tribuo.protos.core.OutputProto, org.tribuo.protos.core.OutputProto.Builder, org.tribuo.protos.core.OutputProtoOrBuilder>
+ getOutputFieldBuilder() {
+ if (outputBuilder_ == null) {
+ outputBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
+ org.tribuo.protos.core.OutputProto, org.tribuo.protos.core.OutputProto.Builder, org.tribuo.protos.core.OutputProtoOrBuilder>(
+ getOutput(),
+ getParentForChildren(),
+ isClean());
+ output_ = null;
+ }
+ return outputBuilder_;
+ }
+
+ private boolean probability_ ;
+ /**
+ * bool probability = 5;
+ * @return The probability.
+ */
+ @java.lang.Override
+ public boolean getProbability() {
+ return probability_;
+ }
+ /**
+ * bool probability = 5;
+ * @param value The probability to set.
+ * @return This builder for chaining.
+ */
+ public Builder setProbability(boolean value) {
+
+ probability_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * bool probability = 5;
+ * @return This builder for chaining.
+ */
+ public Builder clearProbability() {
+
+ probability_ = false;
+ onChanged();
+ return this;
+ }
+
+ private int numUsed_ ;
+ /**
+ * int32 num_used = 6;
+ * @return The numUsed.
+ */
+ @java.lang.Override
+ public int getNumUsed() {
+ return numUsed_;
+ }
+ /**
+ * int32 num_used = 6;
+ * @param value The numUsed to set.
+ * @return This builder for chaining.
+ */
+ public Builder setNumUsed(int value) {
+
+ numUsed_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * int32 num_used = 6;
+ * @return This builder for chaining.
+ */
+ public Builder clearNumUsed() {
+
+ numUsed_ = 0;
+ onChanged();
+ return this;
+ }
+
+ private int exampleSize_ ;
+ /**
+ * int32 example_size = 7;
+ * @return The exampleSize.
+ */
+ @java.lang.Override
+ public int getExampleSize() {
+ return exampleSize_;
+ }
+ /**
+ * int32 example_size = 7;
+ * @param value The exampleSize to set.
+ * @return This builder for chaining.
+ */
+ public Builder setExampleSize(int value) {
+
+ exampleSize_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * int32 example_size = 7;
+ * @return This builder for chaining.
+ */
+ public Builder clearExampleSize() {
+
+ exampleSize_ = 0;
+ onChanged();
+ return this;
+ }
+
+ private com.google.protobuf.MapField<
+ java.lang.String, org.tribuo.protos.core.OutputProto> outputScores_;
+ private com.google.protobuf.MapField
+ internalGetOutputScores() {
+ if (outputScores_ == null) {
+ return com.google.protobuf.MapField.emptyMapField(
+ OutputScoresDefaultEntryHolder.defaultEntry);
+ }
+ return outputScores_;
+ }
+ private com.google.protobuf.MapField
+ internalGetMutableOutputScores() {
+ onChanged();;
+ if (outputScores_ == null) {
+ outputScores_ = com.google.protobuf.MapField.newMapField(
+ OutputScoresDefaultEntryHolder.defaultEntry);
+ }
+ if (!outputScores_.isMutable()) {
+ outputScores_ = outputScores_.copy();
+ }
+ return outputScores_;
+ }
+
+ public int getOutputScoresCount() {
+ return internalGetOutputScores().getMap().size();
+ }
+ /**
+ *