Algorithm-LatticePoints

 view release on metacpan or  search on metacpan

README  view on Meta::CPAN

            for my $y (0..9){
              for my $x (0..9){
                print "[$x, $y, $z, $t]\n";
              }
            }
          }
        }

DESCRIPTION
    Lattice-point handling is a common chore. You do it for image
    processing, 3-d processing, and more. Usually you do it via nested for
    loops but it is boring and tedious. This module loops for you instead.

  METHODS
    new(\&coderef)
      Pass a coderef which processes each lattice point.

    visit([$s1,$s2...$sn],[$e1,$e2...$en])
      Runs the code for each latice point between [$s1,$s2...$sn] and
      [$e1,$e2...$en], inclusive.

  EXPORT
    None.

PERFOMANCE
    Compared to good old for loops, you will lose 20% performance for 10^3

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

          for my $x (0..9){
            print "[$x, $y, $z, $t]\n";
          }
        }
      }
    }

=head1 DESCRIPTION

Lattice-point handling is a common chore.  You do it for image
processing, 3-d processing, and more.  Usually you do it via nested
for loops but it is boring and tedious.  This module loops for you
instead.

=head2 METHODS

=over 2

=item new(\&coderef)

Pass a coderef which processes each lattice point.

=item visit([$s1,$s2...$sn],[$e1,$e2...$en])

Runs the code for each latice point between
[$s1,$s2...$sn] and [$e1,$e2...$en], inclusive.

=back

=head2 EXPORT



( run in 0.268 second using v1.01-cache-2.11-cpan-8d75d55dd25 )