view release on metacpan or search on metacpan
lib/Algorithm/Diff/Apply.pm view on Meta::CPAN
opts => \%opt);
return wantarray ? @ary : \@ary;
}
# 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).
#
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Algorithm/Diff/HTMLTable.pm view on Meta::CPAN
my $new = $self->_file_info( $files{b}, 'new' );
my $id = defined $self->{id} ? qq~id="$self->{id}"~ : '';
return qq~
<table $id style="border: 1px solid;">
<thead>
<tr>
<th colspan="2"><span id="diff_old_info">$old</span></th>
<th colspan="2"><span id="diff_new_info">$new</span></th>
</tr>
lib/Algorithm/Diff/HTMLTable.pm view on Meta::CPAN
my %params = @_;
my ($line_nr_a, $line_a, $color_a) = @params{qw/line_nr_a line_a color_a/};
my ($line_nr_b, $line_b, $color_b) = @params{qw/line_nr_b line_b color_b/};
$color_a = $color_a ? qq~style="color: $color_a;"~ : '';
$color_b = $color_b ? qq~style="color: $color_b;"~ : '';
$line_a = encode_entities( $line_a // '' );
$line_b = encode_entities( $line_b // '' );
$line_a =~ s{ }{ }g;
$line_b =~ s{ }{ }g;
my $row = qq~
<tr style="border: 1px solid">
<td style="background-color: gray">$line_nr_a</td>
<td $color_a>$line_a</td>
<td style="background-color: gray">$line_nr_b</td>
<td $color_b>$line_b</td>
</tr>
~;
}
view all matches for this distribution
view release on metacpan or search on metacpan
of F<ppport.h> if you intend to be backward compatible only
up to a certain Perl version.
=head2 --cplusplus
Usually, F<ppport.h> will detect C++ style comments and
replace them with C style comments for portability reasons.
Using this option instructs F<ppport.h> to leave C++
comments untouched.
=head2 --quiet
}
}
if ($cppc) {
my $s = $cppc != 1 ? 's' : '';
warning("Uses $cppc C++ style comment$s, which is not portable");
}
if ($file{changes}) {
if (exists $opt{copy}) {
my $newfile = "$filename$opt{copy}";
view all matches for this distribution
view release on metacpan or search on metacpan
1.101420 2010-05-22 13:32:58 Europe/Vienna
- re-indented Changes
1.100870 2010-03-28 10:09:48 Europe/Vienna
- converted distribution to Dist::Zilla style
0.04 Tue 2010.02.09 23:57:00 CET (Marcel Gruenauer <marcel@cpan.org>)
- releng
0.03 Thu Jul 24 20:35:33 CEST 2008 (Marcel Gruenauer <marcel@cpan.org>)
- Changed dist style and Changes back to standard. People didn't like it -
the nail that sticks out gets hammered down.
- Added standard test files; this will also help with CPANTS.
0.02 Wed, 28 Nov 2007 11:15:12 -0000 (Marcel Gruenauer <marcel@cpan.org>)
- set the version to 0.02
view all matches for this distribution
view release on metacpan or search on metacpan
t/iqbi-damiq.t view on Meta::CPAN
plan skip_all => "$script not found (not running from the dist root?)"
unless -f $script;
alarm 120; # watchdog: a hung daemon must fail the test, not the harness
# blib for an installed-style run, lib as the fallback; missing include
# dirs are harmless
my @perl = ( $^X, '-Iblib/lib', '-Iblib/arch', '-Ilib' );
# run a command, returning its exit code and combined stdout/stderr
sub run_capture {
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Algorithm/Evolutionary/Fitness/P_Peaks.pm view on Meta::CPAN
return $self;
}
=head2 random_string()
Returns random string in the same style than the peaks. Useful for testing.
=cut
sub random_string {
my $self = shift;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Algorithm/Evolutionary.pm view on Meta::CPAN
Algorithm::Evolutionary - Perl module for performing paradigm-free evolutionary algorithms.
=head1 SYNOPSIS
#Short way of loading a lot of modules, POE-style
use Algorithm::Evolutionary qw( Op::This_Operator
Individual::That_Individual
Fitness::Some_Fitness);
# other modules with explicit importation
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Algorithm/ExpectationMaximization.pm view on Meta::CPAN
# $self->{_data} hash and get the data coordinates associated with each symbolic
# label in a cluster. The numerical data thus generated is then written out to a
# temp file. When doing so we must remember to insert TWO BLANK LINES between the
# data blocks corresponding to the different clusters. This constraint is imposed
# on us by Gnuplot when plotting data from the same file since we want to use
# different point styles for the data points in different cluster files.
# Subsequently, we call upon the Perl interface provided by the Graphics::GnuplotIF
# module to plot the data clusters.
sub visualize_clusters {
my $self = shift;
my $v_mask;
lib/Algorithm/ExpectationMaximization.pm view on Meta::CPAN
push @all_minmaxvals, @all_minvals;
push @all_minmaxvals, @all_maxvals;
my ($abs_minval,$abs_maxval) = minmax(\@all_minmaxvals);
my $delta = ($abs_maxval - $abs_minval) / 100.0;
$plot->gnuplot_cmd("set boxwidth 3");
$plot->gnuplot_cmd("set style fill solid border -1");
$plot->gnuplot_cmd("set ytics out nomirror");
$plot->gnuplot_cmd("set style data histograms");
$plot->gnuplot_cmd("set style histogram clustered");
$plot->gnuplot_cmd("set title 'Clusters shown through histograms'");
$plot->gnuplot_cmd("set xtics rotate by 90 offset 0,-5 out nomirror");
foreach my $cindex (0..@all_clusters_for_hist-1) {
my $filename = basename($master_datafile);
my $temp_file = "__temp1dhist_" . "$cindex" . "_" . $filename;
lib/Algorithm/ExpectationMaximization.pm view on Meta::CPAN
push @all_minmaxvals, @all_minvals;
push @all_minmaxvals, @all_maxvals;
my ($abs_minval,$abs_maxval) = minmax(\@all_minmaxvals);
my $delta = ($abs_maxval - $abs_minval) / 100.0;
$plot->gnuplot_cmd("set boxwidth 3");
$plot->gnuplot_cmd("set style fill solid border -1");
$plot->gnuplot_cmd("set ytics out nomirror");
$plot->gnuplot_cmd("set style data histograms");
$plot->gnuplot_cmd("set style histogram clustered");
$plot->gnuplot_cmd("set title 'Clusters shown through histograms'");
$plot->gnuplot_cmd("set xtics rotate by 90 offset 0,-5 out nomirror");
foreach my $cindex (0..@all_clusters_for_hist-1) {
my $filename = basename($master_datafile);
my $temp_file = "__temp1dhist_" . "$cindex" . "_" . $filename;
lib/Algorithm/ExpectationMaximization.pm view on Meta::CPAN
push @all_minmaxvals, @all_minvals;
push @all_minmaxvals, @all_maxvals;
my ($abs_minval,$abs_maxval) = minmax(\@all_minmaxvals);
my $delta = ($abs_maxval - $abs_minval) / 100.0;
$plot->gnuplot_cmd("set boxwidth 3");
$plot->gnuplot_cmd("set style fill solid border -1");
$plot->gnuplot_cmd("set ytics out nomirror");
$plot->gnuplot_cmd("set style data histograms");
$plot->gnuplot_cmd("set style histogram clustered");
$plot->gnuplot_cmd("set title 'Individual distributions shown through histograms'");
$plot->gnuplot_cmd("set xtics rotate by 90 offset 0,-5 out nomirror");
foreach my $cindex (0..@all_clusters_for_hist-1) {
my $localfilename = basename($filename);
my $temp_file = "__temp1dhist_" . "$cindex" . "_" . $localfilename;
lib/Algorithm/ExpectationMaximization.pm view on Meta::CPAN
push @all_minmaxvals, @all_minvals;
push @all_minmaxvals, @all_maxvals;
my ($abs_minval,$abs_maxval) = minmax(\@all_minmaxvals);
my $delta = ($abs_maxval - $abs_minval) / 100.0;
$plot->gnuplot_cmd("set boxwidth 3");
$plot->gnuplot_cmd("set style fill solid border -1");
$plot->gnuplot_cmd("set ytics out nomirror");
$plot->gnuplot_cmd("set style data histograms");
$plot->gnuplot_cmd("set style histogram clustered");
$plot->gnuplot_cmd("set title 'Individual distributions shown through histograms'");
$plot->gnuplot_cmd("set xtics rotate by 90 offset 0,-5 out nomirror");
foreach my $cindex (0..@all_clusters_for_hist-1) {
my $localfilename = basename($filename);
my $temp_file = "__temp1dhist_" . "$cindex" . "_" . $localfilename;
lib/Algorithm/ExpectationMaximization.pm view on Meta::CPAN
@all_data = map {chomp $_; $_} @all_data;
@all_data = grep $_, @all_data;
my ($minval,$maxval) = minmax(\@all_data);
my $delta = ($maxval - $minval) / 100.0;
$plot->gnuplot_cmd("set boxwidth 3");
$plot->gnuplot_cmd("set style fill solid border -1");
$plot->gnuplot_cmd("set ytics out nomirror");
$plot->gnuplot_cmd("set style data histograms");
$plot->gnuplot_cmd("set style histogram clustered");
$plot->gnuplot_cmd("set title 'Overall distribution of 1D data'");
$plot->gnuplot_cmd("set xtics rotate by 90 offset 0,-5 out nomirror");
my $localfilename = basename($filename);
my $temp_file = "__temp1dhist_" . $localfilename;
unlink $temp_file if -e $temp_file;
lib/Algorithm/ExpectationMaximization.pm view on Meta::CPAN
@all_data = map {chomp $_; $_} @all_data;
@all_data = grep $_, @all_data;
my ($minval,$maxval) = minmax(\@all_data);
my $delta = ($maxval - $minval) / 100.0;
$plot->gnuplot_cmd("set boxwidth 3");
$plot->gnuplot_cmd("set style fill solid border -1");
$plot->gnuplot_cmd("set ytics out nomirror");
$plot->gnuplot_cmd("set style data histograms");
$plot->gnuplot_cmd("set style histogram clustered");
$plot->gnuplot_cmd("set title 'Overall distribution of 1D data'");
$plot->gnuplot_cmd("set xtics rotate by 90 offset 0,-5 out nomirror");
my $localfilename = basename($filename);
my $temp_file = "__temp1dhist_" . $localfilename;
unlink $temp_file if -e $temp_file;
view all matches for this distribution
view release on metacpan or search on metacpan
t/pod-coverage.t view on Meta::CPAN
eval "use Test::Pod::Coverage $min_tpc";
plan skip_all => "Test::Pod::Coverage $min_tpc required for testing POD coverage"
if $@;
# Test::Pod::Coverage doesn't require a minimum Pod::Coverage version,
# but older versions don't recognize some common documentation styles
my $min_pc = 0.18;
eval "use Pod::Coverage $min_pc";
plan skip_all => "Pod::Coverage $min_pc required for testing POD coverage"
if $@;
view all matches for this distribution
view release on metacpan or search on metacpan
t/pod-coverage.t view on Meta::CPAN
eval "use Test::Pod::Coverage $min_tpc";
plan skip_all => "Test::Pod::Coverage $min_tpc required for testing POD coverage"
if $@;
# Test::Pod::Coverage doesn't require a minimum Pod::Coverage version,
# but older versions don't recognize some common documentation styles
my $min_pc = 0.18;
eval "use Pod::Coverage $min_pc";
plan skip_all => "Pod::Coverage $min_pc required for testing POD coverage"
if $@;
view all matches for this distribution
view release on metacpan or search on metacpan
xt/friedrichshagen.kml view on Meta::CPAN
</PolyStyle>
</Style>
<Placemark>
<name>Tour</name>
<description>enable/disable</description>
<styleUrl>#yellowLineGreenPoly</styleUrl>
<LineString>
<extrude>1</extrude>
<tessellate>1</tessellate>
<altitudeMode>absolute</altitudeMode>
<coordinates>
view all matches for this distribution
view release on metacpan or search on metacpan
t/pod-coverage.t view on Meta::CPAN
eval "use Test::Pod::Coverage $min_tpc";
plan skip_all => "Test::Pod::Coverage $min_tpc required for testing POD coverage"
if $@;
# Test::Pod::Coverage doesn't require a minimum Pod::Coverage version,
# but older versions don't recognize some common documentation styles
my $min_pc = 0.18;
eval "use Pod::Coverage $min_pc";
plan skip_all => "Pod::Coverage $min_pc required for testing POD coverage"
if $@;
view all matches for this distribution
view release on metacpan or search on metacpan
t/pod-coverage.t view on Meta::CPAN
eval "use Test::Pod::Coverage $min_tpc";
plan skip_all => "Test::Pod::Coverage $min_tpc required for testing POD coverage"
if $@;
# Test::Pod::Coverage doesn't require a minimum Pod::Coverage version,
# but older versions don't recognize some common documentation styles
my $min_pc = 0.18;
eval "use Pod::Coverage $min_pc";
plan skip_all => "Pod::Coverage $min_pc required for testing POD coverage"
if $@;
view all matches for this distribution
view release on metacpan or search on metacpan
t/pod-coverage.t view on Meta::CPAN
plan skip_all =>
"Test::Pod::Coverage $min_tpc required for testing POD coverage"
if $@;
# Test::Pod::Coverage doesn't require a minimum Pod::Coverage version,
# but older versions don't recognize some common documentation styles
my $min_pc = 0.18;
eval "use Pod::Coverage $min_pc";
plan skip_all => "Pod::Coverage $min_pc required for testing POD coverage"
if $@;
view all matches for this distribution
view release on metacpan or search on metacpan
of F<ppport.h> if you intend to be backward compatible only
down to a certain Perl version.
=head2 --cplusplus
Usually, F<ppport.h> will detect C++ style comments and
replace them with C style comments for portability reasons.
Using this option instructs F<ppport.h> to leave C++
comments untouched.
=head2 --quiet
}
}
if ($cppc) {
my $s = $cppc != 1 ? 's' : '';
warning("Uses $cppc C++ style comment$s, which is not portable");
}
my $s = $warnings != 1 ? 's' : '';
my $warn = $warnings ? " ($warnings warning$s)" : '';
info("Analysis completed$warn");
view all matches for this distribution
view release on metacpan or search on metacpan
misc/make_manifest.pl view on Meta::CPAN
}
P.indent {
font: small verdana, arial, helvetica, sans-serif;
color: black;
background-color: white;
list-style-type : circle;
list-style-position : inside;
margin-left : 16.0pt;
}
PRE.programlisting
{
font-size : 9.0pt;
list-style-type : disc;
margin-left : 16.0pt;
margin-top : -14.0pt;
}
INPUT {
font: bold small verdana, arial, helvetica, sans-serif;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Algorithm/KMeans.pm view on Meta::CPAN
# $self->{_original_data} hash and get the data coordinates associated with each
# symbolic label in a cluster. The numerical data thus generated is then written
# out to a temp file. When doing so we must remember to insert TWO BLANK LINES
# between the data blocks corresponding to the different clusters. This constraint
# is imposed on us by Gnuplot when plotting data from the same file since we want to
# use different point styles for the data points in different cluster files.
#
# Subsequently, we call upon the Perl interface provided by the Graphics::GnuplotIF
# module to plot the data clusters.
sub visualize_clusters {
my $self = shift;
view all matches for this distribution
view release on metacpan or search on metacpan
of F<ppport.h> if you intend to be backward compatible only
down to a certain Perl version.
=head2 --cplusplus
Usually, F<ppport.h> will detect C++ style comments and
replace them with C style comments for portability reasons.
Using this option instructs F<ppport.h> to leave C++
comments untouched.
=head2 --quiet
}
}
if ($cppc) {
my $s = $cppc != 1 ? 's' : '';
warning("Uses $cppc C++ style comment$s, which is not portable");
}
my $s = $warnings != 1 ? 's' : '';
my $warn = $warnings ? " ($warnings warning$s)" : '';
info("Analysis completed$warn");
view all matches for this distribution
view release on metacpan or search on metacpan
CONTRIBUTING.md view on Meta::CPAN
git checkout -b feature/add-riscv-support
# For a bug fix:
git checkout -b fix/struct-classification-bug
```
4. **Make Your Changes**: Write your code. Please adhere to the existing coding style and add comments to new or complex logic.
5. **Test Your Changes**: A pull request is far more likely to be accepted if it includes tests. If you add new functionality, please add a corresponding test case.
6. **Update the Changelog**: Add an entry to the `[Unreleased]` section of `CHANGELOG.md` describing your change.
7. **Submit a Pull Request**: Push your branch to your fork and open a pull request against the `main` branch of the original repository. Please provide a clear description of your changes and link to the relevant issue (e.g., `Fixes #123`).
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Algorithm/Kelly.pm view on Meta::CPAN
Returns the optimal L<fraction|https://en.wikipedia.org/wiki/Kelly_criterion> of bankroll to wager, using the Kelly Criterion, given the C<$probability> and C<$payoff>. Payoff should be the net odds of the wager, so the value of 3-to-1 would be 3. Th...
=head1 CONVERTING ODDS
Odds are usually presented in one of three styles: decimal, fraction or American. The C<optimal_f> sub requires the net decimal odds. These odds are all equal:
Type Example Net Odds
---- -------- --------
Decimal 4.0 3.0
Fraction 3/1 3.0
view all matches for this distribution
view release on metacpan or search on metacpan
perl Makefile.PL -n
DOCUMENTATION
POD style documentation is included in ./lib/Algorithm/Knapsack.pm and
./bin/filesack. These are normally converted to manual pages and installed
as part of the "make install" process.
AUTHOR
view all matches for this distribution
view release on metacpan or search on metacpan
- Small refactoring on the test suite
0.11 Web Jan 24 16:52:00 2008
- Some small fixes
- converted the line breaks in the C source files to Unix
style. The former DOS style line breaks make the module
failed to be compiled on some platforms
- rewrote Makefile.PL by Module::Install
- reorganized the structure of the documentation
- add a license file
view all matches for this distribution
view release on metacpan or search on metacpan
misc/make_manifest.pl view on Meta::CPAN
}
P.indent {
font: small verdana, arial, helvetica, sans-serif;
color: black;
background-color: white;
list-style-type : circle;
list-style-position : inside;
margin-left : 16.0pt;
}
PRE.programlisting
{
font-size : 9.0pt;
list-style-type : disc;
margin-left : 16.0pt;
margin-top : -14.0pt;
}
INPUT {
font: bold small verdana, arial, helvetica, sans-serif;
view all matches for this distribution
view release on metacpan or search on metacpan
t/pod-coverage.t view on Meta::CPAN
eval "use Test::Pod::Coverage $min_tpc";
plan skip_all => "Test::Pod::Coverage $min_tpc required for testing POD coverage"
if $@;
# Test::Pod::Coverage doesn't require a minimum Pod::Coverage version,
# but older versions don't recognize some common documentation styles
my $min_pc = 0.18;
eval "use Pod::Coverage $min_pc";
plan skip_all => "Pod::Coverage $min_pc required for testing POD coverage"
if $@;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Algorithm/Line/typemap view on Meta::CPAN
##
## Copyright (c) 2023 Jeremy Mates
## All rights reserved.
##
## This typemap is designed specifically to make it easier to handle
## Perl-style blessed objects in XS. In particular, it takes care of
## blessing the object into the correct class (even for derived classes).
##
##
###############################################################################
## vi:et:sw=4 ts=4
view all matches for this distribution
view release on metacpan or search on metacpan
of F<ppport.h> if you intend to be backward compatible only
down to a certain Perl version.
=head2 --cplusplus
Usually, F<ppport.h> will detect C++ style comments and
replace them with C style comments for portability reasons.
Using this option instructs F<ppport.h> to leave C++
comments untouched.
=head2 --quiet
}
}
if ($cppc) {
my $s = $cppc != 1 ? 's' : '';
warning("Uses $cppc C++ style comment$s, which is not portable");
}
my $s = $warnings != 1 ? 's' : '';
my $warn = $warnings ? " ($warnings warning$s)" : '';
info("Analysis completed$warn");
view all matches for this distribution
view release on metacpan or search on metacpan
of F<ppport.h> if you intend to be backward compatible only
down to a certain Perl version.
=head2 --cplusplus
Usually, F<ppport.h> will detect C++ style comments and
replace them with C style comments for portability reasons.
Using this option instructs F<ppport.h> to leave C++
comments untouched.
=head2 --quiet
}
}
if ($cppc) {
my $s = $cppc != 1 ? 's' : '';
warning("Uses $cppc C++ style comment$s, which is not portable");
}
my $s = $warnings != 1 ? 's' : '';
my $warn = $warnings ? " ($warnings warning$s)" : '';
info("Analysis completed$warn");
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Algorithm/Networksort.pm view on Meta::CPAN
<svg xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink" width="90" height="84" viewbox="0 0 90 84">
<title>Bose-Nelson Sort for N = 4</title>
<defs>
<g id="I_1c13" style="stroke-width:2; fill:#000; stroke:#000" >
<line x1="12" y1="0" x2="78" y2="0" />
</g>
<g id="C1_1c13" style="stroke-width:2;fill:#000; stroke:#000" >
<line x1="0" y1="0" x2="0" y2="14" />
<circle cx="0" cy="0" r="2" /> <circle cx="0" cy="14" r="2" />
</g>
<g id="C2_1c13" style="stroke-width:2;fill:#000; stroke:#000" >
<line x1="0" y1="0" x2="0" y2="28" />
<circle cx="0" cy="0" r="2" /> <circle cx="0" cy="28" r="2" />
</g>
</defs>
lib/Algorithm/Networksort.pm view on Meta::CPAN
described below.
=head3 formats()
An array reference of format strings, for use in formatted printing (see
L<formatted()>). You may use as many sprintf-style formats as you like
to form your output.
$nw->formats([ "swap(%d, %d) ", "if ($card[%d] < $card[%d]);\n" ]);
=head3 index_base()
lib/Algorithm/Networksort.pm view on Meta::CPAN
<svg xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink" width="278" height="154" viewbox="0 0 278 154">
<title>9-input Network by Robert W. Floyd</title>
<defs>
<g id="I_454d" style="stroke-width:2" >
<line style="fill:#000; stroke:#000" x1="18" y1="0" x2="260" y2="0" />
<circle style="fill:#000; stroke:#000" cx="18" cy="0" r="2" /> <circle style="fill:#000; stroke:#000" cx="260" cy="0" r="2" />
</g>
<g id="C1_454d" style="stroke-width:2" >
<line style="fill:#000; stroke:#000" x1="0" y1="0" x2="0" y2="14" />
<circle style="fill:#04c; stroke:#04c" cx="0" cy="0" r="2" /> <circle style="fill:#00c; stroke:#00c" cx="0" cy="14" r="2" />
</g>
<g id="C3_454d" style="stroke-width:2" >
<line style="fill:#000; stroke:#000" x1="0" y1="0" x2="0" y2="42" />
<circle style="fill:#04c; stroke:#04c" cx="0" cy="0" r="2" /> <circle style="fill:#00c; stroke:#00c" cx="0" cy="42" r="2" />
</g>
<g id="C2_454d" style="stroke-width:2" >
<line style="fill:#000; stroke:#000" x1="0" y1="0" x2="0" y2="28" />
<circle style="fill:#04c; stroke:#04c" cx="0" cy="0" r="2" /> <circle style="fill:#00c; stroke:#00c" cx="0" cy="28" r="2" />
</g>
<g id="C4_454d" style="stroke-width:2" >
<line style="fill:#000; stroke:#000" x1="0" y1="0" x2="0" y2="56" />
<circle style="fill:#04c; stroke:#04c" cx="0" cy="0" r="2" /> <circle style="fill:#00c; stroke:#00c" cx="0" cy="56" r="2" />
</g>
</defs>
<g id="floyd09_454d">
<use xlink:href="#I_454d" y="21" /> <use xlink:href="#I_454d" y="35" />
lib/Algorithm/Networksort.pm view on Meta::CPAN
#
# Set up the input line template, and either set a single
# default color, or color the components individually.
#
#
my $g_style = qq(style="stroke-width:$grset{inputline});
my $b_style;
my $l_style;
my $e_style;
if ($monotone)
{
$g_style .= qq(; fill:$clrset{foreground}; stroke:$clrset{foreground}");
$b_style = "";
$l_style = "";
$e_style = "";
}
else
{
$g_style .= qq(");
$b_style = qq(style="fill:$clrset{inputbegin}; stroke:$clrset{inputbegin}");
$l_style = qq(style="fill:$clrset{inputline}; stroke:$clrset{inputline}");
$e_style = qq(style="fill:$clrset{inputend}; stroke:$clrset{inputend}");
}
$string .=
qq( <defs>\n) .
qq( <!-- Define the input line template. -->\n) .
qq( <g id="I$salt" $g_style >\n) .
qq( <desc>Input line</desc>\n) .
qq( <line $l_style x1="$grset{hz_margin}" y1="0" x2="$right_margin" y2="0" />\n);
if ($i_radius > 0)
{
$string .= qq( <circle $b_style cx="$grset{hz_margin}" cy="0" r="$i_radius" />) .
qq( <circle $e_style cx="$right_margin" cy="0" r="$i_radius" />\n);
}
$string .= qq( </g>\n\n);
#
lib/Algorithm/Networksort.pm view on Meta::CPAN
# either set a single default color, or color the components
# individually.
#
$string .= qq( <!-- Define the different comparator lines. -->\n);
$g_style = qq(style="stroke-width:$grset{compline});
if ($monotone)
{
$g_style .= qq(;fill:$clrset{foreground}; stroke:$clrset{foreground}");
$b_style = "";
$l_style = "";
$e_style = "";
}
else
{
$g_style .= qq(");
$l_style = qq(style="fill:$clrset{compline}; stroke:$clrset{compline}");
$b_style = qq(style="fill:$clrset{compbegin}; stroke:$clrset{compbegin}");
$e_style = qq(style="fill:$clrset{compend}; stroke:$clrset{compend}");
}
my @cmptr = (0) x $inputs;
for my $comparator (@$network)
{
lib/Algorithm/Networksort.pm view on Meta::CPAN
$cmptr[$clen] = 1;
my $endpoint = $vcoord[$to] - $vcoord[$from];
$string .=
qq( <g id="C$clen$salt" $g_style >\n) .
qq( <desc>Comparator size $clen</desc>\n) .
qq( <line $l_style x1="0" y1="0" x2="0" y2="$endpoint" />\n);
if ($c_radius > 0)
{
$string .= qq( <circle $b_style cx="0" cy="0" r="$c_radius" />) .
qq( <circle $e_style cx="0" cy="$endpoint" r="$c_radius" />\n);
}
$string .= qq( </g>\n);
}
}
lib/Algorithm/Networksort.pm view on Meta::CPAN
# If there's a background color, insert as the first element a <rect>
# with the full size of the view and a fill of the desired color.
#
if (defined $clrset{background})
{
$string .= qq( <rect width="100%" height="100%" style="fill:$clrset{background}" />\n);
}
$string .= qq( <!-- Draw the input lines. -->\n);
$string .= qq( <use xlink:href="#I$salt" y="$vcoord[$_]" />\n) for (0..$inputs-1);
view all matches for this distribution
view release on metacpan or search on metacpan
- Moved to git and github.
- Update License.
----
Revision 1.4 2000/03/08 05:57:40 abigail
Fixed bug that prevented in situ shuffling.
Changed the wording of the license once again. (MIT/X style)
----
Revision 1.3 1999/03/01 20:54:06 abigail
Changed package name to Algorithm::*
Changed license.
----
view all matches for this distribution
view release on metacpan or search on metacpan
of F<ppport.h> if you intend to be backward compatible only
down to a certain Perl version.
=head2 --cplusplus
Usually, F<ppport.h> will detect C++ style comments and
replace them with C style comments for portability reasons.
Using this option instructs F<ppport.h> to leave C++
comments untouched.
=head2 --quiet
}
}
if ($cppc) {
my $s = $cppc != 1 ? 's' : '';
warning("Uses $cppc C++ style comment$s, which is not portable");
}
my $s = $warnings != 1 ? 's' : '';
my $warn = $warnings ? " ($warnings warning$s)" : '';
info("Analysis completed$warn");
view all matches for this distribution