Class LabelCache

java.lang.Object
com.yahoo.tensor.impl.LabelCache

public class LabelCache extends Object
Cache for string labels so they can be mapped to unique numeric keys. It uses weak references for automatic cleanup of unused labels.
Author:
baldersheim, glebashnik
  • Field Details

    • GLOBAL

      public static final LabelCache GLOBAL
    • INVALID_INDEX_LABEL

      public static final Label INVALID_INDEX_LABEL
  • Method Details

    • getOrCreateLabel

      public Label getOrCreateLabel(String string)
    • getOrCreateLabel

      public Label getOrCreateLabel(long numeric)
    • size

      public int size()