Efficient way of filtering by random indexes in a large 3d-array? #433
JBraig
started this conversation in
General, ojAlgo and related code
Replies: 2 comments 4 replies
-
There is no functionality to quickly filter data structures by an arbitrary list of indexes. Since these arrays are very big, don't you want to access elements using some pattern (that could be coded in a "slice" method)? When/if you store the data in 3x3xn arrays, and then try to use things like:
How far does that get you? |
Beta Was this translation helpful? Give feedback.
3 replies
-
If you can build a snapshot version and try this: |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Came here after recommendation from this stackoverflow post.
Greetings,
My use case:
I'm working with FEM-files and looking for a way to store relevant data for the elements of the model (of which there can be a million or more in total). An example would be a data structure containing the principal axis system (as a 3x3 matrix) for each element, which I'd intuitively would try to implement as a nx3x3-array (or 3x3xn, which works better I'm told). Another one would be a 3x4xn-array, which contains the 3 coordinates (x,y,z) of the 4 corners of n tetrahedrons.
My problem:
I'm looking for a way to quickly filter these data structures by a list of indexes. In many cases, I only need a subset of those n elements. Other times, it's necessary to get only the values along a different axis (in the second example, I might only need the x-coordinates of the previously filtered elements.) So I'm looking for a way that let's me filter the elements efficiently according to my given subset, but also allows me to quickly access all elements along each axis (don't think that second part would even be an issue, but I figured it's better to mention it anyway to be sure).
Cheers
Beta Was this translation helpful? Give feedback.
All reactions