line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Math::GrahamFunction::SqFacts::Dipole; |
2
|
|
|
|
|
|
|
$Math::GrahamFunction::SqFacts::Dipole::VERSION = '0.02002'; |
3
|
2
|
|
|
2
|
|
14
|
use strict; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
57
|
|
4
|
2
|
|
|
2
|
|
10
|
use warnings; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
57
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
|
7
|
2
|
|
|
2
|
|
10
|
use base qw(Math::GrahamFunction::SqFacts); |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
226
|
|
8
|
|
|
|
|
|
|
|
9
|
2
|
|
|
2
|
|
13
|
use List::Util (); |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
828
|
|
10
|
|
|
|
|
|
|
__PACKAGE__->mk_accessors(qw(result compose)); |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
sub _initialize |
13
|
|
|
|
|
|
|
{ |
14
|
791
|
|
|
791
|
|
1320
|
my $self = shift; |
15
|
791
|
|
|
|
|
1184
|
my $args = shift; |
16
|
|
|
|
|
|
|
|
17
|
791
|
|
|
|
|
2127
|
$self->result($args->{result}); |
18
|
791
|
|
|
|
|
8643
|
$self->compose($args->{compose}); |
19
|
|
|
|
|
|
|
|
20
|
791
|
|
|
|
|
7405
|
return 0; |
21
|
|
|
|
|
|
|
} |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
sub clone |
25
|
|
|
|
|
|
|
{ |
26
|
46
|
|
|
46
|
1
|
423
|
my $self = shift; |
27
|
46
|
|
|
|
|
112
|
return __PACKAGE__->new( |
28
|
|
|
|
|
|
|
{ |
29
|
|
|
|
|
|
|
'result' => $self->result()->clone(), |
30
|
|
|
|
|
|
|
'compose' => $self->compose()->clone(), |
31
|
|
|
|
|
|
|
}); |
32
|
|
|
|
|
|
|
} |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
sub mult_by |
36
|
|
|
|
|
|
|
{ |
37
|
976
|
|
|
976
|
1
|
10085
|
my $n_ref = shift; |
38
|
976
|
|
|
|
|
1466
|
my $m_ref = shift; |
39
|
|
|
|
|
|
|
|
40
|
976
|
|
|
|
|
1816
|
$n_ref->result()->mult_by($m_ref->result()); |
41
|
976
|
|
|
|
|
2234
|
$n_ref->compose()->mult_by($m_ref->compose()); |
42
|
|
|
|
|
|
|
|
43
|
976
|
|
|
|
|
2388
|
return 0; |
44
|
|
|
|
|
|
|
} |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
sub is_square |
48
|
|
|
|
|
|
|
{ |
49
|
1364
|
|
|
1364
|
1
|
7592
|
my $self = shift; |
50
|
1364
|
|
|
|
|
2742
|
return $self->result()->is_square(); |
51
|
|
|
|
|
|
|
} |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
sub exists |
55
|
|
|
|
|
|
|
{ |
56
|
1850
|
|
|
1850
|
1
|
17150
|
my ($self, $factor) = @_; |
57
|
|
|
|
|
|
|
|
58
|
1850
|
|
|
|
|
3376
|
return $self->result()->exists($factor); |
59
|
|
|
|
|
|
|
} |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
sub first |
63
|
|
|
|
|
|
|
{ |
64
|
600
|
|
|
600
|
1
|
6233
|
my $self = shift; |
65
|
|
|
|
|
|
|
|
66
|
600
|
|
|
|
|
1435
|
return $self->result()->first(); |
67
|
|
|
|
|
|
|
} |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
sub factors |
71
|
|
|
|
|
|
|
{ |
72
|
580
|
|
|
580
|
1
|
1285
|
my $self = shift; |
73
|
|
|
|
|
|
|
|
74
|
580
|
|
|
|
|
1125
|
return $self->result->factors(); |
75
|
|
|
|
|
|
|
} |
76
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
sub _get_ret |
78
|
|
|
|
|
|
|
{ |
79
|
56
|
|
|
56
|
|
510
|
my $self = shift; |
80
|
|
|
|
|
|
|
|
81
|
56
|
|
|
|
|
85
|
return [ @{$self->compose->factors()} ]; |
|
56
|
|
|
|
|
110
|
|
82
|
|
|
|
|
|
|
} |
83
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
1; |
85
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
__END__ |