view release on metacpan or search on metacpan
or
sudo cpan Algorithm::Evolutionary::Simple
This module is apparently also available at the OpenSUSE repos. To install it, I guess, you should use:
zypper install perl-Algorithm-Evolutionary-Simple
or via YaST
view all matches for this distribution
view release on metacpan or search on metacpan
* scripts/tide_float.pl: Changed script to make it end when
solution is found.
* lib/Algorithm/Evolutionary/Op/VectorCrossover.pm (apply): Fixed
bug: the incoming parent was modified along with the offspring.
2012-07-10 Juan J. Merelo Guervós <jjmerelo@gmail.com>
* MANIFEST: Eliminating pod.t also in production code.
2011-02-20 Juan J. Merelo Guervós <jjmerelo@gmail.com>
* lib/Algorithm/Evolutionary/Op/Breeder_Diverser.pm (apply): Made
even more diverse by not inserting the new individual if it is the
same as the parent; refactored also to best practices.
* lib/Algorithm/Evolutionary/Op/Uniform_Crossover_Diff.pm (apply):
Changed to leave at least one difference without change
2011-02-19 Juan J. Merelo Guervós <jjmerelo@gmail.com>
view all matches for this distribution
view release on metacpan or search on metacpan
examples/breeding_perls.pl view on Meta::CPAN
use Algorithm::Evolve;
Algorithm::Evolve->new(
critter_class => 'main',
selection => 'roulette',
replacement => 'rank',
parents_per_gen => 2,
size => 200,
callback => \&callback,
)->start;
sub callback {
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install.pm view on Meta::CPAN
my $cwd = Cwd::cwd();
my $sym = "${who}::AUTOLOAD";
$sym->{$cwd} = sub {
my $pwd = Cwd::cwd();
if ( my $code = $sym->{$pwd} ) {
# Delegate back to parent dirs
goto &$code unless $cwd eq $pwd;
}
unless ($$sym =~ s/([^:]+)$//) {
# XXX: it looks like we can't retrieve the missing function
# via $$sym (usually $main::AUTOLOAD) in this case.
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install.pm view on Meta::CPAN
my $cwd = Cwd::cwd();
my $sym = "${who}::AUTOLOAD";
$sym->{$cwd} = sub {
my $pwd = Cwd::cwd();
if ( my $code = $sym->{$pwd} ) {
# delegate back to parent dirs
goto &$code unless $cwd eq $pwd;
}
$$sym =~ /([^:]+)$/ or die "Cannot autoload $who - $sym";
unless ( uc($1) eq $1 ) {
unshift @_, ( $self, $1 );
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install.pm view on Meta::CPAN
my $cwd = Cwd::cwd();
my $sym = "${who}::AUTOLOAD";
$sym->{$cwd} = sub {
my $pwd = Cwd::cwd();
if ( my $code = $sym->{$pwd} ) {
# Delegate back to parent dirs
goto &$code unless $cwd eq $pwd;
}
$$sym =~ /([^:]+)$/ or die "Cannot autoload $who - $sym";
my $method = $1;
if ( uc($method) eq $method ) {
view all matches for this distribution
view release on metacpan or search on metacpan
GDiffDelta.xs view on Meta::CPAN
croak("delta contains negative int value");
return buf[0] * 0x1000000 + buf[1] * 0x10000 +
buf[2] * 0x100 + buf[3];
}
/* The buffer is supplied by the parent so that we can avoid allocating
* it on the stack every time this is called, even though that probably
* wouldn't be very expensive in most implementations. */
static void
copy_data (SV *in, SV *out, size_t num_bytes, unsigned char *buf,
const char *from, const char *to)
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Algorithm/GaussianElimination/GF2.pm view on Meta::CPAN
=item $eq->len
Returns the internal length of the coeficients vector.
Note that this value is just a hint as the internal representation
grows transparently when new coeficients are set or inside the
C<solve> method.
=back
=head1 SEE ALSO
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Algorithm/Gutter/Cell.pod view on Meta::CPAN
drains. The reference is called with the cell object, cell index in the
gutter list, how much fluid drained, and an optional I<stash> provided
by the caller.
The caller is responsible for the return value, which will be
accumulated by the parent B<drain> method and returned to the caller as
a list. For example, the B<update> code could return MIDI events, the
amount of fluid drained, both, neither, or other values as need be.
Failing to set an update callback for a cell that triggers will result
in an exception.
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install.pm view on Meta::CPAN
my $cwd = Cwd::cwd();
my $sym = "${who}::AUTOLOAD";
$sym->{$cwd} = sub {
my $pwd = Cwd::cwd();
if ( my $code = $sym->{$pwd} ) {
# delegate back to parent dirs
goto &$code unless $cwd eq $pwd;
}
$$sym =~ /([^:]+)$/ or die "Cannot autoload $who - $sym";
unshift @_, ($self, $1);
goto &{$self->can('call')} unless uc($1) eq $1;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Algorithm/Heapify/XS.pm view on Meta::CPAN
# This allows declaration:
# use Algorithm::Heapify::XS ':all';
our %EXPORT_TAGS = (
'all' => [
'heap_parent_idx',
'heap_left_child_idx',
'heap_right_child_idx',
map { ("min_$_", "max_$_","minstr_$_","maxstr_$_") }
(
'heapify',
lib/Algorithm/Heapify/XS.pm view on Meta::CPAN
our $VERSION = '0.08';
require XSLoader;
XSLoader::load('Algorithm::Heapify::XS', $VERSION);
sub heap_parent_idx($) {
die "index must be non-negative" if $_[0] < 0;
return $_[0] ? int(($_[0] - 1) / 2) : undef;
}
sub heap_left_child_idx($) {
lib/Algorithm/Heapify/XS.pm view on Meta::CPAN
=head1 DESCRIPTION
A heap is an array based data structure where the array is treated as a balanced tree
of items where each item obeys a given inequality constraint with its parent and children,
but not with its siblings. This allows it to be put into "nearly" sorted order more
efficiently than an actual sort would.
This data structure has a number of nice properties:
a) the tree does not require "child" pointers, but instead infers parent/child
relationships from their position in the array. The parent of a node i is defined to
reside in position int((i-1)/2), and the left and right children of a node i reside in
position (i*2+1) and (i*2+2) respectively.
b) "heapifying" an array is O(N) as compared to N * log2(N) for a typical sort.
lib/Algorithm/Heapify/XS.pm view on Meta::CPAN
If the weight of a specific item in a heapified array has changed, this function will
adjust its position in the tree, and return the resulting new "top" (min/max) value.
If $idx is outside the array does nothing.
=item $idx= heap_parent_idx($idx)
Returns the defined location for the node residing at index $idx in a heap, or undef if the $idx is 0.
=item $idx= heap_left_child_idx($idx)
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install.pm view on Meta::CPAN
my $cwd = Cwd::cwd();
my $sym = "${who}::AUTOLOAD";
$sym->{$cwd} = sub {
my $pwd = Cwd::cwd();
if ( my $code = $sym->{$pwd} ) {
# delegate back to parent dirs
goto &$code unless $cwd eq $pwd;
}
$$sym =~ /([^:]+)$/ or die "Cannot autoload $who - $sym";
unshift @_, ($self, $1);
goto &{$self->can('call')} unless uc($1) eq $1;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Algorithm/Kademlia.pm view on Meta::CPAN
use v5.42;
use experimental 'class';
#
package Algorithm::Kademlia v1.1.1 {
use parent 'Exporter';
our @EXPORT_OK = qw[xor_distance xor_bucket_index];
#
sub xor_distance ( $id1_bin, $id2_bin ) { $id1_bin^.$id2_bin }
sub xor_bucket_index ( $id1_bin, $id2_bin ) {
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install.pm view on Meta::CPAN
my $cwd = Cwd::cwd();
my $sym = "${who}::AUTOLOAD";
$sym->{$cwd} = sub {
my $pwd = Cwd::cwd();
if ( my $code = $sym->{$pwd} ) {
# Delegate back to parent dirs
goto &$code unless $cwd eq $pwd;
}
unless ($$sym =~ s/([^:]+)$//) {
# XXX: it looks like we can't retrieve the missing function
# via $$sym (usually $main::AUTOLOAD) in this case.
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install.pm view on Meta::CPAN
my $cwd = Cwd::cwd();
my $sym = "${who}::AUTOLOAD";
$sym->{$cwd} = sub {
my $pwd = Cwd::cwd();
if ( my $code = $sym->{$pwd} ) {
# Delegate back to parent dirs
goto &$code unless $cwd eq $pwd;
}
$$sym =~ /([^:]+)$/ or die "Cannot autoload $who - $sym";
my $method = $1;
if ( uc($method) eq $method ) {
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install.pm view on Meta::CPAN
my $cwd = Cwd::cwd();
my $sym = "${who}::AUTOLOAD";
$sym->{$cwd} = sub {
my $pwd = Cwd::cwd();
if ( my $code = $sym->{$pwd} ) {
# delegate back to parent dirs
goto &$code unless $cwd eq $pwd;
}
$$sym =~ /([^:]+)$/ or die "Cannot autoload $who - $sym";
unshift @_, ($self, $1);
goto &{$self->can('call')} unless uc($1) eq $1;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Algorithm/LDA.pm view on Meta::CPAN
use strict;
use warnings FATAL => 'all';
use constant pi => 4*atan2(1, 1);
use constant e => exp(1);
use parent qw/Class::Accessor::Fast/;
use List::Util qw(shuffle sum max);
use List::MoreUtils qw(uniq first_index);
use JSON::XS;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Algorithm/LibLinear/Types.pm view on Meta::CPAN
use Types::Standard qw/Dict Int Map Num/;
my $Feature = __PACKAGE__->add_type(
constraint => q!List::MoreUtils::all { $_ > 0 } keys %$_!,
name => 'Feature',
parent => Map[Int, Num],
);
__PACKAGE__->add_type(
name => 'FeatureWithLabel',
parent => Dict[ feature => $Feature, label => Num ],
);
1;
view all matches for this distribution
view release on metacpan or search on metacpan
opmethod_stash|5.021007||Viu
OpMORESIB_set|5.021011|5.003007|p
OP_NAME|5.007003|5.007003|
op_null|5.007002|5.007002|
OPpALLOW_FAKE|5.015006||Viu
op_parent|5.025001|5.025001|n
OPpARG1_MASK|5.021004||Viu
OPpARG2_MASK|5.021004||Viu
OPpARG3_MASK|5.021004||Viu
OPpARG4_MASK|5.021004||Viu
OPpARGELEM_AV|5.025004||Viu
#ifndef OpMORESIB_set
# define OpMORESIB_set(o, sib) ((o)->op_sibling = (sib))
#endif
#ifndef OpLASTSIB_set
# define OpLASTSIB_set(o, parent) ((o)->op_sibling = NULL)
#endif
#ifndef OpMAYBESIB_set
# define OpMAYBESIB_set(o, sib, parent) ((o)->op_sibling = (sib))
#endif
#ifndef HEf_SVKEY
# define HEf_SVKEY -2
#endif
view all matches for this distribution
view release on metacpan or search on metacpan
0.04 March 2013
- https://rt.cpan.org/Ticket/Display.html?id=94055 should be
fixed using Test::Deeply now.
0.03 March 2013
- Floating point number serialisation apparently differs among
platforms, making a test fail; attempt to address that.
0.02 March 2014
- Removed accidental debug print
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Algorithm/Loops.pm view on Meta::CPAN
Note also that by importing Filter via the C<use> statement:
use Algorithm::Loops qw( Filter );
it gets declared before the rest of our code is compiled so we don't have
to use parentheses when calling it. We I<can> if we want to, however:
my @copy= Filter( sub {s/\s/_/g}, @list );
=head3 Note on "Function BLOCK LIST" bugs
lib/Algorithm/Loops.pm view on Meta::CPAN
may give you this error:
Array found where operator expected
which can be fixed by dropping the parentheses:
... Filter {y/aeiou/UAEIO/} @list;
So if you need or want to use parentheses when calling Filter, it is best
to also include the C<sub> keyword and the comma:
# v <--------- These ---------> v
... Filter( sub {y/aeiou/UAEIO/}, @list );
# require ^^^ <--- these ---> ^ (sometimes)
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Algorithm/MOS.pm view on Meta::CPAN
package Algorithm::MOS;
# ABSTRACT: Algorithm::MOS - Calculate MOS (Mean Opinion Score)
use Carp;
use parent 'Exporter';
our @EXPORT = ('calc_mos');
sub mos {
my ( $average, $jitter, $packet_loss ) = @_
or croak 'mos( average, jitter, packet_loss )';
view all matches for this distribution
view release on metacpan or search on metacpan
op_free|||
op_integerize|||
op_linklist||5.013006|
op_lvalue_flags|||
op_null||5.007002|
op_parent|||n
op_prepend_elem||5.013006|
op_refcnt_lock||5.009002|
op_refcnt_unlock||5.009002|
op_relocate_sv|||
op_sibling_splice||5.021002|n
#ifndef OpMORESIB_set
# define OpMORESIB_set(o, sib) ((o)->op_sibling = (sib))
#endif
#ifndef OpLASTSIB_set
# define OpLASTSIB_set(o, parent) ((o)->op_sibling = NULL)
#endif
#ifndef OpMAYBESIB_set
# define OpMAYBESIB_set(o, sib, parent) ((o)->op_sibling = (sib))
#endif
#ifndef HEf_SVKEY
# define HEf_SVKEY -2
#endif
view all matches for this distribution
view release on metacpan or search on metacpan
Makefile.PL view on Meta::CPAN
use strict;
use warnings;
require 5.006_000; # $VERSION declaration apparently fails on 5.00505
use ExtUtils::MakeMaker;
WriteMakefile(
NAME => 'Algorithm::NeedlemanWunsch',
view all matches for this distribution
view release on metacpan or search on metacpan
t/Algorithm_Odometer_Tiny_Testlib.pm view on Meta::CPAN
L<http://perldoc.perl.org/perlartistic.html>.
=cut
BEGIN {
require Exporter; # "parent" pragma wasn't core until 5.10.1
our @ISA = qw/ Exporter /; ## no critic (ProhibitExplicitISA)
}
our @EXPORT = qw/ $AUTHOR_TESTS exception warns getverbatim /; ## no critic (ProhibitAutomaticExportation)
our $AUTHOR_TESTS;
view all matches for this distribution
view release on metacpan or search on metacpan
op_integerize|||
op_linklist||5.013006|
op_lvalue_flags|||
op_lvalue||5.013007|
op_null||5.007002|
op_parent|||n
op_prepend_elem||5.013006|
op_refcnt_dec|||
op_refcnt_inc|||
op_refcnt_lock||5.009002|
op_refcnt_unlock||5.009002|
#ifndef OpMORESIB_set
# define OpMORESIB_set(o, sib) ((o)->op_sibling = (sib))
#endif
#ifndef OpLASTSIB_set
# define OpLASTSIB_set(o, parent) ((o)->op_sibling = NULL)
#endif
#ifndef OpMAYBESIB_set
# define OpMAYBESIB_set(o, sib, parent) ((o)->op_sibling = (sib))
#endif
#ifndef SvRX
#if defined(NEED_SvRX)
static void * DPPP_(my_SvRX)(pTHX_ SV *rv);
view all matches for this distribution
view release on metacpan or search on metacpan
opmethod_stash|5.021007||Viu
OpMORESIB_set|5.021011|5.003007|p
OP_NAME|5.007003|5.007003|
op_null|5.007002|5.007002|
OPpALLOW_FAKE|5.015006||Viu
op_parent|5.025001|5.025001|n
OPpARG1_MASK|5.021004||Viu
OPpARG2_MASK|5.021004||Viu
OPpARG3_MASK|5.021004||Viu
OPpARG4_MASK|5.021004||Viu
OPpARGELEM_AV|5.025004||Viu
#ifndef OpMORESIB_set
# define OpMORESIB_set(o, sib) ((o)->op_sibling = (sib))
#endif
#ifndef OpLASTSIB_set
# define OpLASTSIB_set(o, parent) ((o)->op_sibling = NULL)
#endif
#ifndef OpMAYBESIB_set
# define OpMAYBESIB_set(o, sib, parent) ((o)->op_sibling = (sib))
#endif
#ifndef HEf_SVKEY
# define HEf_SVKEY -2
#endif
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Algorithm/QuadTree.pm view on Meta::CPAN
non-Tk programs successfully. It is a classic memory/speed trade-off.
Lots of information about QTAs can be found on the web. But, very briefly,
a quadtree is a hierarchical data model that recursively decomposes a map into
smaller regions. Each node in the tree has 4 children nodes, each of which
represents one quarter of the area that the parent represents. So, the root
node represents the complete map. This map is then split into 4 equal quarters,
each of which is represented by one child node. Each of these children is now
treated as a parent, and its area is recursively split up into 4 equal areas,
and so on up to a desired depth.
Here is a somewhat crude diagram:
------------------------------
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Algorithm/Retry/Constant.pm view on Meta::CPAN
our $VERSION = '0.002'; # VERSION
use strict;
use warnings;
use parent qw(Algorithm::Retry);
our %SPEC;
$SPEC{new} = {
v => 1.1,
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Algorithm/SAT/Backtracking/DPLL.pm view on Meta::CPAN
use Data::Dumper;
use strict;
use warnings;
our $VERSION = "0.13";
# this allow to switch the parent implementation (needed for the Ordered alternative)
sub import {
my ( $class, $flag ) = @_;
if ($flag) {
eval "use base '$flag'";
}
view all matches for this distribution