クラス PowerSetUtils

java.lang.Object
org.nkjmlab.util.java.math.PowerSetUtils

public class PowerSetUtils extends Object
  • コンストラクタの詳細

    • PowerSetUtils

      public PowerSetUtils()
  • メソッドの詳細

    • main

      public static void main(String[] args)
    • getPowerSet

      public static <T> List<List<T>> getPowerSet(List<T> src)
      Gets power set.
      
       getPowerSet(List.of(1,2,3)) returns
       [[],  [1],    [2],    [1, 2],
        [3], [1, 3], [2, 3], [1, 2, 3]]
       
      パラメータ:
      src -
      戻り値:
    • getPowerSet

      public static <T> Set<Set<T>> getPowerSet(Set<T> src)