I want to create every possible coloring in a vector for a given size of the vector (amount of vertices) and given possible elements (possible colors)
as an example:
for a graph with 3 vertices and I want to color it with 3 colors, I want the following possible vectors, that are gonna be my possible colorings:
0 0 0
0 0 1
0 0 2
...
2 1 1
2 1 2
...
2 0 0
1 0 0
as you can see I want both combinations like "0 0 1" and "1 0 0".
is there any way to do this efficiently?