Result:
found more than 329 distributions - search limited to the first 2001 files matching your query ( run in 5.154 )


Algorithm-Evolutionary-Simple

 view release on metacpan or  search on metacpan

lib/Algorithm/Evolutionary/Simple.pm  view on Meta::CPAN

Applies all steps to arrive to a new generation, except
evaluation. Keeps the two best for the next generation.

=head2 get_pool_roulette_wheel( $population_arrayref, $fitness_of_hashref, $how_many_I_need )

Obtains a pool of new chromosomes using fitness_proportional selection


=head2 get_pool_binary_tournament( $population_arrayref, $fitness_of_hashref, $how_many_I_need )

Obtains a pool of new chromosomes using binary tournament, a greedier method.

 view all matches for this distribution


Algorithm-Evolve

 view release on metacpan or  search on metacpan

examples/breeding_perls.pl  view on Meta::CPAN

    my $self = shift;
    return 'my $x=1; my $y=1; ' . join(" ", @{$self->gene});
}

##############################################################################
## Now set up the population. We tell A::E how we want critters to be selected
## and replaced, how many breeding events per generation, the size of the
## population, etc. We also define a callback sub that gets called after every
## every generation. Among other things, its most important task is to
## determine the criteria for stopping the algorithm.
##############################################################################

use Algorithm::Evolve;
Algorithm::Evolve->new(
    critter_class   => 'main',
    selection       => 'roulette',
    replacement     => 'rank',
    parents_per_gen => 2,
    size            => 200,
    callback        => \&callback,
)->start;

 view all matches for this distribution


Algorithm-ExpectationMaximization

 view release on metacpan or  search on metacpan

lib/Algorithm/ExpectationMaximization.pm  view on Meta::CPAN

        my @all_tags = @{$self->{_data_id_tags}}; 
        my @seed_tags;
        foreach my $i (0..$self->{_K}-1) {
            push @seed_tags, $all_tags[int rand( $self->{_N} )];
        }
        print "Random Seeding: Randomly selected seeding tags are  @seed_tags\n\n";
        my ($seed_means, $seed_covars) = 
                        $self->find_seed_centered_covariances(\@seed_tags);
        $self->{_cluster_means} = $seed_means;
        $self->{_cluster_covariances} = $seed_covars;
    } elsif ($self->{_seeding} eq 'kmeans') {

lib/Algorithm/ExpectationMaximization.pm  view on Meta::CPAN

                                      seeding             => 'random',
                                      terminal_output     => 1,
                  );
 
  #  Note the choice for `seeding'. The choice `random' means that the clusterer will
  #  randomly select `K' data points to serve as initial cluster centers.  Other
  #  possible choices for the constructor parameter `seeding' are `kmeans' and
  #  `manual'.  With the `kmeans' option for `seeding', the output of a K-means
  #  clusterer is used for the cluster seeds and the initial cluster covariances.  If
  #  you use the `manual' option for seeding, you must also specify the data elements
  #  to use for seeding the clusters.

lib/Algorithm/ExpectationMaximization.pm  view on Meta::CPAN

used, the unobserved data is literally the missing data, in others, it is something
that cannot be seen directly but that nonetheless is relevant to the data actually
observed. For the case of clustering multidimensional numerical data that can be
modeled as a Gaussian mixture, it turns out that the best way to think of the
unobserved data is in terms of a sequence of random variables, one for each observed
data point, whose values dictate the selection of the Gaussian for that data point.
This point is explained in great detail in my on-line tutorial at
L<https://engineering.purdue.edu/kak/Tutorials/ExpectationMaximization.pdf>.

The EM algorithm in our context reduces to an iterative invocation of the following
steps: (1) Given the current guess for the means and the covariances of the different

lib/Algorithm/ExpectationMaximization.pm  view on Meta::CPAN

rule used in this module is the detection of no change over three consecutive
iterations in the values calculated for the priors.

This module provides three different choices for seeding the clusters: (1) random,
(2) kmeans, and (3) manual.  When random seeding is chosen, the algorithm randomly
selects C<K> data elements as cluster seeds.  That is, the data vectors associated
with these seeds are treated as initial guesses for the means of the Gaussian
distributions.  The covariances are then set to the values calculated from the entire
dataset with respect to the means corresponding to the seeds. With kmeans seeding, on
the other hand, the means and the covariances are set to whatever values are returned
by the kmeans algorithm.  And, when seeding is set to manual, you are allowed to

lib/Algorithm/ExpectationMaximization.pm  view on Meta::CPAN


    $clusterer->plot_hardcopy_data($data_visualization_mask); 

This method creates a PNG file that can be used to print out
a hardcopy of the data in different 2D and 3D subspaces of
the data space. The visualization mask is used to select the
subspace for the PNG image.

=back

=head1 HOW THE CLUSTERS ARE OUTPUT

lib/Algorithm/ExpectationMaximization.pm  view on Meta::CPAN


=item I<canned_example3.pl>

Like the first example, this example again involves three Gaussians, but now their
means are not co-located.  Additionally, we now seed the clusters manually by
specifying three selected data points as the initial guesses for the cluster means.
The datafile used for this example is C<mydatafile3.dat>.  The EM based clustering
for this data is shown in the files C<save_example_3_cluster_plot.png> and
C<save_example_3_posterior_prob_plot.png>, the former displaying the hard clusters
obtained by using the naive Bayes' classifier and the latter showing the soft
clusters obtained on the basis of the posterior class probabilities at the data

 view all matches for this distribution


Algorithm-FEC

 view release on metacpan or  search on metacpan

fec_imp.h  view on Meta::CPAN

	    pivot_row[icol] = 1 ;
	    for (ix = 0 ; ix < k ; ix++ )
		pivot_row[ix] = gf_mul(c, pivot_row[ix] );
	}
	/*
	 * from all rows, remove multiples of the selected row
	 * to zero the relevant entry (in fact, the entry is not zero
	 * because we know it must be zero).
	 * (Here, if we know that the pivot_row is the identity,
	 * we can optimize the addmul).
	 */

 view all matches for this distribution


Algorithm-FeatureSelection

 view release on metacpan or  search on metacpan

lib/Algorithm/FeatureSelection.pm  view on Meta::CPAN



=head1 DESCRIPTION

This library is an perl implementation of 'Pairwaise Mutual Information' and 'Information Gain' 
that are used as well-known method of feature selection on text mining fields.

=head1 METHOD

=head2 new()

 view all matches for this distribution


Algorithm-FloodControl

 view release on metacpan or  search on metacpan

lib/Algorithm/FloodControl.pm  view on Meta::CPAN

        backend_name => { type => SCALAR, optional => 1 },
        limits       => { type => HASHREF }
      };
    my $self = $class->SUPER::new($params);

    # be default backend will be selected by storage classname. but you can override it
    my $backend_name = __PACKAGE__ . '::Backend::' . ( $self->{backend_name} || ref $self->storage );
    load $backend_name;
    $self->backend_name($backend_name);
    return $self;
}

 view all matches for this distribution


Algorithm-Gutter

 view release on metacpan or  search on metacpan

eg/rainmidi3000.pl  view on Meta::CPAN

# SUBROUTINES

sub coinflip { int rand 2 }

# This is for when you want random pitches, possibly when using a drum
# SountFont and to select from random drum samples. The MIDI number
# range may well need to be fiddled with. Softlocks if you try to
# request too many pitches from it, so don't do that.
{
    my %seen;

 view all matches for this distribution


Algorithm-HITS

 view release on metacpan or  search on metacpan

lib/Algorithm/HITS.pm  view on Meta::CPAN

Algorithm::HITS - Perl implementation of HITS algorithm

=head1 DESCRIPTION

This module implements the HITS algorithm (Kleinberg's
hypertext-induced topic selection).

See also L<http://www2002.org/CDROM/refereed/643/node1.html>

=head1 USAGE

 view all matches for this distribution


Algorithm-History-Levels

 view release on metacpan or  search on metacpan

lib/Algorithm/History/Levels.pm  view on Meta::CPAN


After a while, your backups grow into tens and then hundreds of dump files. You
typically want to keep certain number of backups only, for example: 7 daily
backups, 4 weekly backups, 6 monthly backups (so you practically have 6 months
of history but do not need to store 6*30 = 180 dumps, only 7 + 4 + 6 = 17). This
is the routine you can use to select which files to keep and which to discard.

You provide the list of histories either in the form of Unix timestamps:

    [1497286800, 1497200400, 1497114000, ...]

lib/Algorithm/History/Levels.pm  view on Meta::CPAN


After a while, your backups grow into tens and then hundreds of dump files. You
typically want to keep certain number of backups only, for example: 7 daily
backups, 4 weekly backups, 6 monthly backups (so you practically have 6 months
of history but do not need to store 6*30 = 180 dumps, only 7 + 4 + 6 = 17). This
is the routine you can use to select which files to keep and which to discard.

You provide the list of histories either in the form of Unix timestamps:

 [1497286800, 1497200400, 1497114000, ...]

 view all matches for this distribution


Algorithm-Huffman

 view release on metacpan or  search on metacpan

Huffman.pm  view on Meta::CPAN

that would be 'er' instead of 'e'.

The greedy way isn't guarantueed to exist also in future versions.
(E.g., I could imagine to look for the next two (or n) possible encoding
substrings from the huffman tree
and to select the one with the shortest encoding bitstring).

=item $huff->encode($string)

Returns the huffman encoded packed bitvector of C<$string>.

 view all matches for this distribution


Algorithm-KMeans

 view release on metacpan or  search on metacpan

lib/Algorithm/KMeans.pm  view on Meta::CPAN

during the assignment step.

Ordinarily, the output produced by a K-Means clusterer will correspond to a local
minimum for the QoC values, as opposed to a global minimum.  The current
implementation protects against that when the module constructor is called with the
C<random> option for C<cluster_seeding> by trying different randomly selected initial
cluster centers and then selecting the one that gives the best overall QoC value.

A K-Means clusterer will generally produce good results if the overlap between the
clusters is minimal and if each cluster exhibits variability that is uniform in all
directions.  When the data variability is different along the different directions in
the data space, the results you obtain with a K-Means clusterer may be improved by

 view all matches for this distribution


Algorithm-KNN-XS

 view release on metacpan or  search on metacpan

ppport.h  view on Meta::CPAN

ck_require|||
ck_return|||
ck_rfun|||
ck_rvconst|||
ck_sassign|||
ck_select|||
ck_shift|||
ck_sort|||
ck_spair|||
ck_split|||
ck_subr|||

 view all matches for this distribution


Algorithm-LBFGS

 view release on metacpan or  search on metacpan

inc/Test/Builder.pm  view on Meta::CPAN

}


sub _autoflush {
    my($fh) = shift;
    my $old_fh = select $fh;
    $| = 1;
    select $old_fh;
}


sub _dup_stdhandles {
    my $self = shift;

 view all matches for this distribution


Algorithm-LibLinear

 view release on metacpan or  search on metacpan

src/liblinear/linear.cpp  view on Meta::CPAN

static int partition(feature_node *nodes, int low, int high)
{
	int i;
	int index;

	swap(nodes[low + rand()%(high-low+1)], nodes[high]); // select and move pivot to the end

	index = low;
	for(i = low; i < high; i++)
		if (compare_feature_node(&nodes[i], &nodes[high]) == -1)
		{

src/liblinear/linear.cpp  view on Meta::CPAN

	swap(nodes[high], nodes[index]);
	return index;
}

// rearrange nodes so that nodes[:k] contains nodes with the k smallest values.
static void quick_select_min_k(feature_node *nodes, int low, int high, int k)
{
	int pivot;
	if(low == high)
		return;
	pivot = partition(nodes, low, high);
	if(pivot == k)
		return;
	else if(k-1 < pivot)
		return quick_select_min_k(nodes, low, pivot-1, k);
	else
		return quick_select_min_k(nodes, pivot+1, high, k);
}

// A two-level coordinate descent algorithm for
// a scaled one-class SVM dual problem
//

src/liblinear/linear.cpp  view on Meta::CPAN

				len_Ilow++;
			}
		}
		max_inner_iter = min(max_inner_iter, min(len_Iup, len_Ilow));

		quick_select_min_k(max_negG_of_Iup, 0, len_Iup-1, len_Iup-max_inner_iter);
		qsort(&(max_negG_of_Iup[len_Iup-max_inner_iter]), max_inner_iter, sizeof(struct feature_node), compare_feature_node);

		quick_select_min_k(min_negG_of_Ilow, 0, len_Ilow-1, max_inner_iter);
		qsort(min_negG_of_Ilow, max_inner_iter, sizeof(struct feature_node), compare_feature_node);

		for (s=0; s<max_inner_iter; s++)
		{
			i = max_negG_of_Iup[len_Iup-s-1].index;

src/liblinear/linear.cpp  view on Meta::CPAN

	}

	delete[] C;
}

// Calculate the initial C for parameter selection
static double calc_start_C(const problem *prob, const parameter *param)
{
	int i;
	double xTx, max_xTx;
	max_xTx = 0;

 view all matches for this distribution


Algorithm-Line-Lerp

 view release on metacpan or  search on metacpan

ppport.h  view on Meta::CPAN

KEY_s|5.003007||Viu
KEY_say|5.009003||Viu
KEY_scalar|5.003007||Viu
KEY_seek|5.003007||Viu
KEY_seekdir|5.003007||Viu
KEY_select|5.003007||Viu
KEY_semctl|5.003007||Viu
KEY_semget|5.003007||Viu
KEY_semop|5.003007||Viu
KEY_send|5.003007||Viu
KEY_setgrent|5.003007||Viu

ppport.h  view on Meta::CPAN

PerlSock_listen|5.005000||Viu
PerlSock_ntohl|5.005000||Viu
PerlSock_ntohs|5.005000||Viu
PerlSock_recv|5.005000||Viu
PerlSock_recvfrom|5.005000||Viu
PerlSock_select|5.005000||Viu
PerlSock_send|5.005000||Viu
PerlSock_sendto|5.005000||Viu
PerlSock_sethostent|5.005000||Viu
PerlSock_setnetent|5.005000||Viu
PerlSock_setprotoent|5.005000||Viu

ppport.h  view on Meta::CPAN

seedDrand01|5.006000|5.006000|
SEEK_CUR|5.003007||Viu
seekdir|5.005000||Viu
SEEK_END|5.003007||Viu
SEEK_SET|5.003007||Viu
select|5.005000||Viu
Select_fd_set_t|5.003007|5.003007|Vn
SELECT_MIN_BITS|5.005003|5.005003|Vn
Semctl|5.004005||Viu
semun|5.006000||Viu
send|5.005000||Viu

 view all matches for this distribution


Algorithm-LinearManifoldDataClusterer

 view release on metacpan or  search on metacpan

lib/Algorithm/LinearManifoldDataClusterer.pm  view on Meta::CPAN

    my $self = shift;
    my $KM = $self->{_KM};
    my @initial_cluster_center_tags;
    my $visualization_msg;
    my @initial_cluster_center_indexes = $self->initialize_cluster_centers($KM, $self->{_N});
    print "Randomly selected indexes for cluster center tags:  @initial_cluster_center_indexes\n"
        if $self->{_debug};
    @initial_cluster_center_tags = map {$self->{_data_tags}->[$_]} @initial_cluster_center_indexes;
    my @initial_cluster_center_coords = map {$self->{_data_hash}->{$_}} @initial_cluster_center_tags;
    if ($self->{_debug}) {
        foreach my $centroid (@initial_cluster_center_coords) {

lib/Algorithm/LinearManifoldDataClusterer.pm  view on Meta::CPAN

            }
            return ([\@merged_cluster], \@newclusters);
        } else {
            die "\n\nBailing out!\n\n" .
                "No consensus support for dominant clusters in the graph partitioning step\n" .
                "of the algorithm. This can be caused by bad random selection of initial\n" .
                "cluster centers.  Please run this program again.\n";
        }
    } else {
        my @positive_clusters;
        my @negative_clusters;

lib/Algorithm/LinearManifoldDataClusterer.pm  view on Meta::CPAN

            $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

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.

lib/Algorithm/LinearManifoldDataClusterer.pm  view on Meta::CPAN


As should be clear from the C<Summary of the Algorithm> section, this parameter plays
a very important role in the successful clustering of your data.  As explained in
C<Description>, the basic algorithm used for clustering in Phase 1 --- clustering by
the minimization of the reconstruction error --- is sensitive to the choice of the
cluster seeds that are selected randomly at the beginning of the algorithm.  Should
it happen that the seeds miss one or more of the clusters, the clustering produced is
likely to not be correct.  By giving an integer value to C<cluster_search_multiplier>
that is greater than 1, you'll increase the odds that the randomly selected seeds
will see all clusters.  When you set C<cluster_search_multiplier> to C<M>, you ask
Phase 1 of the algorithm to construct C<M*K> clusters as opposed to just C<K>
clusters. Subsequently, in Phase 2, the module uses inter-cluster similarity based
graph partitioning to merge the C<M*K> clusters into C<K> clusters.

lib/Algorithm/LinearManifoldDataClusterer.pm  view on Meta::CPAN

=item B<visualize_data_on_sphere()>:

    $training_data_gen->visualize_data_on_sphere($output_file);

You can use this method to visualize the clusters produced by the data generator.
Since the clusters are located at randomly selected points on a unit sphere, by
looking at the output visually, you can quickly reject what the data generator has
produced and try again.

=back

 view all matches for this distribution


Algorithm-Loops

 view release on metacpan or  search on metacpan

lib/Algorithm/Loops.pm  view on Meta::CPAN

Specifying a true value is the same as specifying a routine that always
returns a true value.  Specifying a false value gives you the default
behavior (as if you did not include the OnlyWhen key at all).

If it is a code reference, then it is called each time a new item is
selected by any of the loops.  The list of selected items is passed in.

The Boolean value returned says whether to use the list of selected
values.  That is, a true value causes either \&Code to be called (if
specified) or the list to be returned by the iterator (if \&Code was not
specified).

If this key does not exist (or is specified with a false value), then a

lib/Algorithm/Loops.pm  view on Meta::CPAN

If you don't pass in a final code reference to NestedLoops, then
NestedLoops will return an iterator to you (without having performed
any iterations yet).

The iterator is a code reference.  Each time you call it, it returns the
next list of selected values.  Any arguments you pass in are ignored (at
least in this release).

=head3 Examples

=head4 Finding non-repeating sequences of digits.

One way would be to loop over all digit combinations but only selecting
ones without repeats:

    use Algorithm::Loops qw/ NestedLoops /;
    $|= 1;
    my $len= 3;

lib/Algorithm/Loops.pm  view on Meta::CPAN

    9 7 8
    9 8 7
    720 non-repeating 3-digit sequences.

A third way is to construct the list of values to loop over by excluding
values already selected:

    use Algorithm::Loops qw/ NestedLoops /;
    $|= 1;
    my $len= 3;
    my $verbose= 1;

 view all matches for this distribution


Algorithm-MarkovChain

 view release on metacpan or  search on metacpan

lib/Algorithm/MarkovChain.pm  view on Meta::CPAN


C<force_length> ensures you get exactly C<length> symbols returned
(note this overrides the behaviour of C<stop_at_terminal>)

C<strict_start> makes the spew operation always take a known start
state rather than selecting a sequence at random

=item $obj->increment_seen($sequence, $symbol)

Increments the seeness of a symbol following a sequence.

 view all matches for this distribution


Algorithm-MasterMind

 view release on metacpan or  search on metacpan

lib/Algorithm/MasterMind/Evo.pm  view on Meta::CPAN

  my $operators = [$m,$c];
  if ( $permutation_rate > 0 ) {
    my $p =  new Algorithm::Evolutionary::Op::Permutation $permutation_rate, $permutation_iters; 
    push @$operators, $p;
  }
  my $select = new Algorithm::Evolutionary::Op::Tournament_Selection $self->{'_tournament_size'} || 2;
  if (! $self->{'_ga'} ) { # Not given as an option
    $self->{'_ga'} = new Algorithm::Evolutionary::Op::Breeder_Diverser( $operators, $select );    
  }
  $self->{'_replacer'} = new Algorithm::Evolutionary::Op::Replace_Different;

  if (!$self->{'_distance'}) {
    $self->{'_distance'} = 'distance_taxicab';

 view all matches for this distribution


Algorithm-MedianSelect-XS

 view release on metacpan or  search on metacpan

ppport.h  view on Meta::CPAN

ck_retarget|||
ck_return|||
ck_rfun|||
ck_rvconst|||
ck_sassign|||
ck_select|||
ck_shift|||
ck_sort|||
ck_spair|||
ck_split|||
ck_subr|||

 view all matches for this distribution


Algorithm-NeedlemanWunsch

 view release on metacpan or  search on metacpan

lib/Algorithm/NeedlemanWunsch.pm  view on Meta::CPAN

    my $cb;
    if ($spec_name eq 'align') {
        $cb = sub {
	    my $arg = { align => [ @_ ] };
	    my $rv = &$univ_cb($arg);
	    croak "select_align callback returned invalid selection $rv."
	        unless $rv eq 'align';
	};
    } else {
        $cb = sub {
	    my $arg = { $spec_name => $_[0] };
	    my $rv = &$univ_cb($arg);
	    croak "select_align callback returned invalid selection $rv."
	        unless $rv eq $spec_name;
	};
    }

    return $cb;

lib/Algorithm/NeedlemanWunsch.pm  view on Meta::CPAN

        $cb = $_[0];
    } else {
        $cb = { };
    }

    if (exists($cb->{select_align})) {
        my @cn = qw(align shift_a shift_b);
	foreach (@cn) {
	    if (!exists($cb->{$_})) {
	        $cb->{$_} = _curry_callback($cb->{select_align}, $_);
	    }
	}
    }

    return $cb;

lib/Algorithm/NeedlemanWunsch.pm  view on Meta::CPAN

	}
    }

    my $move;
    my $cb = $self->{callbacks};
    if (exists($cb->{select_align})) {
        $move = &{$cb->{select_align}}($arg);
	if (!exists($arg->{$move})) {
	    die "select_align callback returned invalid selection $move.";
	}
    } else {
        my @cn = qw(align shift_a shift_b);
	foreach my $m (@cn) {
	    if (exists($arg->{$m})) {

lib/Algorithm/NeedlemanWunsch.pm  view on Meta::CPAN

               \@a,
               \@b,
               {   align     => \&on_align,
                   shift_a => \&on_shift_a,
                   shift_b => \&on_shift_b,
		   select_align => \&on_select_align
               });

=head1 DESCRIPTION

Sequence alignment is a way to find commonalities in two (or more)

lib/Algorithm/NeedlemanWunsch.pm  view on Meta::CPAN


Aligns a gap in the first sequence with an item of the second
sequence. The callback is called with 1 argument, which is the
position of the item in C<\@b>.

=item select_align

Called when there's more than one way to construct the optimal
alignment, with 1 argument which is a hashref enumerating the
possibilities. The hash may contain the following keys:

lib/Algorithm/NeedlemanWunsch.pm  view on Meta::CPAN

the position of the item in C<\@b>.

=back

All keys are optional, but the hash will always have at least one. The
callback must select one of the possibilities by returning one of the
keys.

=back

All callbacks are optional. When there is just one way to make the
optimal alignment, the C<Algorithm::NeedlemanWunsch> object prefers
calling the specific callbacks, but will call C<select_align> if it's
defined and the specific callback isn't.

Note that C<select_align> is called I<instead> of the specific
callbacks, not in addition to them - users defining both
C<select_align> and other callbacks should probably call the specific
callback explicitly from their C<select_align>, once it decides which
one to prefer.

Also note that the passed positions move backwards, from the sequence
ends to zero - if you're building the alignment in your callbacks, add
items to the front.

 view all matches for this distribution


Algorithm-Networksort-Chooser

 view release on metacpan or  search on metacpan

lib/Algorithm/Networksort/Chooser.pm  view on Meta::CPAN


  shift->();
}


sub build_selection_network {
  my ($network, $selection) = @_;

  my $pinned = {};
  $pinned->{$_} = 1 foreach (@$selection);

  my @reversed_network = reverse @$network;
  my @reversed_output;

  foreach my $comparator (@reversed_network) {

 view all matches for this distribution


Algorithm-Networksort

 view release on metacpan or  search on metacpan

README  view on Meta::CPAN


	Build test --Testlong

and the full suite will run (and depending on your machine, you may have
time to go out and get lunch). If you want to run only a single test file,
then the Module-Build switch '--test_files' can select that file for you:

	Build test --test_files=t/best.t --Testlong

Note that the '--Testlong' switch comes last.

 view all matches for this distribution


Algorithm-PageRank-XS

 view release on metacpan or  search on metacpan

ppport.h  view on Meta::CPAN

ck_retarget|||
ck_return|||
ck_rfun|||
ck_rvconst|||
ck_sassign|||
ck_select|||
ck_shift|||
ck_sort|||
ck_spair|||
ck_split|||
ck_subr|||

 view all matches for this distribution


Algorithm-Pair-Best2

 view release on metacpan or  search on metacpan

lib/Algorithm/Pair/Best2.pm  view on Meta::CPAN


package Algorithm::Pair::Best2;

our $VERSION = '2.040'; # VERSION

# ABSTRACT: select pairings (designed for Go tournaments, but can be used for anything).

use Carp;

sub new {
    my ($proto, %args) = @_;

lib/Algorithm/Pair/Best2.pm  view on Meta::CPAN


=encoding UTF-8

=head1 NAME

Algorithm::Pair::Best2 - select pairings (designed for Go tournaments, but can be used for anything).

=head1 VERSION

version 2.040

lib/Algorithm/Pair/Best2.pm  view on Meta::CPAN


=item @new_pairs = $pair-E<gt>B<pick> ( ?$window? )

Returns the best pairing found using the sliding window technique as
discussed in DESCRIPTION above.  B<window> is the number of pairs in the
sliding window.  If no B<window> argument is passed, the B<window> selected
in the B<new>, or the default value is used.

B<pick> returns the list (or a reference to the list in scalar context) of
items in pairing order: new_pair[0] is paired to new_pair[1], new_pair[2]
to new_pair[3], etc.

 view all matches for this distribution


Algorithm-Pair-Swiss

 view release on metacpan or  search on metacpan

lib/Algorithm/Pair/Swiss.pm  view on Meta::CPAN

=item $pair-E<gt>B<exclude>( @pairs )

Excludes the given pairs from further pairing. The @pairs array
should consist of a list of references to arrays, each containing the two
parties of that pair. This means you can easily feed it the output of
a previous call to $pair-E<gt>B<pairs>. The selection given is added
to previously excluded pairs.

If there was an odd number of parties, the lowest ranked party will be
paired with 'undef', unless it has already been paired with 'undef'. In
that case, the second-lowest ranked party will get that pairing. Etcetera,

 view all matches for this distribution


Algorithm-Permute

 view release on metacpan or  search on metacpan

bench/benchmark.pl  view on Meta::CPAN

        print "Module $m loaded.\n";
        push @modules, $m;
    }
}

# give user a chance to select modules to his/her interest
print "\nRun benchmark against:\n";
my @selected = grep {
    print "$_ [Y/n]? "; 
    if ($opts{'y'}) { print "Y\n"; 1 }
    else { my $ans = <>; $ans !~ /^N/i }
} @modules, qw/Combinatorial::Permutations Memoization LISPy/;
print "\n";

my $i = 0;
my %modules = map {
    sprintf("%02d_", $i++) . $_ => $runners{$_} 
} 'Algorithm::Permute qw(permute)', 'Algorithm::Permute', @selected;

# run benchmark
my $b = timethese($opts{l}, \%modules);
$opts{r} and do { print "\n"; cmpthese($b); };

 view all matches for this distribution


Algorithm-QuadTree-XS

 view release on metacpan or  search on metacpan

ppport.h  view on Meta::CPAN

KEY_s|5.003007||Viu
KEY_say|5.009003||Viu
KEY_scalar|5.003007||Viu
KEY_seek|5.003007||Viu
KEY_seekdir|5.003007||Viu
KEY_select|5.003007||Viu
KEY_semctl|5.003007||Viu
KEY_semget|5.003007||Viu
KEY_semop|5.003007||Viu
KEY_send|5.003007||Viu
KEY_setgrent|5.003007||Viu

ppport.h  view on Meta::CPAN

PerlSock_listen|5.005000||Viu
PerlSock_ntohl|5.005000||Viu
PerlSock_ntohs|5.005000||Viu
PerlSock_recv|5.005000||Viu
PerlSock_recvfrom|5.005000||Viu
PerlSock_select|5.005000||Viu
PerlSock_send|5.005000||Viu
PerlSock_sendto|5.005000||Viu
PerlSock_sethostent|5.005000||Viu
PerlSock_setnetent|5.005000||Viu
PerlSock_setprotoent|5.005000||Viu

ppport.h  view on Meta::CPAN

seedDrand01|5.006000|5.006000|
SEEK_CUR|5.003007||Viu
seekdir|5.005000||Viu
SEEK_END|5.003007||Viu
SEEK_SET|5.003007||Viu
select|5.005000||Viu
Select_fd_set_t|5.003007|5.003007|Vn
SELECT_MIN_BITS|5.005003|5.005003|Vn
Semctl|5.004005||Viu
semun|5.006000||Viu
send|5.005000||Viu

 view all matches for this distribution


Algorithm-RabinKarp

 view release on metacpan or  search on metacpan

t/hash.t  view on Meta::CPAN

    
  my ($start, $end) = @{$values[$i]};
  is_deeply [$start, $end], [$i, $i + $k - 1], 
    "$fragment position correctly recorded";
  is substr($source, $start, $end - $start + 1 ), $fragment,
    "The recorded offsets correctly select $fragment";
}

 view all matches for this distribution


Algorithm-RandomPointGenerator

 view release on metacpan or  search on metacpan

lib/Algorithm/RandomPointGenerator.pm  view on Meta::CPAN

has a default value of 500.

=item C<proposal_density_width>:

Given the current point, the Metropolis-Hastings randomly chooses a candidate for the
next point.  This random selection of a candidate point is carried out using what is
known as the "proposal density".  The module uses a bivariate Gaussian for the
proposal density.  The value supplied through this parameter controls the standard
deviations of the proposal Gaussian in the x and the y directions.  The default value
for this parameter is 0.1.  With that value for the parameter, the standard deviation
of the proposal density along the x direction will be set to 0.1 times the width of

 view all matches for this distribution


( run in 5.154 seconds using v1.01-cache-2.11-cpan-94b05bcf43c )