Bounds (Spectral) with indeces

I know there are various forum threads about finding highest/lowest values and their respective indeces with a few work-arounds. But without going into details, none of the workarounds is perfect, there are always special scenerios requiring extra fixes, resulting in somewhat inefficient patches. It would be much easier and less error-prone if Bounds would return the indeces of its finds.
Possible?

hei mfo, i’m afraid you’ll have to go into more details of the special scenarios you’re talking about. because, think about it: internally such a node would also have to deal with those scenarios somehow and you’d probably not be happy with the way it deals with them. so better be as precise about what you want as you can get. provide a patch that does what you want, show where it is error-prone and then we can see if that an be optimized…

Hi Joreg
I’m basically looking for the 3D vector with the highest x-value per bin of a huge spread. Additional issue: many bins contain “empty” vectors, all values are 0.
I went for the Bounds+Sift method. Bounds is fine, it knows bins, but Sift is troubling. It doesn’t have bins, it reorders its finds, and for the plenty of empty vectors it outputs only the first index of an “empty” one, not one index per bin.
My solution is attached.
In it is also an alternative approach based on Sort Advanced. That one looks more elegant, yet it is power-hungry (plenty of ticks in debug view).
A nice short cut for the whole issue would be to get the indeces right out of Bounds.

Find Highest X in Binned Vectors.v4p (54.6 KB)

In any case, thanks for checking back!

what about using Bounds (Spectral Vector)?

Find Highest X in Binned Vectors2.v4p (64.7 KB)

i also don’t feel the bounds node has missing outputs. if you have a special case, make a module and use that for this case. if the thing is needed really often, maybe add the module to the addonpack.

I don’t see how it would help.

You are certainly right about my complete scenario. I’m actually thinking it might be a good usage case for VL.

However, Bounds with Indeces could be useful in many ways. Finding a specific value in a Spread and getting its index in addition is useful for many scenarios around Bin structured data sets, no?

ah, sorry i read your problem wrong…

here’s a vl patch that does the thing.
MaxIndex.7z (6.7 KB)

1 Like

You can just use sort…

@sebl Thanks for sending this!
However I struggle to get it openend, red unlinked nodes. Could the zip be corrupted? Will open a different thread for the issue.
EDIT: seems a probelm with beta35, opening worked in 35.5. Patch looking great, thanks!

@antokhio , as written above:

In it is also an alternative approach based on Sort Advanced. That one looks more elegant, yet it is power-hungry (plenty of ticks in debug view).

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.