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

Class IndicesBuilder



  • public final class IndicesBuilder
    extends java.lang.Object
    Builder of unordered indices. This class provides functionality to construct unordered Indices object by combining other Indices objects. For example, if we have a product X_mn*Y_ab we can construct products indices by appending consequentially indices of tensor X and Y to IndicesBuilder. As the result this class returns SortedIndices instance.
    Since:
    1.0
    See Also:
    Indices
    • Constructor Detail

      • IndicesBuilder

        public IndicesBuilder()
      • IndicesBuilder

        public IndicesBuilder(int capacity)
    • Method Detail

      • append

        public IndicesBuilder append(int index)
        Appends index to this
        Parameters:
        index - index to be appended
        Returns:
        a reference to this object
      • append

        public IndicesBuilder append(int[] indices)
        Sequentially appends all indices from specified array
        Parameters:
        indices - indices to be appended
        Returns:
        a reference to this object
      • append

        public IndicesBuilder append(int[][] indices)
        Sequentially appends all indices from specified array.
        Parameters:
        indices - indices to be appended
        Returns:
        a reference to this object
      • append

        public IndicesBuilder append(IntArray indices)
        Sequentially appends all indices from specified array
        Parameters:
        indices - indices to be appended
        Returns:
        a reference to this object
      • append

        public IndicesBuilder append(IntArrayList indices)
        Appends indices representation of specified IntArrayList.
        Parameters:
        indices - indices to be appended
        Returns:
        a reference to this object
      • append

        public IndicesBuilder append(Indices indices)
        Appends specified Indices.
        Parameters:
        indices - indices to be appended
        Returns:
        a reference to this object
      • append

        public IndicesBuilder append(IndicesBuilder ib)
        Appends specified IndicesBuilder.
        Parameters:
        ib - IndicesBuilder
        Returns:
        a reference to this object
      • append

        public IndicesBuilder append(Tensor tensor)
        Appends indices of specified Tensor.
        Parameters:
        tensor - a tensor
        Returns:
        a reference to this object
      • append

        public IndicesBuilder append(java.util.Collection<? extends Tensor> tensors)
        Appends consequentially indices of tensors in specified array.
        Parameters:
        tensors - a collection of tensors
        Returns:
        a reference to this object
      • append

        public IndicesBuilder append(Tensor... tensors)
        Appends consequentially indices of tensors in specified array.
        Parameters:
        tensors - an array of tensors
        Returns:
        a reference to this object
      • getIndices

        public Indices getIndices()
        Returns resulting Indices.
        Returns:
        resulting Indices
        Throws:
        InconsistentIndicesException - if there was more then one same index (with same names, types and states)
      • toArray

        public int[] toArray()
        Returns integer array, representing indices, constructed in this IndicesBuilder.
        Returns:
        integer array, representing indices, constructed in this IndicesBuilder
      • toString

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

        public IndicesBuilder clone()
        Overrides:
        clone in class java.lang.Object

DataMelt 3.0 © DataMelt by jWork.ORG

Ads help maintain this website.