Documentation of 'cc.redberry.core.indices.Indices' Java class
Indices
cc.redberry.core.indices

Interface Indices

  • All Known Subinterfaces:
    SimpleIndices


    public interface Indices
    This interface states common tensor indices functionality. For specification and more information see methods summary and implementations. Objects of this type are considered to be immutable.

    For individual index structure (bit masks in the integer representation) see IndicesUtils.

    Since:
    1.0
    See Also:
    IndicesBuilder, IndexMapping, IndicesUtils
    • Method Detail

      • getUpper

        Indices getUpper()
        Returns upper (contravariant) indices.
        Returns:
        upper indices
      • getLower

        Indices getLower()
        Returns lower (covariant) indices.
        Returns:
        lower indices
      • getAllIndices

        IntArray getAllIndices()
        Return immutable IntArray of all indices.
        Returns:
        IntArray of all indices
      • toArray

        int[] toArray()
        Returns a copy of inner array of indices.
        Returns:
        a copy of inner array of indices
      • size

        int size()
        Returns the number of indices
        Returns:
        number of indices
      • size

        int size(IndexType type)
        Returns the number of indices of specified type.
        Parameters:
        type - type of indices
        Returns:
        number of indices of specified type
      • get

        int get(int position)
        Returns the index at the specified position in this Indices.
        Parameters:
        position - position of the index
        Returns:
        the index at the specified position in this Indices
        Throws:
        java.lang.IndexOutOfBoundsException - - if the index is out of range (index < 0 || index >= size())
      • get

        int get(IndexType type,
                int position)
        Returns the index of the specified type at the specified position in this Indices.
        Parameters:
        type - IndexType
        position - position of the index to return
        Returns:
        the index of the specified type at the specified position in this Indices
        Throws:
        java.lang.IndexOutOfBoundsException - - if the index is out of range
      • getNamesOfDummies

        int[] getNamesOfDummies()
        Returns sorted array of dummy indices names.
        Returns:
        sorted array of dummy indices names
      • getFree

        Indices getFree()
        Returns new instance of Indices, which contains only free (non contracted) indices from this Indices instance. The returned Indices object keeps the relative order of indices same as in the this Indices.
        Returns:
        only free indices
      • getInverted

        Indices getInverted()
        Returns new instance of Indices, which contains inverted indices, i.e. all upper indices becomes lower, and all lower become upper. The terms of ordering in the result are same as in the initial Indices object.
        Returns:
        indices with inverted states
      • getOfType

        Indices getOfType(IndexType type)
        Returns indices of the specified type, which are contained in this Indices object.
        Parameters:
        type - the type of indices
        Returns:
        indices of the specified type, which are contained in this indices object.
      • equalsRegardlessOrder

        boolean equalsRegardlessOrder(Indices indices)
        Returns true if this Indices object contains exactly same indices as specified one, without taking into account the relative ordering of indices.
        Parameters:
        indices - indices
        Returns:
        true if this Indices object contains exactly same indices as specified one, with no respect to the relative ordering of indices.
      • testConsistentWithException

        void testConsistentWithException()
        Returns always true in public API methods.
      • applyIndexMapping

        Indices applyIndexMapping(IndexMapping mapping)
        This method applies specified IndexMapping to this Indices object and returns the resulting Indices object.
        Parameters:
        mapping - specified IndexMapping
        Returns:
        resulting Indices object
        See Also:
        IndexMapping
      • toString

        java.lang.String toString(OutputFormat outputFormat)
        String representation of Indices object in specified output format.
        Parameters:
        outputFormat - output format
        Returns:
        string representation of Indices object in specified output format.
        See Also:
        OutputFormat
      • equals

        boolean equals(java.lang.Object other)
        Overrides:
        equals in class java.lang.Object

DataMelt 3.0 © DataMelt by jWork.ORG

Ads help maintain this website.