Class PowerSet<T>


  • public class PowerSet<T>
    extends java.lang.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: http://stackoverflow.com/questions/4640034/calculating-all-of-the-subsets -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.

    Since:
    5.0.0
    Author:
    Aleix Lafita
    • Constructor Summary

      Constructors 
      Constructor Description
      PowerSet()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.Set<java.util.Set<T>> powerSet​(java.util.Set<T> originalSet)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • PowerSet

        public PowerSet()
    • Method Detail

      • powerSet

        public java.util.Set<java.util.Set<T>> powerSet​(java.util.Set<T> originalSet)
        Returns:
        the set of power Sets of the original Set