| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
package Math::Symbolic::Custom::Contains; |
|
2
|
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
192777
|
use 5.006; |
|
|
1
|
|
|
|
|
6
|
|
|
|
1
|
|
|
|
|
36
|
|
|
4
|
1
|
|
|
1
|
|
5
|
use strict; |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
31
|
|
|
5
|
1
|
|
|
1
|
|
5
|
use warnings; |
|
|
1
|
|
|
|
|
6
|
|
|
|
1
|
|
|
|
|
40
|
|
|
6
|
1
|
|
|
1
|
|
5
|
use Carp qw/croak carp cluck confess/; |
|
|
1
|
|
|
|
|
1
|
|
|
|
1
|
|
|
|
|
87
|
|
|
7
|
|
|
|
|
|
|
|
|
8
|
1
|
|
|
1
|
|
6
|
use Math::Symbolic::Custom::Base; |
|
|
1
|
|
|
|
|
9
|
|
|
|
1
|
|
|
|
|
50
|
|
|
9
|
1
|
|
|
1
|
|
22
|
BEGIN { *import = \&Math::Symbolic::Custom::Base::aggregate_import } |
|
10
|
|
|
|
|
|
|
|
|
11
|
1
|
|
|
1
|
|
6
|
use Math::Symbolic::ExportConstants qw/:all/; |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
457
|
|
|
12
|
|
|
|
|
|
|
our $VERSION = '1.01'; |
|
13
|
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
our $Aggregate_Export = [qw/contains_operator/]; |
|
15
|
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
sub contains_operator { |
|
17
|
6
|
|
|
6
|
1
|
13521
|
my ( $f, $op ) = @_; |
|
18
|
|
|
|
|
|
|
|
|
19
|
6
|
|
|
|
|
12
|
my @nodes = ($f); |
|
20
|
6
|
|
|
|
|
18
|
while (@nodes) { |
|
21
|
12
|
|
|
|
|
17
|
my $n = shift @nodes; |
|
22
|
12
|
100
|
|
|
|
29
|
if ( ref $n eq 'Math::Symbolic::Operator' ) { |
|
23
|
8
|
100
|
|
|
|
17
|
if ( not defined $op ) { |
|
24
|
1
|
|
|
|
|
7
|
return $n; |
|
25
|
|
|
|
|
|
|
} |
|
26
|
|
|
|
|
|
|
else { |
|
27
|
7
|
100
|
|
|
|
22
|
if ( $n->type() == $op ) { |
|
28
|
3
|
|
|
|
|
48
|
return $n; |
|
29
|
|
|
|
|
|
|
} |
|
30
|
|
|
|
|
|
|
else { |
|
31
|
4
|
|
|
|
|
133
|
my @ops = $n->descending_operands(); |
|
32
|
4
|
|
|
|
|
87
|
push @nodes, @ops; |
|
33
|
|
|
|
|
|
|
} |
|
34
|
|
|
|
|
|
|
} |
|
35
|
|
|
|
|
|
|
} |
|
36
|
|
|
|
|
|
|
else { |
|
37
|
4
|
|
|
|
|
7
|
next; |
|
38
|
|
|
|
|
|
|
} |
|
39
|
|
|
|
|
|
|
} |
|
40
|
2
|
|
|
|
|
6
|
return (undef); |
|
41
|
|
|
|
|
|
|
} |
|
42
|
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
1; |
|
44
|
|
|
|
|
|
|
__END__ |