LP/Variable.pm

filter: Statementstmt 72.2% 13 / 18 Branchbran 0.0% 0 / 4 Conditioncond 0.0% 0 / 2 MC/DCmcdc 0.0% 0 / 1 Subroutinesub 80.0% 4 / 5 Podpod 0.0% 0 / 1 totaltotal 54.8% 17 / 31 CC 4 SCAR 23.5
CC
4
Cov
54%
initialize
20.0
BEGIN
1.0
BEGIN
1.0
CRAP 10.5
↑ Summary LP/Object.pm »
1 package Math::LP::Variable;
2 4 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 #use Math::LP::Object;
4 4 ▶use Math::SimpleVariable;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 4 ▶use base qw(Math::SimpleVariable);
Subroutine BEGIN: called CC=1 SCAR=0.0
6 4 ▶use fields(
Subroutine BEGIN: called CC=1 SCAR=0.0
7 4 'is_int', # flags whether it is an integer variable, defaults to false
8 'upper_bound', # defaults to +infinity
9 'lower_bound', # defaults to 0, as is the convention in linear programming
10 'col_index', # column index in an LP, used by the Math::LP functions
11 4 );
12  
13 0 ▶sub initialize {
Subroutine initialize: not called CC=4 SCAR=30.0
Pod undocumented
14 0 my Math::LP::Variable $this = shift;
15 0 ▶ $this->{is_int} ||= 0;
Condition0%0/2
$this->{"is_int"} ||= 0
l!l
00
MC/DC0%0/1
$this->{"is_int"} ||= 0
$this->{"is_int"}
Truth table0%0/2
A
A= $this->{"is_int"}
Aresult
11
00
16 $this->{upper_bound} = $Math::LP::Solve::DEF_INFINITE
17 0 ▶ unless defined($this->{upper_bound});
Branch: 1 branch
BranchTrueFalseTotal
unless defined $this->{"upper_bound"} 0 0 0
18 $this->{lower_bound} = 0
19 0 ▶ unless defined($this->{lower_bound});
Branch: 1 branch
BranchTrueFalseTotal
unless defined $this->{"lower_bound"} 0 0 0
20 0 $this->SUPER::initialize();
21 }
22  
23 4 1;
24  
25 __END__
↑ Summary LP/Object.pm »