Sign in to follow this  
MARS_999

Larger 2D grid array, how to make sub grids?

Recommended Posts

Anyone know of any std::lib algorithms what will take a 2d grid and break it down into chunks? or your own algorithm?

e.g. say you have a 129x129 grid you want 33x33 grids from that main grid? and be able to say what order you want them in?

Thanks!

Share this post


Link to post
Share on other sites
If you want to make arbitrary chunks from an array, use a multidimensional array and be done with it. Was there something else you needed ?
an algorithms to break an array into chunks is something that you should do, not any standard algorithm.

Share this post


Link to post
Share on other sites
I don't quite understand what you're after. What do you mean by making a sub-grid? What is it that you want to break down into chunks; the order the cells are traversed, or something else?
Also, why are those numbers one more than a power of two? Are you expecting to produce 4 non-overlapping chunks width and height-wise?

Share this post


Link to post
Share on other sites
[quote name='iMalc' timestamp='1313616481' post='4850479']
I don't quite understand what you're after. What do you mean by making a sub-grid? What is it that you want to break down into chunks; the order the cells are traversed, or something else?
Also, why are those numbers one more than a power of two? Are you expecting to produce 4 non-overlapping chunks width and height-wise?
[/quote]

Correct.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this