public class ImmutableMultiLabelInfo extends MultiLabelInfo implements ImmutableOutputInfo<MultiLabel>
labelCounts, labels, totalCount, unknownCount
Modifier and Type | Method and Description |
---|---|
ImmutableMultiLabelInfo |
copy()
Generates a copy of this OutputInfo, including it's mutability.
|
boolean |
equals(Object o) |
Set<MultiLabel> |
getDomain()
Returns a set of MultiLabel, where each has a single Label inside it.
|
int |
getID(MultiLabel output)
Return the id number associated with this output, or -1 if the output is unknown.
|
int |
getID(String label)
Gets the id for the supplied label string.
|
long |
getLabelCount(int id)
Gets the count of the label occurrence for the specified id number, or 0 if it's unknown.
|
MultiLabel |
getOutput(int id)
Returns the output associated with this id, or null if the id is unknown.
|
long |
getTotalObservations()
Returns the total number of observed outputs seen by this ImmutableOutputInfo.
|
int |
hashCode() |
Iterator<com.oracle.labs.mlrg.olcut.util.Pair<Integer,MultiLabel>> |
iterator() |
String |
toReadableString()
Generates a String form of this OutputInfo.
|
String |
toString() |
generateImmutableOutputInfo, generateMutableOutputInfo, getLabelCount, getLabelCount, getUnknownCount, outputCountsIterable, size
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
generateImmutableOutputInfo, generateMutableOutputInfo, getUnknownCount, outputCountsIterable, size
forEach, spliterator
public Set<MultiLabel> getDomain()
MultiLabelInfo
getDomain
in interface OutputInfo<MultiLabel>
getDomain
in class MultiLabelInfo
public int getID(MultiLabel output)
ImmutableOutputInfo
getID
in interface ImmutableOutputInfo<MultiLabel>
output
- An outputpublic MultiLabel getOutput(int id)
ImmutableOutputInfo
getOutput
in interface ImmutableOutputInfo<MultiLabel>
id
- A non-negative integer.public long getTotalObservations()
ImmutableOutputInfo
getTotalObservations
in interface ImmutableOutputInfo<MultiLabel>
public int getID(String label)
label
- The label string.public long getLabelCount(int id)
id
- The label id.public ImmutableMultiLabelInfo copy()
OutputInfo
copy
in interface OutputInfo<MultiLabel>
copy
in class MultiLabelInfo
public String toReadableString()
OutputInfo
This String can contain newlines, tabs and other formatting.
toReadableString
in interface OutputInfo<MultiLabel>
public boolean equals(Object o)
equals
in class MultiLabelInfo
public int hashCode()
hashCode
in class MultiLabelInfo
public Iterator<com.oracle.labs.mlrg.olcut.util.Pair<Integer,MultiLabel>> iterator()
iterator
in interface Iterable<com.oracle.labs.mlrg.olcut.util.Pair<Integer,MultiLabel>>
Copyright © 2015–2021 Oracle and/or its affiliates. All rights reserved.