Algorithm-Networksort
view release on metacpan or search on metacpan
2.02
Thu June 21 2018
- Changed colorsettings(), which wasn't following the
documentation correctly.
- Encapsulated Postscript works again.
- Encapsulated Postscript now can have color.
- At some point when I was new to Perl, I learned the
unpack("B32", pack("N", $x))
idiom, not realizing that sprintf() had added a "%b"
flag to its format. Sigh. Made the changes everywhere.
Fri Feb 9 2018
- Keys 'radius' and 'stroke_width' of graphsettings() split
into two each for the input lines and the comparator lines,
becoming 'inputradius' and 'compradius', and 'inputline'
and 'compline'. Zero-width radii (indicating no circle at
all) for either line is possible, and the comparator lines
and circles may be a different widths than the input lines
and circles.
- The settings of the text version of diagrams are now set
Fri Sep 22 2012
- Removed prototypes.
- Found and removed some left-over marker code in the SVG output.
- Moved SVG graph color code to its own function, svg_color().
Mon Sep 10 2012
- Modernized parts of the code -- $VERSION is now an 'our'
variable instead of a 'use VARS' variable, for example.
- Added 'create_license => 1' to the Build.PL list of attributes.
- Added 'dynamic_config => 0' to the Build.PL list of attributes.
- Added LICENSE to the MANIFEST file.
- Yanked an "$flag_internal" variable (and its debugging code)
in favor of Smart::Comments.
- Bumped the $VERSION value up a point.
1.20
Sun May 20 2012
- Really bad bug introduced in version 1.08 (text graph
options were checked for in the wrong hash) has been squashed.
1.10
Wed Mar 28 2012
- Finally organized changes (I had a hardware failure), and updated
the MANIFEST file to include the new JSON formatted META files.
lib/Algorithm/Networksort.pm view on Meta::CPAN
B<Example 4: you want a series of comparison and swap statements.>
$nw->formats([ "if (v[%d] < v[%d]) then\n",
" exchange(v, %d, %d)\nend if\n" ]);
print $nw->formatted();
B<Example 5: you want the default format to use letters, not numbers.>
$nw->index_base( [('a'..'z')[0..$inputs]] );
$nw->formats([ "[%s,%s]," ]); # Note that we're using the string flag.
my $string = '[' . $nw->formatted();
substr($string, -1, 1) = ']'; # Overwrite the trailing comma.
print $string, "\n";
=cut
sub formatted
{
( run in 8.077 seconds using v1.01-cache-2.11-cpan-94b05bcf43c )