I want to write a function to create and store the coordinates of an N-cube and I do not know how to start . In particular, I want to generate coordinates for this N-cube or similarly randomly distributed cloud for the cube and want to store them. What would be a good way to start with this, or if possible, a quick solution?
T wants to give C ++ source code for this problem, however, here it is thought How can you prepare it.
In a hypervisque, all the bit-strings of length are n . Thus, there are 2 ^ n possibilities for coordinates in the total
How can you do this again and again:
-
If you want to create a coordinate for
n = 1, simply enter0and1 - < P> If you select
n> 1,, then include all the possible coordinates for0andn '= n-1, then1 < / Code> and insert it into all possible coordinates forn '= N-1
Comments
Post a Comment