blib/lib/Math/GrahamFunction/SqFacts/Dipole.pm

filter: Statementstmt 100% 38 / 38 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 12 / 12 Podpod 100% 6 / 6 totaltotal 100% 56 / 56 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« blib/lib/Math/GrahamFunction/Object.pm ↑ Summary
1 package Math::GrahamFunction::SqFacts::Dipole;
2 4 $Math::GrahamFunction::SqFacts::Dipole::VERSION = '0.02003';
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  
36 sub mult_by
37 {
38 976 ▶ my $n_ref = shift;
Subroutine mult_by: called CC=1 SCAR=0.0
Pod documented
39 976 my $m_ref = shift;
40  
41 976 $n_ref->result()->mult_by( $m_ref->result() );
42 976 $n_ref->compose()->mult_by( $m_ref->compose() );
43  
44 976 return 0;
45 }
46  
47  
48 sub is_square
49 {
50 1364 ▶ my $self = shift;
Subroutine is_square: called CC=1 SCAR=0.0
Pod documented
51 1364 return $self->result()->is_square();
52 }
53  
54  
55 sub exists
56 {
57 1850 ▶ my ( $self, $factor ) = @_;
Subroutine exists: called CC=1 SCAR=0.0
Pod documented
58  
59 1850 return $self->result()->exists($factor);
60 }
61  
62  
63 sub first
64 {
65 600 ▶ my $self = shift;
Subroutine first: called CC=1 SCAR=0.0
Pod documented
66  
67 600 return $self->result()->first();
68 }
69  
70  
71 sub factors
72 {
73 580 ▶ my $self = shift;
Subroutine factors: called CC=1 SCAR=0.0
Pod documented
74  
75 580 return $self->result->factors();
76 }
77  
78 sub _get_ret
79 {
80 56 ▶ my $self = shift;
Subroutine _get_ret: called CC=1 SCAR=0.0
81  
82 56 return [ @{ $self->compose->factors() } ];
83 }
84  
85 4 1;
86  
87 __END__
« blib/lib/Math/GrahamFunction/Object.pm ↑ Summary