view release on metacpan or search on metacpan
- Update documents
0.01_01 2014-08-04T18:13:24Z
- original version
view all matches for this distribution
view release on metacpan or search on metacpan
=head2 --copy=I<suffix>
If this option is given, a copy of each file will be saved with
the given suffix that contains the suggested changes. This does
not require any external programs. Note that this does not
automagically add a dot between the original filename and the
suffix. If you want the dot, you have to include it in the option
argument.
If neither C<--patch> or C<--copy> are given, the default is to
simply print the diffs for each file. This requires either
$self =~ s/^SKIP.*(?=^__DATA__)/SKIP
if (\@ARGV && \$ARGV[0] eq '--unstrip') {
eval { require Devel::PPPort };
\$@ and die "Cannot require Devel::PPPort, please install.\\n";
if (eval \$Devel::PPPort::VERSION < $VERSION) {
die "$0 was originally generated with Devel::PPPort $VERSION.\\n"
. "Your Devel::PPPort is only version \$Devel::PPPort::VERSION.\\n"
. "Please install a newer version, or --unstrip will not work.\\n";
}
Devel::PPPort::WriteFile(\$0);
exit 0;
}
print <<END;
Sorry, but this is a stripped version of \$0.
To be able to use its original script and doc functionality,
please try to regenerate this file using:
\$^X \$0 --unstrip
END
view all matches for this distribution
view release on metacpan or search on metacpan
=head2 --copy=I<suffix>
If this option is given, a copy of each file will be saved with
the given suffix that contains the suggested changes. This does
not require any external programs. Note that this does not
automagically add a dot between the original filename and the
suffix. If you want the dot, you have to include it in the option
argument.
If neither C<--patch> or C<--copy> are given, the default is to
simply print the diffs for each file. This requires either
$self =~ s/^SKIP.*(?=^__DATA__)/SKIP
if (\@ARGV && \$ARGV[0] eq '--unstrip') {
eval { require Devel::PPPort };
\$@ and die "Cannot require Devel::PPPort, please install.\\n";
if (eval \$Devel::PPPort::VERSION < $VERSION) {
die "$0 was originally generated with Devel::PPPort $VERSION.\\n"
. "Your Devel::PPPort is only version \$Devel::PPPort::VERSION.\\n"
. "Please install a newer version, or --unstrip will not work.\\n";
}
Devel::PPPort::WriteFile(\$0);
exit 0;
}
print <<END;
Sorry, but this is a stripped version of \$0.
To be able to use its original script and doc functionality,
please try to regenerate this file using:
\$^X \$0 --unstrip
END
view all matches for this distribution
view release on metacpan or search on metacpan
Permissions for Redistribution of the Standard Version
(2) You may Distribute verbatim copies of the Source form of the
Standard Version of this Package in any medium without restriction,
either gratis or for a Distributor Fee, provided that you duplicate
all of the original copyright notices and associated disclaimers. At
your discretion, such verbatim copies may or may not include a
Compiled form of the Package.
(3) You may apply any bug fixes, portability changes, and other
modifications made available from the Copyright Holder. The resulting
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Algorithm/Backoff.pm view on Meta::CPAN
schema => ['float*', between=>[0, 0.5]],
tags => ['common'],
description => <<'_',
If you set this to a value larger than 0, the actual delay will be between a
random number between original_delay * (1-jitter_factor) and original_delay *
(1+jitter_factor). Jitters are usually added to avoid so-called "thundering
herd" problem.
The jitter will be applied to delay on failure as well as on success.
lib/Algorithm/Backoff.pm view on Meta::CPAN
=item * B<jitter_factor> => I<float>
How much to add randomness.
If you set this to a value larger than 0, the actual delay will be between a
random number between original_delay * (1-jitter_factor) and original_delay *
(1+jitter_factor). Jitters are usually added to avoid so-called "thundering
herd" problem.
The jitter will be applied to delay on failure as well as on success.
view all matches for this distribution
view release on metacpan or search on metacpan
Revision history for Perl extension Algorithm::BellmanFord.
0.01 Fri Aug 5 20:17:25 2011
- original version; created by h2xs 1.23 with options
-X -n Algorithm::BellmanFord
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Algorithm/Bertsekas.pm view on Meta::CPAN
#Variables global to the package
my $maximize_total_benefit;
my $matrix_spaces; # used to print messages on the screen
my $decimals; # the number of digits after the decimal point
my ( $array1_size, $array2_size, $min_size, $max_size, $original_max_size );
my ( $need_transpose, $inicial_price, $iter_count_global, $iter_count_local );
my ( $epsilon_scaling, $max_epsilon_scaling, $max_matrix_value, $target, $output );
my ( %index_correlation, %assignned_object, %assignned_person, %price_object );
my ( %objects_desired_by_this, %locked_list, %seen_person, %seen_assignned_objects );
lib/Algorithm/Bertsekas.pm view on Meta::CPAN
$array1_size = $#matrix_input + 1;
$array2_size = $#{$matrix_input[0]} + 1;
$min_size = $array1_size < $array2_size ? $array1_size : $array2_size ; # square matrix --> $min_size = $max_size and $array1_size = $array2_size
$max_size = $array1_size < $array2_size ? $array2_size : $array1_size ;
$original_max_size = $max_size;
$target = 'auction-' . $array1_size . 'x' . $array2_size . '-output.txt' ;
if ( $args{verbose} >= 8 ){
print "\n verbose = $args{verbose} ---> print the verbose messages to <$target> file \n";
lib/Algorithm/Bertsekas.pm view on Meta::CPAN
next unless ( defined $matrix_input[$index_i] and defined $matrix_input[$index_i]->[$index_j] );
$assignment_hash{ $index_i } = $index_j;
$optimal_benefit += $matrix_input[$index_i]->[$index_j];
}
for my $i ( 0 .. $original_max_size - 1 ) {
for my $j ( 0 .. $original_max_size - 1 ) {
next if ($seeN{$i} or $seeM{$j});
$output_index[$i] = $j;
$seeN{$i}++;
$seeM{$j}++;
last;
lib/Algorithm/Bertsekas.pm view on Meta::CPAN
print "]\n\n";
}
if ( $verbose >= 2 ){
my $index_length = length($original_max_size);
if ( $verbose >= 3 ){
printf " modified matrix %d x %d:\n", $#matrix + 1, $#{$matrix[0]} + 1;
for my $i ( 0 .. $#matrix ) {
print " [";
lib/Algorithm/Bertsekas.pm view on Meta::CPAN
print "]\n";
}
print "\n";
}
print " original matrix $array1_size x $array2_size with solution:\n";
for my $i ( 0 .. $#matrix_input ) {
print " [";
for my $j ( 0 .. $#{$matrix_input[$i]} ) {
printf(" %${matrix_spaces}.${decimals}f", $matrix_input[$i]->[$j] );
lib/Algorithm/Bertsekas.pm view on Meta::CPAN
}
print "]\n";
}
my %orderly_solution;
for my $i ( 0 .. $original_max_size - 1 ){
my $j = $output_index[$i];
my $weight = $max_matrix_value;
$weight = $matrix_input[$i]->[$j] if ( defined $matrix_input[$i] and defined $matrix_input[$i]->[$j] ); # condition for valid solution
$orderly_solution{ $weight } { $i } { 'index_array1' } = $i;
lib/Algorithm/Bertsekas.pm view on Meta::CPAN
[ 598 739** 548 273 661 321 404 322 727 ]
[ 602 427 236 585 539 633 716** 634 473 ]
[ 679 658 467 354 742 402 485 403 704**]
[ 701 636 445 376 748** 424 507 425 682 ]
original matrix 12 x 5 with solution:
[ 732 334 646 415 437 ]
[ 240 158 154 77 55 ]
[ 741 343 655 424 446 ]
[ 415 17** 329 98 120 ]
[ 606 208 520 289 311 ]
lib/Algorithm/Bertsekas.pm view on Meta::CPAN
row index = [ 0 1 2 3 4 5 6 7 8 9 ]
column index = [ 5 0 1 8 9 6 2 4 7 3 ]
matrix value = [ 95 76 100 90 81 99 99 88 75 90 ]
original matrix 10 x 10 with solution:
[ 84 94 75 56 66 95** 39 53 73 4 ]
[ 76** 71 56 49 29 1 40 40 72 72 ]
[ 85 100** 71 23 47 18 82 70 30 71 ]
[ 2 95 71 89 73 73 48 52 90** 51 ]
[ 65 28 77 73 24 28 75 48 8 81**]
view all matches for this distribution
view release on metacpan or search on metacpan
distribute and/or modify the software.
Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software. If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.
The precise terms and conditions for copying, distribution and
modification follow.
5. By copying, distributing or modifying the Program (or any work based
on the Program) you indicate your acceptance of this license to do so,
and all its terms and conditions.
6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the original
licensor to copy, distribute or modify the Program subject to these
terms and conditions. You may not impose any further restrictions on the
recipients' exercise of the rights granted herein.
7. The Free Software Foundation may publish revised and/or new versions
recipients of the item may redistribute it under the same conditions they
received it.
1. You may make and give away verbatim copies of the source form of the
Standard Version of this Package without restriction, provided that you
duplicate all of the original copyright notices and associated disclaimers.
2. You may apply bug fixes, portability fixes and other modifications derived
from the Public Domain or from the Copyright Holder. A Package modified in such
a way shall still be considered the Standard Version.
view all matches for this distribution
view release on metacpan or search on metacpan
* added README, docs
* got tests working
v0.01 2012-10-08 moocow
* fast binary search on perl vec() vectors
* original version as Algorithm::BinarySearch::Vec::XS
view all matches for this distribution
view release on metacpan or search on metacpan
Examples/BitVectorDemo.pl view on Meta::CPAN
print $bv->is_power_of_2_sparse() . "\n"; # 0
# Experiment with reversing a bitvector:
print "\nTesting reverse():\n";
$bv = Algorithm::BitVector->new( bitstring => '0001100000000000001' );
print "original bv: $bv\n"; # 0001100000000000001
print "reversed bv: " . $bv->reverse() . "\n"; # 1000000000000011000
# Calculate the GCD of two bitvectors using Euclid's algorithm on the integers values:
print "\nTesting Greatest Common Divisor (gcd):\n";
$bv1 = Algorithm::BitVector->new( bitstring => '01100110' );
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Algorithm/Bitonic/Sort.pm view on Meta::CPAN
Bitonic mergesort is a parallel algorithm for sorting. It is also used as a construction method for building a sorting network.
This is an Perl 5 implementation of Ken Batcher's Bitonic mergesort.
=head1 Limitation
This is a enhanced version of Bitonic Sort which removed the limitation of original version.
This module supports any amount of numbers.
The original Bitonic can only sort N numbers, which N is a power of 2.
=head1 EXPORT
bitonic_sort
view all matches for this distribution
view release on metacpan or search on metacpan
=head2 --copy=I<suffix>
If this option is given, a copy of each file will be saved with
the given suffix that contains the suggested changes. This does
not require any external programs. Note that this does not
automagially add a dot between the original filename and the
suffix. If you want the dot, you have to include it in the option
argument.
If neither C<--patch> or C<--copy> are given, the default is to
simply print the diffs for each file. This requires either
$self =~ s/^SKIP.*(?=^__DATA__)/SKIP
if (\@ARGV && \$ARGV[0] eq '--unstrip') {
eval { require Devel::PPPort };
\$@ and die "Cannot require Devel::PPPort, please install.\\n";
if (eval \$Devel::PPPort::VERSION < $VERSION) {
die "$0 was originally generated with Devel::PPPort $VERSION.\\n"
. "Your Devel::PPPort is only version \$Devel::PPPort::VERSION.\\n"
. "Please install a newer version, or --unstrip will not work.\\n";
}
Devel::PPPort::WriteFile(\$0);
exit 0;
}
print <<END;
Sorry, but this is a stripped version of \$0.
To be able to use its original script and doc functionality,
please try to regenerate this file using:
\$^X \$0 --unstrip
END
view all matches for this distribution
view release on metacpan or search on metacpan
Revision history for Perl extension Algorithm::BreakOverlappingRectangles.
0.01 Wed Feb 13 10:08:05 2008
- original version; created by h2xs 1.23 with options
-AXn Algorithm::BreakOverlappingRectangles
view all matches for this distribution
view release on metacpan or search on metacpan
Bucketizer.pm view on Meta::CPAN
In C<simple> mode, the algorithm will just try to fit in your items
in the order in which they're arriving. If an item fits into the current bucket,
it's being dropped in, if not, the algorithm moves on to the next bucket. It
never goes back to previous buckets, although a new item might as well
fit in there. This mode might be useful if preserving the original order
of items is required. To query/manipulate the bucket the Bucketizer
will try to fit in the next item, use C<current_bucket_index()> explained
below.
In C<retry> mode, the algorithm will try each existing bucket first,
view all matches for this distribution
view release on metacpan or search on metacpan
distribute and/or modify the software.
Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software. If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.
The precise terms and conditions for copying, distribution and
modification follow.
5. By copying, distributing or modifying the Program (or any work based
on the Program) you indicate your acceptance of this license to do so,
and all its terms and conditions.
6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the original
licensor to copy, distribute or modify the Program subject to these
terms and conditions. You may not impose any further restrictions on the
recipients' exercise of the rights granted herein.
7. The Free Software Foundation may publish revised and/or new versions
recipients of the item may redistribute it under the same conditions they
received it.
1. You may make and give away verbatim copies of the source form of the
Standard Version of this Package without restriction, provided that you
duplicate all of the original copyright notices and associated disclaimers.
2. You may apply bug fixes, portability fixes and other modifications derived
from the Public Domain or from the Copyright Holder. A Package modified in such
a way shall still be considered the Standard Version.
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Algorithm/C3.pm view on Meta::CPAN
Total 100.0 100.0 100.0 100.0 100.0 100.0 100.0
------------------------ ------ ------ ------ ------ ------ ------ ------
=head1 SEE ALSO
=head2 The original Dylan paper
=over 4
=item L<http://www.webcom.com/haahr/dylan/linearization-oopsla96.html>
view all matches for this distribution
view release on metacpan or search on metacpan
fallback/const-c.inc view on Meta::CPAN
/* When generated this function returned values for the list of names given
in this section of perl code. Rather than manually editing these functions
to add or remove constants, which would result in this comment and section
of code becoming inaccurate, we recommend that you edit this section of
code, and use it to regenerate a new set of constant functions which you
then use to replace the originals.
Regenerate these constant functions by feeding this entire source file to
perl -x
#!/usr/bin/env perl -w
view all matches for this distribution
view release on metacpan or search on metacpan
Revision history for Perl extension Algorithm::CRF.
0.01 Thu Aug 3 00:32:05 2006
- original version; created by h2xs 1.23 with options
-A -n Algorithm::CRF crfpp.h
- only crf_learn binding is provided.
0.02 Thu Aug 4 17:03:05 2006
- write description in CRF.pm
view all matches for this distribution
view release on metacpan or search on metacpan
0.03 Fre Sep 19 23:15:04 CEST 2003
- Method 001 implemented inclusive test routines and data
0.01 Tue Sep 16 23:03:45 2003
- original version; created by h2xs 1.21 with options
-A -X CheckDigits
view all matches for this distribution
view release on metacpan or search on metacpan
ChooseSubsets.pm view on Meta::CPAN
$i->reset; # return to the first subset.
=head1 DESCRIPTION
"Subsets" in this context refers to lists with elements taken
from the original list, and in the same order as the elements in the
original list. After creating the object, subsequent calls to next()
will return the next such list in lexicographic order (where the alphabet
is the original list).
If K is specified, only subsets of that size will be returned. If K
is omitted, all subsets will be returned, beginning with the empty set
and ending with the entire set. If the 'all' flag and a value for 'K' are
specified, subsets of size greater than or equal to K will be returned.
ChooseSubsets.pm view on Meta::CPAN
$args{'all'} = 1;
}
bless (+{
_size => ($args{'size'}), # size of the subsets we are returning
_original_size => ($args{'size'}), # ditto, for resetting purposes
_set => ($args{'set'} || croak "Missing set"), # the set
_n => scalar(@{$args{'set'}}), # size of the set
_c => undef, # Current indexes to return.
_all => $args{'all'} # whether to do all or just one K.
},$class);
ChooseSubsets.pm view on Meta::CPAN
#
# reset to the first subset.
#
sub reset {
my $self = shift;
$self->{_size} = $self->{_original_size};
$self->{_c} = undef;
}
1;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Algorithm/Cluster/Thresh.pm view on Meta::CPAN
# Get your objects and the cluster IDs they belong to
# Clusters are within 5.5 of each other (based on average linkage here)
my $cluster_ids = $tree->cutthresh(5.5);
# Index corresponds to that of the original objects
print 'Object 2 belongs to cluster number ', $cluster_ids->[2], "\n";
=head1 DESCRIPTION
This is a small helper package for L<Algorithm::Cluster>, but not an official
view all matches for this distribution
view release on metacpan or search on metacpan
perl/Cluster.pm view on Meta::CPAN
clustering (pairwise simple, complete, average, and centroid linkage),
along with k-means and k-medians clustering, and 2D self-organizing
maps. This library was developed at the Human Genome Center of the
University of Tokyo. The C Clustering Library is distributed along
with Cluster 3.0, an enhanced version of the famous
Cluster program originally written by Michael Eisen
while at Stanford University.
=head1 EXAMPLES
See the scripts in the examples subdirectory of the package.
view all matches for this distribution
view release on metacpan or search on metacpan
0.04 Jul 7, 2008
- first version released to CPAN
0.01 Wed Jul 2 12:06:45 2008
- original version; created by h2xs 1.23 with options
-AXn Algorithm::ClusterPoints
view all matches for this distribution
view release on metacpan or search on metacpan
Combinatorics.pm view on Meta::CPAN
=head2 derangements(\@data)
The derangements of C<@data> are those reorderings that have no element
in its original place. In jargon those are the permutations of C<@data>
with no fixed points. For example, the derangements of C<@data = (1, 2,
3)> are:
(2, 3, 1)
(3, 1, 2)
view all matches for this distribution
view release on metacpan or search on metacpan
distribute and/or modify the software.
Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software. If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.
The precise terms and conditions for copying, distribution and
modification follow.
5. By copying, distributing or modifying the Program (or any work based
on the Program) you indicate your acceptance of this license to do so,
and all its terms and conditions.
6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the original
licensor to copy, distribute or modify the Program subject to these
terms and conditions. You may not impose any further restrictions on the
recipients' exercise of the rights granted herein.
7. The Free Software Foundation may publish revised and/or new versions
recipients of the item may redistribute it under the same conditions they
received it.
1. You may make and give away verbatim copies of the source form of the
Standard Version of this Package without restriction, provided that you
duplicate all of the original copyright notices and associated disclaimers.
2. You may apply bug fixes, portability fixes and other modifications derived
from the Public Domain or from the Copyright Holder. A Package modified in such
a way shall still be considered the Standard Version.
view all matches for this distribution
view release on metacpan or search on metacpan
Revision history for Perl extension Algorithm::ConsistentHash::JumpHash.
0.01 Wed Oct 22 20:00:00 2014
- original version
0.02 - 0.05
- fix minor isses in build process
- Resolve various build issues. No real
changes involved.
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install/Repository.pm view on Meta::CPAN
sub _find_repo {
my ($execute) = @_;
if (-e ".git") {
# TODO support remote besides 'origin'?
if ($execute->('git remote show -n origin') =~ /URL: (.*)$/m) {
# XXX Make it public clone URL, but this only works with github
my $git_url = $1;
$git_url =~ s![\w\-]+\@([^:]+):!git://$1/!;
return $git_url;
} elsif ($execute->('git svn info') =~ /URL: (.*)$/m) {
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Algorithm/ConstructDFA/XS.pm view on Meta::CPAN
for my $edge ($old_edges_from->($src)) {
my ($dst, $label) = @$edge;
# TODO: theoretically there could be name clashes between the
# artificial vertex created here and vertices in the original
# unwrapped input which can interfere with the bimaps mapping
# stringified vertices to numbers.
push @successors, bless \(Storable::freeze([$src, $label, $dst])),
$class;
}
view all matches for this distribution
view release on metacpan or search on metacpan
Memoize is slower than expected.
- Fixed bug in $all_reachable_and_self routine
- Minor documentation fixes
0.01 January 2014
- original version
view all matches for this distribution
view release on metacpan or search on metacpan
and $dst_vertex eq $final
and grep { $_ eq $dst_state } @accepting
} @xxx), "joined 5tuples contain final");
ok((all { $g->has_edge($_->[2], $_->[6] ) } @xxx),
"random dfa path corresponds to original graph over 5tuples");
}
my %all_transitions = map {
join(" ", @$_) => 1
} $dfa->transitions_as_3tuples;
view all matches for this distribution