Class LOLTensorData

java.lang.Object
com.linkedin.feathr.common.tensor.LOLTensorData
All Implemented Interfaces:
TensorData

public class LOLTensorData extends Object implements TensorData
Each list is of the same length and stores a single dimension (similarly to parallel arrays). There are as many dimensions as elements in columnTypes minus one. columnTypes describe the primitive type of the corresponding column (a dimension or a value). Instances of this class are expected to be only constructed from existing lists (e.g., from Avro or Pegasus), so no corresponding builder class is provided.
  • Constructor Details

  • Method Details

    • getTypes

      public Representable[] getTypes()
      Specified by:
      getTypes in interface TensorData
      Returns:
      the types of all dimensions and the value as a single array.
    • estimatedCardinality

      public int estimatedCardinality()
      Specified by:
      estimatedCardinality in interface TensorData
      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:
      cardinality in interface TensorData
      Returns:
      exact number of entries in the mapping from dimensions to values.
    • isEmpty

      public boolean isEmpty()
      Specified by:
      isEmpty in interface TensorData
    • iterator

      public TensorIterator iterator()
      Specified by:
      iterator in interface TensorData
      Returns:
      an iterator over entries in the mapping from dimensions to the value.
    • getDimensions

      public List<List<?>> getDimensions()
    • getValues

      public List<?> getValues()