Top "Cartesian-product" questions

The Cartesian product, named after René Descartes, of two sets A and B is the set of all ordered pairs ab, where a is element of A and b is element of B.

Get the cartesian product of a series of lists?

How can I get the Cartesian product (every possible combination of values) from a group of lists? Input: somelists = [ [1, 2, 3], ['a', …

python list cartesian-product
Cartesian product of x and y array points into single array of 2D points

I have two numpy arrays that define the x and y axes of a grid. For example: x = numpy.array([1,2,3]) …

python numpy cartesian-product
Generate all combinations from multiple lists

Given an unknown amount of lists, each with an unknown length, I need to generate a singular list with all …

java list algorithm combinations cartesian-product
Is there a multi-dimensional version of arange/linspace in numpy?

I would like a list of 2d NumPy arrays (x,y) , where each x is in {-5, -4.5, -4, -3.5, ..., 3.5, 4, 4.5, 5} …

python numpy cartesian-product
How to apply itertools.product to elements of a list of lists?

I have a list of arrays and I would like to get the cartesian product of the elements in the …

python itertools cartesian-product
Generate all possible combinations of the elements of some vectors (Cartesian product)

I would like to generate all the possible combinations of the elements of a given number of vectors. For example, …

matlab combinatorics cartesian-product
Cartesian product of an arbitrary number of sets

Do you know some neat Java libaries that allow you to make cartesian product of two (or more) sets? For …

java set cartesian-product
Generating all Possible Combinations

Given 2 arrays Array1 = {a,b,c...n} and Array2 = {10,20,15....x} how can I generate all possible combination as Strings a(…

c# combinatorics cartesian-product
Cartesian product of 2 lists in Haskell

I wish to produce the Cartesian product of 2 lists in Haskell, but I cannot work out how to do it. …

haskell combinatorics cartesian-product
Cross product in Scala

I want to have a binary operator cross (cross-product/cartesian product) that operates with traversables in Scala: val x = Seq(1, 2) …

scala functional-programming cartesian-product cross-product