How can I create the cartesian product of a vector of vectors?
First, I’ll show you a recursive version. typedef std::vector<int> Vi; typedef std::vector<Vi> Vvi; // recursive algorithm to to produce cart. prod. // At any given moment, “me” points to some Vi in the middle of the // input data set. // for int i in *me: // add i to current result // recurse on … Read more