Skip to content

Commit

Permalink
Documentation corrections and improvements.
Browse files Browse the repository at this point in the history
Key name change (voorhis16 to vanvoorhis16).
  • Loading branch information
jgamble committed Mar 17, 2018
1 parent e7f0f38 commit 96a39de
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 9 deletions.
6 changes: 3 additions & 3 deletions lib/Algorithm/Networksort.pm
Original file line number Diff line number Diff line change
Expand Up @@ -2555,14 +2555,14 @@ T. H. Cormen, E. E. Leiserson, R. L. Rivest, C. Stein, Introduction to Algorithm
=item
Donald E. Knuth, The Art of Computer Programming, Vol. 3: (2nd ed.)
Sorting and Searching, Addison Wesley Longman Publishing Co., Inc.,
Donald E. Knuth, B<The Art of Computer Programming, Vol. 3:
Sorting and Searching> (2nd ed.), Addison Wesley Longman Publishing Co., Inc.,
Redwood City, CA, 1998.
=item
Sherenaz W. Al-Haj Baddar and Kenneth E. Batcher,
Designing Sorting Networks: A New Paradigm, Springer-Verlag, 2011
B<Designing Sorting Networks: A New Paradigm>, Springer-Verlag, 2011
=item
Expand Down
21 changes: 15 additions & 6 deletions lib/Algorithm/Networksort/Best.pm
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ my %nw_best_by_name = (
[12,13], [2,3], [8,11], [4,9], [10,11], [6,7], [5,6], [4,8],
[7,9], [4,5], [9,11], [11,12], [3,4], [6,8], [7,10], [9,10],
[5,6], [7,8], [8,9], [6,7]]},
voorhis16 => {
vanvoorhis16 => {
inputs => 16,
depth => 9,
title => '16-Input Network by David C. Van Voorhis',
Expand Down Expand Up @@ -487,7 +487,7 @@ INIT
my $inputs = 9;
#
# First find if any networks exist for the size you want.
# First find if any networks exist for the input size.
#
my @nwkeys = nw_best_names($inputs);
Expand Down Expand Up @@ -540,7 +540,7 @@ V. K. Valsalam and R. Miikkulaainen.
=item 'waksman10'
a 10-input network of depth 9 found by A. Waksman.
A 10-input network of depth 9 found by A. Waksman.
=item 'senso10'
Expand Down Expand Up @@ -639,6 +639,10 @@ A 16-input network of depth 10 found by M. W. Green.
A 16-input network of depth 10 found using the SENSO program by
V. K. Valsalam and R. Miikkulaainen.
=item 'vanvoorhis16'
From the book B<Designing Sorting Networks> (see L<Non-algorithmic discoveries> below).
=back
=head2 17-Input Networks
Expand Down Expand Up @@ -801,12 +805,17 @@ An unlikely example:
my $inputs = 12;
for my $name (nwsrt_best_names())
for my $name (nwsrt_best_names($inputs))
{
my $nw = nwsrt_best(inputs => $inputs, name => $name);
my $nw = nwsrt_best(name => $name);
print $nw->title(), "\n", $nw, "\n";
}
To get the list of all available names (regardless of input size), simply
call the function with no argument:
my @names = nwsrt_best_names();
=cut

sub nw_best_names
Expand Down Expand Up @@ -889,7 +898,7 @@ L<http://etd.ohiolink.edu/view.cgi?acc_num=kent1239814529>.
=item
The 16 input network found by David C. Van Voorhis is described in chapter
5 of Designing Sorting Networks, by Sherenaz W. Al-Haj Baddar and Kenneth E.
5 of B<Designing Sorting Networks>, by Sherenaz W. Al-Haj Baddar and Kenneth E.
Batcher.
=item
Expand Down

0 comments on commit 96a39de

Please sign in to comment.