Class StandaloneReadableTuple
java.lang.Object
com.linkedin.feathr.common.tensor.StandaloneReadableTuple
- All Implemented Interfaces:
ReadableTuple
A readable tuple implementation that stores single tensor row data independent of
a tensor aka in standalone manner.
This implements equality and hashcode methods so it can be used as a key in maps
-
Constructor Summary
ConstructorsConstructorDescriptionStandaloneReadableTuple(ReadableTuple readableTuple) StandaloneReadableTuple(ReadableTuple readableTuple, boolean dimOnly) Creates a StandaloneReadableTuple from a ReadableTuple optionally by dropping last value (float/double) columns.StandaloneReadableTuple(StandaloneReadableTuple standaloneReadableTuple) Copies StandaloneReadableTuple. -
Method Summary
-
Constructor Details
-
StandaloneReadableTuple
Copies StandaloneReadableTuple. It shares all the underlying data.- Parameters:
standaloneReadableTuple- StandaloneReadableTuple to make copy of
-
StandaloneReadableTuple
-
StandaloneReadableTuple
Creates a StandaloneReadableTuple from a ReadableTuple optionally by dropping last value (float/double) columns. Note: this copies all the values from readableTuple so doesn't depend on underlying tensor, if any.- Parameters:
readableTuple- ReadableTuple to convert into StandaloneReadableTupledimOnly- value column(s) won't be copied if true, all columns will be copied otherwise.
-
-
Method Details
-
getTypes
- Specified by:
getTypesin interfaceReadableTuple
-
getInt
public int getInt(int column) - Specified by:
getIntin interfaceReadableTuple- Returns:
- an int at given column.
-
getLong
public long getLong(int column) - Specified by:
getLongin interfaceReadableTuple- Returns:
- a long at given column.
-
getFloat
public float getFloat(int column) - Specified by:
getFloatin interfaceReadableTuple- Returns:
- a float at given column.
-
getDouble
public double getDouble(int column) - Specified by:
getDoublein interfaceReadableTuple- Returns:
- a double at given column.
-
getBoolean
public boolean getBoolean(int column) - Specified by:
getBooleanin interfaceReadableTuple- Returns:
- a boolean at given column.
-
getString
- Specified by:
getStringin interfaceReadableTuple- Returns:
- a string at given column.
-
getBytes
public byte[] getBytes(int column) - Specified by:
getBytesin interfaceReadableTuple- Returns:
- a byte array at given column.
-
getCopy
- Specified by:
getCopyin interfaceReadableTuple- Returns:
- a copy of this tuple, so that changes to the original tuple will not affect the new one.
-
equals
-
hashCode
public int hashCode()
-