Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sigill/multidimensionalfor
C++ class to iterate through a grid of arbitrary dimension.
https://github.com/sigill/multidimensionalfor
Last synced: 1 day ago
JSON representation
C++ class to iterate through a grid of arbitrary dimension.
- Host: GitHub
- URL: https://github.com/sigill/multidimensionalfor
- Owner: Sigill
- License: mit
- Created: 2015-04-06T16:07:36.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2015-04-06T16:08:32.000Z (almost 10 years ago)
- Last Synced: 2024-11-16T00:44:31.085Z (2 months ago)
- Language: C++
- Size: 97.7 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# MultidimensionalFor
Disclaimer: I wrote this code years ago, and never really used it.
This C++ class allow to iterate through a grid space of arbitrary dimension.
You know, when you want to iterate through a 1D space, you use a for loop:
for(int i = a; i < b, ++i) { ... }
When you want to iterate through a 2D space, you use two for loop:
for(int i = a; i < x, ++i) {
for(int j = b; j < y, ++j) {
...
}
}When you want to iterate through a ND space, you use N for loop. But since you are lazy, you use this `MultidimensionalFor` class.
## License
This code is released under the terms of the MIT License. See the LICENSE.txt file for more details.