Mathe :: symbolisch :: Compiler

Math :: symbolisch :: Compiler ist ein Perl-Modul, das Mathe :: symbolische Bäume zum Perl-Code kompilieren kann.
Jetzt downloaden

Mathe :: symbolisch :: Compiler Ranking & Zusammenfassung

Anzeige

  • Rating:
  • Lizenz:
  • Perl Artistic License
  • Preis:
  • FREE
  • Name des Herausgebers:
  • Steffen Muller
  • Website des Verlags:
  • http://search.cpan.org/~smueller/

Mathe :: symbolisch :: Compiler Stichworte


Mathe :: symbolisch :: Compiler Beschreibung

Math :: symbolisch :: Compiler ist ein Perl-Modul, das Mathe :: symbolische Bäume zum Perl-Code kompilieren kann. Math :: symbolisch :: Compiler ist ein Perl-Modul, das Mathe :: symbolische Bäume zu Perl-Code kompilieren kann.Synopsis Verwenden Sie Math :: symbolisch :: Compiler; # Ein Baum, um meinen $ Tree zu kompilieren = Math :: symbolisch-> parse_from_string ('a ^ 2 + b * c * 2'); # Die Math :: symbolisch :: Variable 'A' wird auf $ _ usw. bewertet, mein $ vars = ; My ($ Closure, $ Code, $ Bäume) = Math :: symbolisch :: Compiler-> Kompilieren ($ Tree, $ Vars); drucken $ schließung -> (2, 3, 5); # (b, a, c) # druckt 29 (= 3 ^ 2 + 2 * 5 * 2) # oder: ($ schließung, $ bäume) = math :: symbolisch :: compiler-> compile_to_sub ($ baum, $ vars) ); ($ Code, $ Bäume) = MATH :: symbolisch :: compiler-> compile_to_code ($ tree, $ vars); Dieses Modul ermöglicht es, Math :: symbolische Bäume zu Perl-Code und / oder anonyme Unterprogramme zusammenzustellen, deren Argumente positionell zugeordnet sind Zu den Variablen des kompilierten Maths :: symbolischer Baum. Der Grund, warum Sie dies tun würden, ist, dass die Bewertung eines Math :: symbolischer Baumstruktur an seinen numerischen Wert extrem langsam ist. Also ist das Kompilieren, aber sobald Sie alle notwendigen symbolischen Berechnungen getan haben, können Sie den Geschwindigkeitszunehmen des Aufrufens einer Schließung nutzen, anstatt einen Baum zu bewerten. · Perl.


Mathe :: symbolisch :: Compiler Zugehörige Software