Math::Symbolic::Compiler 0.508
Sponsored Links
Math::Symbolic::Compiler 0.508 Ranking & Summary
File size:
0.10 MB
Platform:
Any Platform
License:
Perl Artistic License
Price:
Downloads:
836
Date added:
2007-07-10
Publisher:
Steffen Müller
Math::Symbolic::Compiler 0.508 description
Math::Symbolic::Compiler is a Perl module that can compile Math::Symbolic trees to Perl code.
SYNOPSIS
use Math::Symbolic::Compiler;
# A tree to compile
my $tree = Math::Symbolic->parse_from_string(a^2 + b * c * 2);
# The Math::Symbolic::Variable a will be evaluated to $_[1], etc.
my $vars = [qw(b a c)];
my ($closure, $code, $trees) =
Math::Symbolic::Compiler->compile($tree, $vars);
print $closure->(2, 3, 5); # (b, a, c)
# prints 29 (= 3^2 + 2 * 5 * 2)
# or:
($closure, $trees) =
Math::Symbolic::Compiler->compile_to_sub($tree, $vars);
($code, $trees) = Math::Symbolic::Compiler->compile_to_code($tree, $vars);
This module allows to compile Math::Symbolic trees to Perl code and/or anonymous subroutines whose arguments will be positionally mapped to the variables of the compiled Math::Symbolic tree.
The reason youd want to do this is that evaluating a Math::Symbolic tree to its numeric value is extremely slow. So is compiling, but once youve done all necessary symbolic calculations, you can take advantage of the speed gain of invoking a closure instead of evaluating a tree.
SYNOPSIS
use Math::Symbolic::Compiler;
# A tree to compile
my $tree = Math::Symbolic->parse_from_string(a^2 + b * c * 2);
# The Math::Symbolic::Variable a will be evaluated to $_[1], etc.
my $vars = [qw(b a c)];
my ($closure, $code, $trees) =
Math::Symbolic::Compiler->compile($tree, $vars);
print $closure->(2, 3, 5); # (b, a, c)
# prints 29 (= 3^2 + 2 * 5 * 2)
# or:
($closure, $trees) =
Math::Symbolic::Compiler->compile_to_sub($tree, $vars);
($code, $trees) = Math::Symbolic::Compiler->compile_to_code($tree, $vars);
This module allows to compile Math::Symbolic trees to Perl code and/or anonymous subroutines whose arguments will be positionally mapped to the variables of the compiled Math::Symbolic tree.
The reason youd want to do this is that evaluating a Math::Symbolic tree to its numeric value is extremely slow. So is compiling, but once youve done all necessary symbolic calculations, you can take advantage of the speed gain of invoking a closure instead of evaluating a tree.
Math::Symbolic::Compiler 0.508 Screenshot
Advertisements
Math::Symbolic::Compiler 0.508 Keywords
Compiler 0.508
perl code
Perl module
Perl
compile
code
trees
tree
2
Math::Symbolic::Compiler
MathSymbolicCompiler
Math::Symbolic::Compiler 0.508
Libraries
Programming
Bookmark Math::Symbolic::Compiler 0.508
Math::Symbolic::Compiler 0.508 Copyright
WareSeeker periodically updates pricing and software information of Math::Symbolic::Compiler 0.508 full version from the publisher, so some information may be slightly out-of-date. You should confirm all information before relying on it. Software piracy is theft, Using crack, password, serial numbers, registration codes, key generators is illegal and prevent future development of Math::Symbolic::Compiler 0.508 Edition. Download links are directly from our publisher sites, torrent files or links from rapidshare.com, yousendit.com or megaupload.com are not allowed
Featured Software
Want to place your software product here?
Please contact us for consideration.
Contact WareSeeker.com
Related Information
Related Software
Math::Symbolic is a Perl module for symbolic calculations. Free Download
Math::Symbolic::MiscAlgebra contains miscellaneous algebra routines like det(). Free Download
Math::Symbolic::Base is a case class for symbols in symbolic calculations. Free Download
Tiny C compiles so fast that even for big projects Makefiles may not be necessary. Free Download
Blatte::Compiler is a Perl module to compile a Blatte document into Perl. Free Download
Math::Complex is a Perl module with complex numbers and associated mathematical functions. Free Download
XML::Compile::Schema is a Perl module to compile a schema. Free Download
XML::Filter::Dispatcher::Compiler can compile rulesets in to code. Free Download
Latest Software
Popular Software
Favourite Software