Class PowerSet<T>

  • public class PowerSet<T>
    extends Object
    In mathematics, the power set (or powerset) of any set S, written P(S), is the set of all subsets of S, including the empty set and S itself.

    Code taken from StackOverflow best answer in: -of-a-set-of-numbers. HashSet changed to LinkedHashSet for the consistent order of the subsets and easier testing.

    Currently used to calculate the possible LOCAL symmetries in QuatSymmetryDetector.

    Aleix Lafita
    • Method Detail

      • powerSet

        public Set<Set<T>> powerSet​(Set<T> originalSet)
        the set of power Sets of the original Set