public abstract class Vector extends Object implements Serializable, Comparable<Vector>
| Modifier and Type | Class and Description |
|---|---|
static class |
Vector.Builder |
| Modifier and Type | Method and Description |
|---|---|
static Vector.Builder |
builder() |
static Vector.Builder |
builder(Vector vector) |
int |
compareTo(Vector other) |
boolean |
equals(Object object) |
String |
getFeature(int index) |
Set<String> |
getFeatures() |
Set<String> |
getFeatures(String prefix) |
String |
getId() |
float |
getValue(int index) |
float |
getValue(String feature) |
boolean |
hasFeature(String feature) |
int |
hashCode() |
boolean |
isEmpty() |
LabelledVector |
label(int label,
float... probabilities) |
int |
size() |
static <T extends Vector> |
split(Iterable<T> vectors,
int numPartitions,
int maxVectors) |
String |
toString() |
void |
toString(Appendable out) |
Vector |
unlabel() |
static <T extends Appendable> |
write(Iterable<? extends Vector> vectors,
Dictionary<String> dictionary,
T out) |
public final String getId()
public final int size()
public final boolean isEmpty()
public final String getFeature(int index)
public final boolean hasFeature(String feature)
public final float getValue(int index)
public final float getValue(String feature)
public final LabelledVector label(int label, float... probabilities)
public final Vector unlabel()
public int compareTo(Vector other)
compareTo in interface Comparable<Vector>public final void toString(Appendable out) throws IOException
IOExceptionpublic static <T extends Appendable> T write(Iterable<? extends Vector> vectors, Dictionary<String> dictionary, T out) throws IOException
IOExceptionpublic static <T extends Vector> List<List<T>> split(Iterable<T> vectors, int numPartitions, int maxVectors)
public static Vector.Builder builder()
public static Vector.Builder builder(Vector vector)
Copyright © 2016–2018 FBK. All rights reserved.