Is there a Java array library which supports slicing? I just need regular n x n' x n'' x ... arrays and either taking one slice from given dimension or whole dimension (i.e. no need for ranges).
Notes (read replies to potential comments):
- I know that regular Java arrays are not supporting it and I'm not willing to write my own slicing library.
- Using
Collection(suggested in comment to other question) based shifts the problem - Using System.arraycopy does not help in high dimension as it does not lower the nesting of loops significantly
- This is (sort of - long story) numerical problem so OO approach for inner code is not necessary the best one - the most usable abstraction boils down to slicing anyway
- I would prefer R/W view from slice (if it will only be R/O copy I won't complain though)
EDIT: Unfortunaly I need to store objects inside array - not only double's.