line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Math::GrahamFunction::SqFacts::Dipole; |
2
|
|
|
|
|
|
|
$Math::GrahamFunction::SqFacts::Dipole::VERSION = '0.02004'; |
3
|
1
|
|
|
1
|
|
7
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
30
|
|
4
|
1
|
|
|
1
|
|
5
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
28
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
|
7
|
1
|
|
|
1
|
|
4
|
use parent qw(Math::GrahamFunction::SqFacts); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
8
|
|
8
|
|
|
|
|
|
|
|
9
|
1
|
|
|
1
|
|
71
|
use List::Util (); |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
378
|
|
10
|
|
|
|
|
|
|
__PACKAGE__->mk_accessors(qw(result compose)); |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
sub _initialize |
13
|
|
|
|
|
|
|
{ |
14
|
791
|
|
|
791
|
|
1180
|
my $self = shift; |
15
|
791
|
|
|
|
|
1159
|
my $args = shift; |
16
|
|
|
|
|
|
|
|
17
|
791
|
|
|
|
|
2029
|
$self->result( $args->{result} ); |
18
|
791
|
|
|
|
|
8067
|
$self->compose( $args->{compose} ); |
19
|
|
|
|
|
|
|
|
20
|
791
|
|
|
|
|
7228
|
return 0; |
21
|
|
|
|
|
|
|
} |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
sub clone |
25
|
|
|
|
|
|
|
{ |
26
|
46
|
|
|
46
|
1
|
424
|
my $self = shift; |
27
|
46
|
|
|
|
|
128
|
return __PACKAGE__->new( |
28
|
|
|
|
|
|
|
{ |
29
|
|
|
|
|
|
|
'result' => $self->result()->clone(), |
30
|
|
|
|
|
|
|
'compose' => $self->compose()->clone(), |
31
|
|
|
|
|
|
|
} |
32
|
|
|
|
|
|
|
); |
33
|
|
|
|
|
|
|
} |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
sub mult_by |
37
|
|
|
|
|
|
|
{ |
38
|
976
|
|
|
976
|
1
|
9875
|
my $n_ref = shift; |
39
|
976
|
|
|
|
|
1372
|
my $m_ref = shift; |
40
|
|
|
|
|
|
|
|
41
|
976
|
|
|
|
|
1759
|
$n_ref->result()->mult_by( $m_ref->result() ); |
42
|
976
|
|
|
|
|
2100
|
$n_ref->compose()->mult_by( $m_ref->compose() ); |
43
|
|
|
|
|
|
|
|
44
|
976
|
|
|
|
|
2404
|
return 0; |
45
|
|
|
|
|
|
|
} |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
sub is_square |
49
|
|
|
|
|
|
|
{ |
50
|
1364
|
|
|
1364
|
1
|
7505
|
my $self = shift; |
51
|
1364
|
|
|
|
|
2737
|
return $self->result()->is_square(); |
52
|
|
|
|
|
|
|
} |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
sub exists |
56
|
|
|
|
|
|
|
{ |
57
|
1850
|
|
|
1850
|
1
|
16762
|
my ( $self, $factor ) = @_; |
58
|
|
|
|
|
|
|
|
59
|
1850
|
|
|
|
|
3485
|
return $self->result()->exists($factor); |
60
|
|
|
|
|
|
|
} |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
sub first |
64
|
|
|
|
|
|
|
{ |
65
|
600
|
|
|
600
|
1
|
6132
|
my $self = shift; |
66
|
|
|
|
|
|
|
|
67
|
600
|
|
|
|
|
1111
|
return $self->result()->first(); |
68
|
|
|
|
|
|
|
} |
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
sub factors |
72
|
|
|
|
|
|
|
{ |
73
|
580
|
|
|
580
|
1
|
1343
|
my $self = shift; |
74
|
|
|
|
|
|
|
|
75
|
580
|
|
|
|
|
1060
|
return $self->result->factors(); |
76
|
|
|
|
|
|
|
} |
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
sub _get_ret |
79
|
|
|
|
|
|
|
{ |
80
|
56
|
|
|
56
|
|
523
|
my $self = shift; |
81
|
|
|
|
|
|
|
|
82
|
56
|
|
|
|
|
99
|
return [ @{ $self->compose->factors() } ]; |
|
56
|
|
|
|
|
133
|
|
83
|
|
|
|
|
|
|
} |
84
|
|
|
|
|
|
|
|
85
|
|
|
|
|
|
|
1; |
86
|
|
|
|
|
|
|
|
87
|
|
|
|
|
|
|
__END__ |