Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re^2: index of the minimum element of the array

by dcmertens (Beadle)
on Jan 18, 2014 at 03:55 UTC ( #1071055=note: print w/replies, xml ) Need Help??


in reply to Re: index of the minimum element of the array
in thread index of the minimum element of the array

OP said "atm i am unable to patch perl on current pc, so a busrouitine for index would be the best solution for me." Suggesting another language seems like it is well outside the realm of possibility here.

If we are going to suggest alternatives that involve installing things, why leave Perl? PDL provides a simple solution which is far more efficient than any of your solutions from other languages:

use PDL; my $index = pdl(@data)->minimum_ind;

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1071055]
help
Chatterbox?
[LanX]: YT=youtube
[Discipulus]: ;=) yes i'm not SO dumb
[LanX]: SO=StackOverflow
[Discipulus]: :=(
[perldigious]: I watched some video on YT awhile back with auto-subtitle on and the speaker had a very thick cockney sort of English accent... hillarity ensued in the subtitles.
[Discipulus]: IHAA=I hate acronyms anyway

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (8)
As of 2017-06-23 16:39 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    How many monitors do you use while coding?















    Results (552 votes). Check out past polls.