Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask

Re: min and mindex

by Khen1950fx (Canon)
on Nov 06, 2012 at 19:13 UTC ( #1002565=note: print w/ replies, xml ) Need Help??

in reply to min and mindex

Maybe this can be of some help:

#!usr/bin/perl -l BEGIN { $| = 1; $^W = 1; } use strict; use warnings; use Statistics::Descriptive; use List::Util qw(minstr maxstr); my(@array1) = qw(1 2 3 4 5 6 7); my $min_index = Statistics::Descriptive::Sparse->new(); $min_index->add_data(@array1); my $min = $min_index->min; my $max = $min_index->max; my $mindex = $min_index->mindex; print "Min: ", $min, minstr 'a'..'g'; print "Max: ", $max, maxstr 'a'..'g'; print "Mindex: ", $mindex; print "Mindex: ", $min_index->mindex('a'..'g');

Comment on Re: min and mindex
Download Code

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1002565]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (3)
As of 2015-11-26 04:09 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (696 votes), past polls