I have an array and I need all the possible permutations of this array given the following constraints:
The possible values are: 0.25,0.5,0.75,1.0,1.25,1.5,1.75,2.0.
The array has 18 elements. Each of the elements can contain one of the above values. Repeating is allowed, for example: 0.25,0.25,0.5 etc...
What type of iteration would I need to do to cover every permutation (not combination)?
for(...)
{
std::vector<float> array;
for(...)
array.push_back...
}
etc
My question does not seek to find all permutations of a given array:
I just want:
for example:
0.25 0.25 0.25
0.5 0.25 0.25
1.0 0.25 0.25
...
All the way to
2.0 2.0 2.0