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
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/CriticalPath.pm view on Meta::CPAN
$g->delete_vertex($s);
}
$i++;
}
# $copy adds in the dummy start and end nodes, so we don't destroy the original.
my $copy = $self->graph()->deep_copy();
$copy->add_weighted_vertex($start,0);
$copy->add_weighted_vertex($end,0);
for my $n ($copy->source_vertices()) {
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
lib/Algorithm/CurveFit.pm view on Meta::CPAN
In order to prevent looping forever, you are strongly encouraged to make use of
the accuracy measure (see also: maximum_iterations).
The final set of parameters is B<not> returned from the subroutine but the
parameters are modified in-place. That means the original data structure will
hold the best estimate of the parameters.
=item xdata
This should be an array reference to an array holding the data for the
view all matches for this distribution
view release on metacpan or search on metacpan
ExamplesRandomizedTrees/classify_database_records.pl view on Meta::CPAN
$record_index++;
}
close FILEIN;
# Now classify all the records extracted from the database file:
my %original_classifications;
my %calculated_classifications;
foreach my $record_index (sort {$a <=> $b} keys %record_ids_with_features_and_vals) {
my @test_sample = @{$record_ids_with_features_and_vals{$record_index}};
# Let's now get rid of those feature=value combos when value is 'NA'
my $unknown_value_for_a_feature_flag;
map {$unknown_value_for_a_feature_flag = 1 if $_ =~ /=NA$/} @test_sample;
next if $unknown_value_for_a_feature_flag;
$rt->classify_with_all_trees( \@test_sample );
my $classification = $rt->get_majority_vote_classification();
printf("\nclassification for %5d: %10s original classification: %s", $record_index, $classification, $record_ids_with_class_labels{$record_index});
$original_classifications{$record_index} = $record_ids_with_class_labels{$record_index};
$classification =~ /=(.+)$/;
$calculated_classifications{$record_index} = $1;
}
my $total_errors = 0;
my @confusion_matrix_row1 = (0,0);
my @confusion_matrix_row2 = (0,0);
print "\n\nCalculating the error rate and the confusion matrix:\n";
foreach my $record_index (sort keys %calculated_classifications) {
$total_errors += 1 if $original_classifications{$record_index} ne $calculated_classifications{$record_index};
if ($original_classifications{$record_index} eq $class_names_used_in_database[1]) {
if ($calculated_classifications{$record_index} eq $class_names_used_in_database[1]) {
$confusion_matrix_row1[0] += 1;
} else {
$confusion_matrix_row1[1] += 1;
}
}
if ($original_classifications{$record_index} eq $class_names_used_in_database[0]) {
if ($calculated_classifications{$record_index} eq $class_names_used_in_database[1]) {
$confusion_matrix_row2[0] += 1;
} else {
$confusion_matrix_row2[1] += 1;
}
ExamplesRandomizedTrees/classify_database_records.pl view on Meta::CPAN
# Now classify all the records extracted from the database file:
foreach my $record_index (keys %record_ids_with_features_and_vals) {
my $test_sample = $record_ids_with_features_and_vals{$record_index};
$rt->classify_with_all_trees( $test_sample );
my $classification = $rt->get_majority_vote_classification();
printf("\nclassification for %5d: %10s original classification: %s", $record_index, $classification, $record_ids_with_class_labels{$record_index});
}
} else {
print "\nYou are allowed to enter only 'y' or 'n'. Try again.";
}
}
view all matches for this distribution
view release on metacpan or search on metacpan
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.
Finally, any free program is threatened constantly by software patents. We wish
to avoid the danger that redistributors of a free program will individually obtain
patent licenses, in effect making the program proprietary. To prevent this, we
have made it clear that any patent must be licensed for everyone's free use or
based on the Program), you indicate your acceptance of this License to do so,
and all its terms and conditions for copying, distributing or modifying the
Program or works based on it.
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. You are not responsible for enforcing compliance by third parties
to this License.
This section is intended to make thoroughly clear what is believed to be a
consequence of the rest of this License.
8. If the distribution and/or use of the Program is restricted in certain countries
either by patents or by copyrighted interfaces, the original copyright holder who
places the Program under this License may add an explicit geographical
distribution limitation excluding those countries, so that distribution is permitted
only in or among countries not thus excluded. In such case, this License
incorporates the limitation as if written in the body of this License.
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
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.
Finally, any free program is threatened constantly by software patents. We wish
to avoid the danger that redistributors of a free program will individually obtain
patent licenses, in effect making the program proprietary. To prevent this, we
have made it clear that any patent must be licensed for everyone's free use or
based on the Program), you indicate your acceptance of this License to do so,
and all its terms and conditions for copying, distributing or modifying the
Program or works based on it.
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. You are not responsible for enforcing compliance by third parties
to this License.
This section is intended to make thoroughly clear what is believed to be a
consequence of the rest of this License.
8. If the distribution and/or use of the Program is restricted in certain countries
either by patents or by copyrighted interfaces, the original copyright holder who
places the Program under this License may add an explicit geographical
distribution limitation excluding those countries, so that distribution is permitted
only in or among countries not thus excluded. In such case, this License
incorporates the limitation as if written in the body of this License.
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/Dependency.pm view on Meta::CPAN
# Add its depends to the stack
push @stack, $Item->depends;
$checked{$id} = 1;
# Add anything to the final output that wasn't one of
# the original input.
unless ( scalar grep { $id eq $_ } @_ ) {
push @depends, $id;
}
}
lib/Algorithm/Dependency.pm view on Meta::CPAN
#pod return, as a reference to an array, the ordered list of items you
#pod should act upon in whichever order this particular dependency handler
#pod uses - see L<Algorithm::Dependency::Ordered> for one that implements
#pod the most common ordering (process sequence).
#pod
#pod This would be the original names provided, plus those added to satisfy
#pod dependencies, in the preferred order of action. For the normal algorithm,
#pod where order it not important, this is alphabetical order. This makes it
#pod easier for someone watching a program operate on the items to determine
#pod how far you are through the task and makes any logs easier to read.
#pod
lib/Algorithm/Dependency.pm view on Meta::CPAN
return, as a reference to an array, the ordered list of items you
should act upon in whichever order this particular dependency handler
uses - see L<Algorithm::Dependency::Ordered> for one that implements
the most common ordering (process sequence).
This would be the original names provided, plus those added to satisfy
dependencies, in the preferred order of action. For the normal algorithm,
where order it not important, this is alphabetical order. This makes it
easier for someone watching a program operate on the items to determine
how far you are through the task and makes any logs easier to read.
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
a) Disclaiming warranty or limiting liability differently from the terms of
sections 15 and 16 of this License; or
b) Requiring preservation of specified reasonable legal notices or author
attributions in that material or in the Appropriate Legal Notices
displayed by works containing it; or
c) Prohibiting misrepresentation of the origin of that material, or
requiring that modified versions of such material be marked in reasonable
ways as different from the original version; or
d) Limiting the use for publicity purposes of names of licensors or authors
of the material; or
e) Declining to grant rights under trademark law for use of some trade
names, trademarks, or service marks; or
f) Requiring indemnification of licensors and authors of that material by
this License to do so.
10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically receives a
license from the original licensors, to run, modify and propagate that work,
subject to this License. You are not responsible for enforcing compliance by
third parties with this License.
An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
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 Package will still
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Algorithm/Diff/Apply.pm view on Meta::CPAN
# Converts all the hunks in an Algorithm::Diff-style diff to a
# normalised form in which all hunks are a) still internally
# contiguous, and b) have start indices which refer to items in the
# original array, before any diffs are applied. Normally, hunks
# consisting of only inserts don't meet criterion b).
#
# Allso attaches hash data if the hashing function is defined.
sub __homogenise_diff
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
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
ARTISTIC.txt view on Meta::CPAN
It also means that 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/Diff.pm view on Meta::CPAN
a b c d f g h j q z
a b c d e f g i j k r x y z
and you want to find the longest sequence of items that is present in
both original sequences in the same order. That is, you want to find
a new sequence I<S> which can be obtained from the first sequence by
deleting some items, and from the second sequence by deleting other
items. You also want I<S> to be as long as possible. In this case I<S>
is
lib/Algorithm/Diff.pm view on Meta::CPAN
=item C<Copy>
$copy = $diff->Copy( $newPos, $newBase );
C<Copy> returns a copy of the object. The copy and the original object
share most of their data, so making copies takes very little memory.
The copy maintains its own position (separate from the original), which
is the main purpose of copies. It also maintains its own base.
By default, the copy's position starts out the same as the original
object's position. But C<Copy> takes an optional first argument to set the
new position, so the following three snippets are equivalent:
$copy = $diff->Copy($pos);
lib/Algorithm/Diff.pm view on Meta::CPAN
$copy = $diff->Copy()->Reset($pos);
C<Copy> takes an optional second argument to set the base for
the copy. If you wish to change the base of the copy but leave
the position the same as in the original, here are two
equivalent ways:
$copy = $diff->Copy();
$copy->Base( 0 );
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Test/Base.pm view on Meta::CPAN
block_accessor 'name';
block_accessor 'description';
Spiffy::field 'seq_num';
Spiffy::field 'is_filtered';
Spiffy::field 'blocks_object';
Spiffy::field 'original_values' => {};
sub set_value {
no strict 'refs';
my $accessor = shift;
block_accessor $accessor
inc/Test/Base.pm view on Meta::CPAN
Carp::croak "Attempt to filter a block twice"
if $self->is_filtered;
for my $type (@$order) {
my $filters = $map->{$type}{filters};
my @value = $self->$type;
$self->original_values->{$type} = $value[0];
for my $filter ($self->_get_filters($type, $filters)) {
$Test::Base::Filter::arguments =
$filter =~ s/=(.*)$// ? $1 : undef;
my $function = "main::$filter";
no strict 'refs';
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Algorithm/DistanceMatrix.pm view on Meta::CPAN
my $tree = treecluster(data=>$distmat, method=>'a');
# Get your objects and the cluster IDs they belong to, assuming 5 clusters
my $cluster_ids = $tree->cut(5);
# Index corresponds to that of the original objects
print $objects->[2], ' belongs to cluster ', $cluster_ids->[2], "\n";
=head1 DESCRIPTION
This is a small helper package for L<Algorithm::Cluster>. That module provides
view all matches for this distribution