in reply to Problem using Quantum::Superpositions
#! perl -w use strict; local ($,=" - ", $\="\n"); use Quantum::Superpositions; sub min { eigenstates( any(@_) <= all(@_) ) } sub max { eigenstates( any(@_) >= all(@_) ) } my @array = qw/ 10 15 20 10 7 4 /; my ($t1) = all(); print ($t1); my ($t2) = max(@array); print $t2; print max(@array), (($t1) = max(@array)), $t2; __DATA__ this results in: all() 20 20 - 20 - 20
-- Joost downtime n. The period during which a system is error-free and immune from user input.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Problem using Q::SP's
by BrowserUk (Patriarch) on Jul 10, 2002 at 15:43 UTC | |
by RMGir (Prior) on Jul 10, 2002 at 16:03 UTC |