Class Mat5ArrayElementIndex

    • Constructor Detail

      • Mat5ArrayElementIndex

        public Mat5ArrayElementIndex()
        Initializes the index with no index (empty string).
      • Mat5ArrayElementIndex

        public Mat5ArrayElementIndex​(String index)
        Initializes the index with the specified string.
        Parameters:
        index - the index
      • Mat5ArrayElementIndex

        public Mat5ArrayElementIndex​(int[] index)
        Initializes the index with the specified index array.
        Parameters:
        index - the index
    • Method Detail

      • isValid

        public boolean isValid​(String value)
        Checks whether the string value is a valid presentation for this class.
        Overrides:
        isValid in class AbstractBaseString
        Parameters:
        value - the string value to check
        Returns:
        true if non-null
      • indexValue

        public int[] indexValue()
        Returns the value as dimensional index. Uses -1 for unspecified/empty dimensions (eg for iterating).
        Returns:
        the array of positions (1-based indices), empty array if nothing specified
      • indexValue

        public int[] indexValue​(boolean convertToZeroBased)
        Returns the value as dimensional index. Uses -1 for unspecified/empty dimensions (eg for iterating).
        Parameters:
        convertToZeroBased - true: convert from 1-based to 0-based, false: leave unchanged
        Returns:
        the array of positions, empty array if nothing specified
      • openDimensions

        public int[] openDimensions()
        Returns the indices of the unspecified/open dimensions.
        Returns:
        the unspecified dimensions, empty array if all specified
      • isCompatible

        public boolean isCompatible​(us.hebi.matlab.mat.types.Array array)
        Checks whether the array is compatible with the dimension specifications.
        Parameters:
        array - the array to check against
        Returns:
        true if the same number of dimensions
      • getTipText

        public String getTipText()
        Returns a tool tip for the GUI editor (ignored if null is returned).
        Specified by:
        getTipText in class AbstractBaseString
        Returns:
        the tool tip