| 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
MC/DC0%0/1
$this->{"is_int"} ||= 0
$this->{"is_int"}
Truth table0%0/2
A
A= $this->{"is_int"}
| |||||||||||||
| 16 | $this->{upper_bound} = $Math::LP::Solve::DEF_INFINITE | ||||||||||||
| 17 | 0 | ▶ | unless defined($this->{upper_bound}); | ||||||||||
|
Branch: 1 branch
| |||||||||||||
| 18 | $this->{lower_bound} = 0 | ||||||||||||
| 19 | 0 | ▶ | unless defined($this->{lower_bound}); | ||||||||||
|
Branch: 1 branch
| |||||||||||||
| 20 | 0 | $this->SUPER::initialize(); | |||||||||||
| 21 | } | ||||||||||||
| 22 | |||||||||||||
| 23 | 4 | 1; | |||||||||||
| 24 | |||||||||||||
| 25 | __END__ | ||||||||||||