| 1 | package Math::GrahamFunction::SqFacts::Dipole; | ||
| 2 | 4 | $Math::GrahamFunction::SqFacts::Dipole::VERSION = '0.02002'; | |
| 3 | 4 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 4 | 4 | ▶ | use warnings; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 5 | |||
| 6 | |||
| 7 | 4 | ▶ | use base qw(Math::GrahamFunction::SqFacts); |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 8 | |||
| 9 | 4 | ▶ | use List::Util (); |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 10 | 4 | __PACKAGE__->mk_accessors(qw(result compose)); | |
| 11 | |||
| 12 | sub _initialize | ||
| 13 | { | ||
| 14 | 791 | ▶ | my $self = shift; |
|
Subroutine
_initialize: called CC=1 SCAR=0.0
| |||
| 15 | 791 | my $args = shift; | |
| 16 | |||
| 17 | 791 | $self->result($args->{result}); | |
| 18 | 791 | $self->compose($args->{compose}); | |
| 19 | |||
| 20 | 791 | return 0; | |
| 21 | } | ||
| 22 | |||
| 23 | |||
| 24 | sub clone | ||
| 25 | { | ||
| 26 | 46 | ▶ | my $self = shift; |
|
Subroutine
clone: called CC=1 SCAR=0.0
Pod
documented
| |||
| 27 | 46 | 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 | ▶ | my $n_ref = shift; |
|
Subroutine
mult_by: called CC=1 SCAR=0.0
Pod
documented
| |||
| 38 | 976 | my $m_ref = shift; | |
| 39 | |||
| 40 | 976 | $n_ref->result()->mult_by($m_ref->result()); | |
| 41 | 976 | $n_ref->compose()->mult_by($m_ref->compose()); | |
| 42 | |||
| 43 | 976 | return 0; | |
| 44 | } | ||
| 45 | |||
| 46 | |||
| 47 | sub is_square | ||
| 48 | { | ||
| 49 | 1364 | ▶ | my $self = shift; |
|
Subroutine
is_square: called CC=1 SCAR=0.0
Pod
documented
| |||
| 50 | 1364 | return $self->result()->is_square(); | |
| 51 | } | ||
| 52 | |||
| 53 | |||
| 54 | sub exists | ||
| 55 | { | ||
| 56 | 1850 | ▶ | my ($self, $factor) = @_; |
|
Subroutine
exists: called CC=1 SCAR=0.0
Pod
documented
| |||
| 57 | |||
| 58 | 1850 | return $self->result()->exists($factor); | |
| 59 | } | ||
| 60 | |||
| 61 | |||
| 62 | sub first | ||
| 63 | { | ||
| 64 | 600 | ▶ | my $self = shift; |
|
Subroutine
first: called CC=1 SCAR=0.0
Pod
documented
| |||
| 65 | |||
| 66 | 600 | return $self->result()->first(); | |
| 67 | } | ||
| 68 | |||
| 69 | |||
| 70 | sub factors | ||
| 71 | { | ||
| 72 | 580 | ▶ | my $self = shift; |
|
Subroutine
factors: called CC=1 SCAR=0.0
Pod
documented
| |||
| 73 | |||
| 74 | 580 | return $self->result->factors(); | |
| 75 | } | ||
| 76 | |||
| 77 | sub _get_ret | ||
| 78 | { | ||
| 79 | 56 | ▶ | my $self = shift; |
|
Subroutine
_get_ret: called CC=1 SCAR=0.0
| |||
| 80 | |||
| 81 | 56 | return [ @{$self->compose->factors()} ]; | |
| 82 | } | ||
| 83 | |||
| 84 | 4 | 1; | |
| 85 | |||
| 86 | __END__ | ||