Package com.linkedin.feathr.common
Class CoercingTensorData
java.lang.Object
com.linkedin.feathr.common.CoercingTensorData
- All Implemented Interfaces:
TensorData
Coerce types in any TensorData to the one requested by the client.
-
Constructor Details
-
CoercingTensorData
-
-
Method Details
-
getTypes
- Specified by:
getTypesin interfaceTensorData- Returns:
- the types of all dimensions and the value as a single array.
-
estimatedCardinality
public int estimatedCardinality()- Specified by:
estimatedCardinalityin interfaceTensorData- Returns:
- conservative estimate of number of entries in the mapping from dimensions to values. Can be cheaper to evaluate than the exact one.
-
cardinality
public int cardinality()- Specified by:
cardinalityin interfaceTensorData- Returns:
- exact number of entries in the mapping from dimensions to values.
-
iterator
- Specified by:
iteratorin interfaceTensorData- Returns:
- an iterator over entries in the mapping from dimensions to the value.
-
getShape
public long[] getShape()- Specified by:
getShapein interfaceTensorData- Returns:
- the current shape of the data or the supplied shape of the data
-
getInner
-