Reputation: 7216
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):
Collection
(suggested in comment to other question) based shifts the problemEDIT: Unfortunaly I need to store objects inside array - not only double
's.
Upvotes: 3
Views: 1041
Reputation: 106381
Vectorz is a vector/matrix library supports slicing and is a good choice if you are doing numerical work with arrays of double
values. It is specifically designed for vector/matrix maths in 3D modelling, gaining, simulation or machine learning contexts.
Advantages:
double
s and double[]
arrays)O(1)
operations (i.e. no data copying required)It currently supports 0, 1 and 2 dimensional arrays, higher dimensional arrays are planned but not yet implemented.
Upvotes: 5