Class PartialAddress


  • public class PartialAddress
    extends java.lang.Object
    An address to a subset of a tensors' cells, specifying a label for some but not necessarily all of the tensors dimensions.
    Author:
    bratseth
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  PartialAddress.Builder  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      TensorAddress asAddress​(TensorType type)
      Returns this as an address in the given tensor type
      java.lang.String dimension​(int i)  
      java.lang.String label​(int i)
      Returns the label at position i
      java.lang.String label​(java.lang.String dimensionName)
      Returns the label of this dimension, or null if no label is specified for it
      long numericLabel​(java.lang.String dimensionName)
      Returns the numeric label of this dimension, or -1 if no label is specified for it
      int size()  
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Method Detail

      • dimension

        public java.lang.String dimension​(int i)
      • numericLabel

        public long numericLabel​(java.lang.String dimensionName)
        Returns the numeric label of this dimension, or -1 if no label is specified for it
      • label

        public java.lang.String label​(java.lang.String dimensionName)
        Returns the label of this dimension, or null if no label is specified for it
      • label

        public java.lang.String label​(int i)
        Returns the label at position i
        Throws:
        java.lang.IllegalArgumentException - if i is out of bounds
      • size

        public int size()
      • asAddress

        public TensorAddress asAddress​(TensorType type)
        Returns this as an address in the given tensor type
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object