view release on metacpan or search on metacpan
0.02 Fri Jan 11 14:22:00 2008
- corrected some documentation typos
0.01 Tue Jan 8 15:31:18 2008
- original version; created by h2xs 1.23 with options
-An Algorithm::LBFGS
view all matches for this distribution
view release on metacpan or search on metacpan
1.00 Sat Aug 9 17:32:28 EDT 2003
- roll CPAN release
0.01 Thu Aug 7 03:40:54 2003
- original version; created by h2xs 1.22 with options
-Afn Algorithm::LCS
view all matches for this distribution
view release on metacpan or search on metacpan
Revision history for Perl extension Algorithm::LCSS.
0.01 Wed Sep 10 02:15:25 2003
- original version; created by h2xs 1.21 with options
-X Algorithm::LCSS
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/LUHN_XS.pm view on Meta::CPAN
=pod
=head1 NAME
Algorithm::LUHN_XS - Very Fast XS Version of the original Algorithm::LUHN
=head1 SYNOPSIS
use Algorithm::LUHN_XS qw/check_digit is_valid/;
lib/Algorithm/LUHN_XS.pm view on Meta::CPAN
$c = check_digit("A2C4E6G8");
print "It worked again\n" if is_valid("A2C4E6G8$c");
=head1 DESCRIPTION
This module is an XS version of the original Perl Module Algorithm::LUHN, which
was written by Tim Ayers. It should work exactly the same, only substantially
faster. The supplied check_digit() routine is 100% compatible with the pure
Perl Algorithm::LUHN module, while the faster check_digit_fast() and really fast
check_digit_rff() are not.
lib/Algorithm/LUHN_XS.pm view on Meta::CPAN
C<check_digit_fast: 2 secs ( 1.68 usr 0.00 sys) 59.52/s>
C<check_digit_rff: 1 secs ( 1.29 usr 0.00 sys) 77.52/s>
So, it's 35x to 53x faster than the original pure Perl module, depending on
how much compatibility with the original module you need.
The rest of the documentation is mostly a copy of the original docs, with some
additions for functions that are new.
This module calculates the Modulus 10 Double Add Double checksum, also known as
the LUHN Formula. This algorithm is used to verify credit card numbers and
Standard & Poor's security identifiers such as CUSIP's and CSIN's.
lib/Algorithm/LUHN_XS.pm view on Meta::CPAN
=item is_valid_fast CHECKSUMMED_NUM
=cut
=item is_valid_rff CHECKSUMMED_NUM
As with check_digit(), we have 3 versions of is_valid(), each one progressively
faster than the check_digit() that comes in the original pure Perl
Algorithm::LUHN module. Here's a benchmark of 1M total calls to is_valid():
C<Benchmark: timing 100 iterations>
C<Algorithm::LUHN: 100 secs (100.29 usr 0.01 sys) 1.00/s>
lib/Algorithm/LUHN_XS.pm view on Meta::CPAN
C<is_valid_fast: 2 secs ( 2.38 usr 0.05 sys) 41.15/s>
C<is_valid_rff: 2 secs ( 1.97 usr 0.08 sys) 48.78/s>
Algorithm::LUHN_XS varies from 38x to 48x times faster than the original
pure perl Algorithm::LUHN module. The is_valid() routine is 100% compatible
with the original, returning either '1' for success or the empty string ''
for failure. The is_valid_fast() routine returns 1 for success and 0 for
failure. Finally, the is_valid_rff() function also returns 1 for success
and 0 for failure, but only works with numeric input. If you supply any
alpha characters, it will return 0.
lib/Algorithm/LUHN_XS.pm view on Meta::CPAN
This module, because of how valid_chars() stores data in the XS portion,
is NOT thread safe.
The _fast and _rff versions of is_valid() and check_digit() don't have the
same return values for failure as the original Algorithm::LUHN module.
Specifically:
=over 4
=item * is_valid_fast() and is_valid_rff() return 0 on failure, but
lib/Algorithm/LUHN_XS.pm view on Meta::CPAN
Try to keep things in "string context".
=head1 SEE ALSO
L<Algorithm::LUHN> is the original pure perl module this is based on.
L<Algorithm::CheckDigits> provides a front-end to a large collection
of modules for working with check digits.
L<Business::CreditCard> provides three functions for checking credit
lib/Algorithm/LUHN_XS.pm view on Meta::CPAN
This program is free software; you can redistribute it and/or modify it under
the same terms as Perl itself.
=head1 CREDITS
Tim Ayers, for the original pure perl version of Algorithm::LUHN.
Neil Bowers, the current maintainer of Algorithm::LUHN.
The inspiration for this module was a PerlMonks post I made here:
L<https://perlmonks.org/?node_id=1226543>, and I received help
view all matches for this distribution
view release on metacpan or search on metacpan
# Revision history for Perl extension Algorithm::LatticePoints.
$Revision: 0.1 $ $Date: 2007/02/04 05:45:16 $
0.01 Sun Feb 4 13:58:05 2007
- original version; created by h2xs 1.23 with options
-XA -n Algorithm::LatticePoints
view all matches for this distribution
view release on metacpan or search on metacpan
Revision history for Perl extension Algorithm::LeakyBucket.
0.01 Wed Jul 18 16:10:11 2012
- original version; created by h2xs 1.23 with options
-AX -n Algorithm::LeakyBucket
0.06 Fri Jul 20 11:07:30 EDT 2012
- Removed old namspace base tricks.
view all matches for this distribution
view release on metacpan or search on metacpan
src/liblinear/linear.cpp view on Meta::CPAN
// this function returns the number of iterations
//
// See Yuan et al. (2010) and appendix of LIBLINEAR paper, Fan et al. (2008)
//
// To not regularize the bias (i.e., regularize_bias = 0), a constant feature = 1
// must have been added to the original data. (see -B and -R option)
#undef GETI
#define GETI(i) (y[i]+1)
// To support weights for instances, use GETI(i) (i)
src/liblinear/linear.cpp view on Meta::CPAN
// this function returns the number of iterations
//
// See Yuan et al. (2011) and appendix of LIBLINEAR paper, Fan et al. (2008)
//
// To not regularize the bias (i.e., regularize_bias = 0), a constant feature = 1
// must have been added to the original data. (see -B and -R option)
#undef GETI
#define GETI(i) (y[i]+1)
// To support weights for instances, use GETI(i) (i)
src/liblinear/linear.cpp view on Meta::CPAN
*x_space_ret = x_space;
delete [] col_ptr;
}
// label: label name, start: begin of each class, count: #data of classes, perm: indices to the original data
// perm, length l, must be allocated before calling this subroutine
static void group_classes(const problem *prob, int *nr_class_ret, int **label_ret, int **start_ret, int **count_ret, int *perm)
{
int l = prob->l;
int max_nr_class = 16;
view all matches for this distribution
view release on metacpan or search on metacpan
Line/Bresenham/C/C.pm view on Meta::CPAN
=over 8
=item Algorithm::Line::Bresenham
The original pure perl version.
=head1 AUTHOR and LICENSE
Lilo Huang, kenwu@cpan.org
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Algorithm/Line/Bresenham.pm view on Meta::CPAN
Variable thickness lines are implemented as described in
http://kt8216.unixcab.org/murphy/index.html ; This allows passing of
two subroutine references (so the left side and the right sides of the
line can have differently varying thicknesses) along with a
user originated parameter. The subroutine reference example is shown below:
my $leftFn=sub{
my ($arg,$p,$l)=@_;
# C<$arg> is passed by calling routine,
# C<$p> is point on line
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
# define D_PPP_TO_FOLD_CALLEE(s,r,l) \
Perl__to_utf8_fold_flags(aTHX_ s, r, l, FOLD_FLAGS_FULL, NULL)
# endif
/* The actual implementation of the backported macros. If too short, croak,
* otherwise call the original that doesn't have an upper limit parameter */
# define D_PPP_GENERIC_MULTI_ARG_TO(name, s, e,r,l) \
(((((e) - (s)) <= 0) \
/* We could just do nothing, but modern perls croak */ \
? (croak("Attempting case change on zero length string"), \
0) /* So looks like it returns something, and will compile */ \
D_PPP_GENERIC_MULTI_ARG_TO(FOLD,s,e,r,l)
#endif
#elif (PERL_BCDVERSION >= 0x5006000)
/* Here we have UTF-8 support, but using the original API where the case
* changing functions merely returned the changed code point; hence they
* couldn't handle multi-character results. */
# ifdef uvchr_to_utf8
# define D_PPP_UV_TO_UTF8 uvchr_to_utf8
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Algorithm/LinearManifoldDataClusterer.pm view on Meta::CPAN
my $error = $self->reconstruction_error($data_vec,$trailing_eigenvec_matrix,$ref_vec);
$reconstruction_error_for_a_ref_vec += $error;
}
push @reconstruction_errors, $reconstruction_error_for_a_ref_vec;
}
my $recon_error_for_original_mean = shift @reconstruction_errors;
my $smallest_error_randomly_selected_ref_vecs = List::Util::min(@reconstruction_errors);
my $minindex = List::Util::first { $_ == $smallest_error_randomly_selected_ref_vecs }
@reconstruction_errors;
my $refvec = $random_points[$minindex];
return $refvec;
lib/Algorithm/LinearManifoldDataClusterer.pm view on Meta::CPAN
Unfortunately, experiments show that the algorithm as proposed by Kambhatla and Leen
is much too sensitive to how the clusters are seeded initially. To get around this
limitation of the basic clustering-by-minimization-of-reconstruction-error, this
module implements a two phased approach. In B<Phase 1>, we introduce a multiplier
effect in our search for clusters by looking for C<M*K> clusters instead of the main
C<K> clusters. In this manner, we increase the odds that each original cluster will
be visited by one or more of the C<M*K> randomly selected seeds at the beginning,
where C<M> is the integer value given to the constructor parameter
C<cluster_search_multiplier>. Subsequently, we merge the clusters that belong
together in order to form the final C<K> clusters. That work is done in B<Phase 2>
of the algorithm.
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Algorithm/Loops.pm view on Meta::CPAN
Otherwise a true value is returned.
So, if you start out with a sorted array, then you can use that as your
first permutation and then call NextPermute* to get the next permutation
to use, until NextPermute* returns a false value (at which point your
array has been returned to its original, sorted order).
So you would use NextPermute() like this:
my @list= sort GetValuesSomehow();
do {
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
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
You'll need C<glib> installed to make this happy.
=head1 HISTORY
This was originally written using Inline, but never released due to
lack of round tuits. Recently a tuit supply arrived so I converted it
into XS to reduce dependencies.
=head1 BUGS
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Algorithm/MarkovChain.pm view on Meta::CPAN
Takes one optional parameter: C<recover_symbols>
C<recover_symbols> has meaning if your symbols differ from their true
values when stringifyed. With this option enabled steps are taken to
ensure that the original values for symbols are returned by the
I<spew> method.
=item $obj->seed()
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Algorithm/MasterMind.pm view on Meta::CPAN
solved; it contains partial solutions.
=head2 issue_first_Knuth
First combination looking like AABC for the normal
mastermind. Proposed by Knuth in one of his original papers.
=head2 issue_next()
Issues the next combination
view all matches for this distribution
view release on metacpan or search on metacpan
- Extended median() that it will accept a reference to
a list; but, pass by reference is only marginally (10%) faster.
- Made the quicksort algorithm default and bubblesort optional.
Tremendous improvement in computation time originated thereof.
- Rewrote the Perl interface to median(); options to median()
may be passed via an anonymous hash reference.
0.16 Mon Apr 17 16:46:48 CEST 2006
view all matches for this distribution
view release on metacpan or search on metacpan
This module complements L<Algorithm::Diff|Algorithm::Diff> by
providing three-way merge and diff functions.
In this documentation, the first list to C<diff3>, C<merge>, and
C<traverse_sequences3> is
called the `original' list. The second list is the `left' list. The
third list is the `right' list.
The optional key generation arguments are the same as in
L<Algorithm::Diff|Algorithm::Diff>. See L<Algorithm::Diff> for more
information.
Given references to three lists of items, C<diff3> performs a
three-way difference.
This function returns an array of operations describing how the
left and right lists differ from the original list. In scalar
context, this function returns a reference to such an array.
Perhaps an example would be useful.
Given the following three lists,
original: a b c e f h i k
left: a b d e f g i j k
right: a b c d e h i j k
merge: a b d e g i j k
The first element in each row is the array with the difference:
c - conflict (no two are the same)
l - left is different
o - original is different
r - right is different
u - unchanged
The next three elements are the lists from the original, left,
and right arrays respectively that the row refers to (in the synopsis,
these are C<@ancestor>, C<@a>, and C<@b>, respectively).
=head2 merge
view all matches for this distribution
view release on metacpan or search on metacpan
Revision history for Perl extension Algorithm::MinMax.
0.01 Tue May 27 17:59:59 2003
- original version; created by h2xs 1.21 with options
-XA -n Algorithm::MinMax
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Tie/Hash/MinPerfHashTwoLevel/OnDisk.pm view on Meta::CPAN
U16 key_len -> length of key
U16 val_len -> length of value
The hash function used is Siphash 1-3, which uses a 16 byte seed to produce
a 32 byte state vector used for hashing. The file contains the state vector
required for hashing and does not include the original seed.
=head2 EXPORT
None by default.
view all matches for this distribution
view release on metacpan or search on metacpan
Algorithm-NCS/Changes view on Meta::CPAN
Revision history for Perl extension Algorithm::NCS.
0.01 Wed Nov 30 16:34:03 2016
- original version; created by h2xs 1.23 with options
-A -n Algorithm::NCS --skip-ppport
0.02 Sun Dec 11 16:39:06 2016
- added description
0.03 Thu Apr 11 11:39:36 2018
- rewrited code
view all matches for this distribution
view release on metacpan or search on metacpan
whether the 'purge' flag was set. This has been fixed.
0.01 Tue Mar 18 18:45:34 2003
- original version; created by extracting the NaiveBayes code out of
AI::Categorizer::Learner::NaiveBayes
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Algorithm/Networksort.pm view on Meta::CPAN
# $itemcount - The number of items in a list to be joined.
# It may be negative.
# @list - The list
#
# Create a new list by performing a join on I<$itemcount> elements at a
# time on the original list. Any leftover elements from the end of the
# list become the last item of the new list, unless I<$itemcount> is
# negative, in which case the first item of the new list is made from the
# leftover elements from the front of the list.
#
sub semijoin
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
LICENSE.txt view on Meta::CPAN
received it.
Conditions
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
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 (\$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::PageRank.
0.01 Mon Jun 9 17:27:50 2003
- original version; created by h2xs 1.21 with options
-A Algorithm::PageRank
0.03 Sun, 22 Aug 2004 14:43:27 +0800
- rewrite using PDL
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