| 1 | |||
| 2 | =encoding utf8 | ||
| 3 | |||
| 4 | =head1 NAME | ||
| 5 | |||
| 6 | Math::Symbolic::Custom - Aggregate class for tree tests and transformations | ||
| 7 | |||
| 8 | =head1 SYNOPSIS | ||
| 9 | |||
| 10 | # Extending the class: | ||
| 11 | package Math::Symbolic::Custom::MyTransformations; | ||
| 12 | use Math::Symbolic::Custom::Base; | ||
| 13 | BEGIN {*import = \&Math::Symbolic::Custom::Base::aggregate_import} | ||
| 14 | |||
| 15 | our $Aggregate_Export = [qw/apply_transformation1 .../]; | ||
| 16 | sub apply_transformation1 { | ||
| 17 | # ... | ||
| 18 | } | ||
| 19 | # ... | ||
| 20 | |||
| 21 | # Using the custom class: | ||
| 22 | use Math::Symbolic; | ||
| 23 | use Math::Symbolic::Custom::MyTransformations; | ||
| 24 | |||
| 25 | # later... | ||
| 26 | $tree->apply_transformation1(); | ||
| 27 | $tree->mod_transformation2(); | ||
| 28 | die unless $tree->is_type1(); | ||
| 29 | die unless $tree->test_condition1(); | ||
| 30 | die if $tree->contains_something1(); | ||
| 31 | print $tree->to_latex(); | ||
| 32 | |||
| 33 | =head1 DESCRIPTION | ||
| 34 | |||
| 35 | This is an aggregate class for all custom modification, transformation, | ||
| 36 | testing and output extensions for Math::Symbolic trees. | ||
| 37 | Some default transformations and tests are implemented in the | ||
| 38 | Math::Symbolic::Custom::DefaultMods and | ||
| 39 | Math::Symbolic::Custom::DefaultTests packages, default output | ||
| 40 | routines in Math::Symbolic::Custom::DefaultDumpers which are automatically | ||
| 41 | loaded by the Math::Symbolic::Custom class. | ||
| 42 | |||
| 43 | Math::Symbolic::Custom imports all constants from | ||
| 44 | Math::Symbolic::ExportConstants | ||
| 45 | |||
| 46 | =head2 EXPORT | ||
| 47 | |||
| 48 | None by default. | ||
| 49 | |||
| 50 | =cut | ||
| 51 | |||
| 52 | package Math::Symbolic::Custom; | ||
| 53 | |||
| 54 | 23 | ▶ | use 5.006; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 55 | 23 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 56 | 23 | ▶ | use warnings; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 57 | |||
| 58 | 23 | ▶ | use Carp; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 59 | |||
| 60 | 23 | ▶ | use Math::Symbolic::ExportConstants qw/:all/; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 61 | |||
| 62 | 23 | our $VERSION = '0.613'; | |
| 63 | 23 | our $AUTOLOAD; | |
| 64 | |||
| 65 | 23 | ▶ | use Math::Symbolic::Custom::DefaultTests; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 66 | 23 | ▶ | use Math::Symbolic::Custom::DefaultMods; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 67 | 23 | ▶ | use Math::Symbolic::Custom::DefaultDumpers; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 68 | |||
| 69 | 23 | 1; | |
| 70 | __END__ | ||