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

Class IndicesSymmetries



  • public final class IndicesSymmetries
    extends java.lang.Object
    Wrapper of PermutationGroup that holds symmetries of indices. This class aggregates symmetries added via methods add(...) and calculate permutation group generated by these symmetries on the invocation of methods getPermutationGroup(), getPositionsInOrbits() etc. After permutation group was calculated the modification of symmetries is forbidden: all methods add(...) will throw IllegalStateException.
    Since:
    1.0
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      void add(boolean sign, int[] permutation)
      Adds specified symmetry written in one-line notation to this symmetries.
      void add(byte type, boolean sign, int... permutation)
      Adds specified symmetry written in one-line notation to symmetries of indices of specified type.
      void add(IndexType type, boolean sign, int... permutation)
      Adds specified symmetry written in one-line notation to symmetries of indices of specified type.
      void addAll(java.util.Collection<Permutation> symmetry)
      Adds specified symmetries to this.
      void addAntiSymmetry(IndexType type, int... permutation)
      Adds specified antisymmetry written in one-line notation to symmetries of indices of specified type.
      void addAntiSymmetry(int... permutation)
      Adds specified antisymmetry written in one-line notation to this symmetries.
      void addSymmetries(java.util.Collection<Permutation> symmetries)
      Adds specified symmetries to this.
      void addSymmetries(Permutation... symmetries)
      Adds specified symmetries to this.
      void addSymmetry(byte type, Permutation symmetry)
      Adds specified symmetry to symmetries of indices of specified type.
      void addSymmetry(IndexType type, int... permutation)
      Adds specified permutation written in one-line notation to symmetries of indices of specified type.
      void addSymmetry(int... permutation)
      Adds specified permutation written in one-line notation to this symmetries.
      void addSymmetry(Permutation symmetry)
      Adds specified symmetry to this.
      boolean availableForModification()
      Returns true if one can add new symmetries to this, or false, if this symmetries is already in use in some tensors; in latter case, the invocation of method add(...) will throw exception.
      IndicesSymmetries clone() 
      static IndicesSymmetries create(StructureOfIndices structureOfIndices)
      Creates symmetries with empty generating set.
      static IndicesSymmetries create(StructureOfIndices structureOfIndices, java.util.List<Permutation> generators)
      Creates symmetries of indices with specified structure and with specified generating set.
      static IndicesSymmetries create(StructureOfIndices structureOfIndices, PermutationGroup group)
      Creates symmetries of indices with specified structure and with specified permutation group.
      static IndicesSymmetries getEmpty()
      For indices with zero length
      java.util.List<Permutation> getGenerators()
      Returns generating set (unmodifiable) of this symmetries.
      PermutationGroup getPermutationGroup()
      Returns a permutation group that represents symmetries of this indices.
      short[] getPositionsInOrbits()
      Returns positions of indices in the array of orbits of underlying permutation group.
      StructureOfIndices getStructureOfIndices()
      Returns underlying structure of indices.
      boolean isTrivial()
      Returns true if all generators are identity (and, consequently, the underlying permutation group is trivial) and false otherwise.
      void setAntiSymmetric()
      Makes this symmetries totally antisymmetric in all its indices (for each type).
      void setSymmetric()
      Makes this symmetries totally symmetric in all its indices (for each type).
      java.lang.String toString() 
      • Methods inherited from class java.lang.Object

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

      • create

        public static IndicesSymmetries create(StructureOfIndices structureOfIndices)
        Creates symmetries with empty generating set.
        Parameters:
        structureOfIndices - structure of indices for which this symmetries can be assigned
        Returns:
        symmetries with empty generating set for indices with specified structure
      • create

        public static IndicesSymmetries create(StructureOfIndices structureOfIndices,
                                               PermutationGroup group)
        Creates symmetries of indices with specified structure and with specified permutation group.
        Parameters:
        structureOfIndices - structure of indices for which this symmetries can be assigned
        group - permutation group
        Returns:
        symmetries with specified permutation group for indices with specified structure
        Throws:
        java.lang.IllegalArgumentException - if group.degree() != structureOfIndices.size()
      • create

        public static IndicesSymmetries create(StructureOfIndices structureOfIndices,
                                               java.util.List<Permutation> generators)
        Creates symmetries of indices with specified structure and with specified generating set.
        Parameters:
        structureOfIndices - structure of indices for which this symmetries can be assigned
        generators - generating set
        Returns:
        symmetries with specified generating set for indices with specified structure
        Throws:
        java.lang.IllegalArgumentException - if some generator in generators have degree different from size of structureOfIndices
      • getStructureOfIndices

        public StructureOfIndices getStructureOfIndices()
        Returns underlying structure of indices.
        Returns:
        structure of indices
      • getGenerators

        public java.util.List<Permutation> getGenerators()
        Returns generating set (unmodifiable) of this symmetries.
        Returns:
        generating set (unmodifiable) of this symmetries
      • getPermutationGroup

        public PermutationGroup getPermutationGroup()
        Returns a permutation group that represents symmetries of this indices. The invocation of this method makes this instance unmodifiable, i.e. invocation of method add(...) after invocation of this method will cause exception.
        Returns:
        permutation group that represents symmetries of this indices
      • getPositionsInOrbits

        public short[] getPositionsInOrbits()
        Returns positions of indices in the array of orbits of underlying permutation group. Specifically, this method returns PermutationGroup.getPositionsInOrbits() converted to short[]. This method returns same reference each time; so, if one will use the returned array, do not forget to clone it, The invocation of this method makes this instance unmodifiable, i.e. invocation of method add(...) after invocation of this method will cause exception.
        Returns:
        positions of indices in the array of orbits of underlying permutation group
        See Also:
        PermutationGroup.getPositionsInOrbits()
      • isTrivial

        public final boolean isTrivial()
        Returns true if all generators are identity (and, consequently, the underlying permutation group is trivial) and false otherwise.
        Returns:
        true if all generators are identity
      • availableForModification

        public boolean availableForModification()
        Returns true if one can add new symmetries to this, or false, if this symmetries is already in use in some tensors; in latter case, the invocation of method add(...) will throw exception.
        Returns:
        true if one can add new symmetries to this, or false, if this symmetries is already in use in some tensors; in latter case, the invocation of method add(...) will throw exception.
      • addSymmetry

        public void addSymmetry(int... permutation)
        Adds specified permutation written in one-line notation to this symmetries.
        Parameters:
        permutation - permutation written in one-line notation
        Throws:
        java.lang.IllegalStateException - if this instance of symmetries is already in use (permutation group calculated)
        java.lang.IllegalArgumentException - if specified permutation is inconsistent with one-line notation
        java.lang.IllegalArgumentException - if this structure of indices is inconsistent with specified permutation (permutation mixes indices of different types)
      • addAntiSymmetry

        public void addAntiSymmetry(int... permutation)
        Adds specified antisymmetry written in one-line notation to this symmetries.
        Parameters:
        permutation - permutation written in one-line notation
        Throws:
        java.lang.IllegalStateException - if this instance of symmetries is already in use (permutation group calculated)
        java.lang.IllegalArgumentException - if specified permutation is inconsistent with one-line notation
        java.lang.IllegalArgumentException - if order of specified permutation is odd
        java.lang.IllegalArgumentException - if this structure of indices is inconsistent with specified permutation (permutation mixes indices of different types)
      • add

        public void add(boolean sign,
                        int[] permutation)
        Adds specified symmetry written in one-line notation to this symmetries.
        Parameters:
        sign - true for antisymmetry, false for symmetry
        permutation - permutation written in one-line notation
        Throws:
        java.lang.IllegalStateException - if this instance of symmetries is already in use (permutation group calculated)
        java.lang.IllegalArgumentException - if specified permutation is inconsistent with one-line notation
        java.lang.IllegalArgumentException - when inputting antisymmetry with odd order
        java.lang.IllegalArgumentException - if this structure of indices is inconsistent with specified permutation (permutation mixes indices of different types)
      • addSymmetry

        public void addSymmetry(IndexType type,
                                int... permutation)
        Adds specified permutation written in one-line notation to symmetries of indices of specified type.
        Parameters:
        type - type of indices
        permutation - permutation written in one-line notation
        Throws:
        java.lang.IllegalStateException - if this instance of symmetries is already in use (permutation group calculated)
        java.lang.IllegalArgumentException - if specified permutation is inconsistent with one-line notation
        java.lang.IllegalArgumentException - if length of specified permutation differs from the size of indices of specified type
      • addAntiSymmetry

        public void addAntiSymmetry(IndexType type,
                                    int... permutation)
        Adds specified antisymmetry written in one-line notation to symmetries of indices of specified type.
        Parameters:
        type - type of indices
        permutation - permutation written in one-line notation
        Throws:
        java.lang.IllegalStateException - if this instance of symmetries is already in use (permutation group calculated)
        java.lang.IllegalArgumentException - if specified permutation is inconsistent with one-line notation
        java.lang.IllegalArgumentException - if order of specified permutation is odd
        java.lang.IllegalArgumentException - if length of specified permutation differs from the size of indices of specified type
      • add

        public void add(IndexType type,
                        boolean sign,
                        int... permutation)
        Adds specified symmetry written in one-line notation to symmetries of indices of specified type.
        Parameters:
        type - type of indices
        sign - true for antisymmetry, false for symmetry
        permutation - permutation written in one-line notation
        Throws:
        java.lang.IllegalStateException - if this instance of symmetries is already in use (permutation group calculated)
        java.lang.IllegalArgumentException - if specified permutation is inconsistent with one-line notation
        java.lang.IllegalArgumentException - when inputting antisymmetry with odd order
        java.lang.IllegalArgumentException - if length of specified permutation differs from the size of indices of specified type
      • add

        public void add(byte type,
                        boolean sign,
                        int... permutation)
        Adds specified symmetry written in one-line notation to symmetries of indices of specified type.
        Parameters:
        type - type of indices
        sign - true for antisymmetry, false for symmetry
        permutation - permutation written in one-line notation
        Throws:
        java.lang.IllegalStateException - if this instance of symmetries is already in use (permutation group calculated)
        java.lang.IllegalArgumentException - if specified permutation is inconsistent with one-line notation
        java.lang.IllegalArgumentException - when inputting antisymmetry with odd order
        java.lang.IllegalArgumentException - if length of specified permutation differs from the size of indices of specified type
      • addSymmetry

        public void addSymmetry(byte type,
                                Permutation symmetry)
        Adds specified symmetry to symmetries of indices of specified type.
        Parameters:
        type - type of indices
        symmetry - symmetry
        Throws:
        java.lang.IllegalStateException - if this instance of symmetries is already in use (permutation group calculated)
        java.lang.IllegalArgumentException - if this structure of indices is inconsistent with specified permutation (permutation mixes indices of different types)
      • addSymmetry

        public void addSymmetry(Permutation symmetry)
        Adds specified symmetry to this.
        Parameters:
        symmetry - symmetry
        Throws:
        java.lang.IllegalStateException - if this instance of symmetries is already in use (permutation group calculated)
        java.lang.IllegalArgumentException - if this structure of indices is inconsistent with specified permutation (permutation mixes indices of different types)
      • addSymmetries

        public void addSymmetries(Permutation... symmetries)
        Adds specified symmetries to this.
        Parameters:
        symmetries - symmetries
        Throws:
        java.lang.IllegalStateException - if this instance of symmetries is already in use (permutation group calculated)
        java.lang.IllegalArgumentException - if this structure of indices is inconsistent with specified permutation (permutation mixes indices of different types)
      • addSymmetries

        public void addSymmetries(java.util.Collection<Permutation> symmetries)
        Adds specified symmetries to this.
        Parameters:
        symmetries - symmetries
        Throws:
        java.lang.IllegalStateException - if this instance of symmetries is already in use (permutation group calculated)
        java.lang.IllegalArgumentException - if this structure of indices is inconsistent with specified permutation (permutation mixes indices of different types)
      • addAll

        public void addAll(java.util.Collection<Permutation> symmetry)
        Adds specified symmetries to this.
        Parameters:
        symmetry - symmetry
        Throws:
        java.lang.IllegalStateException - if this instance of symmetries is already in use (permutation group calculated)
        java.lang.IllegalArgumentException - if this structure of indices is inconsistent with specified permutation (permutation mixes indices of different types)
      • setSymmetric

        public void setSymmetric()
        Makes this symmetries totally symmetric in all its indices (for each type). The invocation of this method makes this instance unmodifiable, i.e. invocation of method add(...) after invocation of this method will cause exception.
        Throws:
        java.lang.IllegalStateException - if this instance of symmetries is already in use (permutation group calculated)
      • setAntiSymmetric

        public void setAntiSymmetric()
        Makes this symmetries totally antisymmetric in all its indices (for each type). The invocation of this method makes this instance unmodifiable, i.e. invocation of method add(...) after invocation of this method will cause exception.
        Throws:
        java.lang.IllegalStateException - if this instance of symmetries is already in use (permutation group calculated)
      • clone

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

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

DataMelt 3.0 © DataMelt by jWork.ORG

Ads help maintain this website.