MCPcopy Create free account
hub / github.com/antlr/codebuff / cartesianProduct

Method cartesianProduct

corpus/java/training/guava/collect/Sets.java:1108–1110  ·  view source on GitHub ↗

Returns every possible list that can be formed by choosing one element from each of the given sets in order; the "n-ary Cartesian product " of the sets. For example: {@code Sets.cartesianProduct(ImmutableList.of( ImmutableS

(List<? extends Set<? extends B>> sets)

Source from the content-addressed store, hash-verified

1106 * @since 2.0
1107 */
1108 public static <B> Set<List<B>> cartesianProduct(List<? extends Set<? extends B>> sets) {
1109 return CartesianSet.create(sets);
1110 }
1111
1112 /**
1113 * Returns every possible list that can be formed by choosing one element

Callers

nothing calls this directly

Calls 2

createMethod · 0.95
asListMethod · 0.45

Tested by

no test coverage detected