blib/lib/AI/ParticleSwarmOptimization.pm | |||
---|---|---|---|
Criterion | Covered | Total | % |
condition | 45 | 72 | 62.5 |
line | !l | l&&!r | l&&r | condition |
---|---|---|---|---|
42 | 16 | 2 | 2 | defined $params{-'dimensions'} and defined $$self{'dimensions'} |
18 | 0 | 2 | defined $params{-'dimensions'} and defined $$self{'dimensions'} and $params{-'dimensions'} != $$self{'dimensions'} | |
68 | 16 | 2 | 2 | exists $params{-'dimensions'} and $params{-'dimensions'} <= 0 |
71 | 3 | 15 | 0 | defined $$self{'verbose'} and 'ARRAY' eq ref $$self{'verbose'} |
81 | 0 | 0 | 0 | exists $logTypes{$_} and $$self{'verbose'} |= $logTypes{$_} |
106 | 0 | 0 | 10 | $$self{'fitFunc'} and 'CODE' eq ref $$self{'fitFunc'} |
108 | 0 | 0 | 10 | $$self{'dimensions'} and $$self{'dimensions'} >= 1 |
239 | 0 | 300 | 0 | $$self{'exitPlateau'} and defined $$self{'bestBest'} |
281 | 9000 | 0 | 0 | defined $$self{'exitFit'} and $fit < $$self{'exitFit'} |
348 | 9000 | 0 | 0 | $$self{'stallSpeed'} and $vel <= $$self{'stallSpeed'} |
line | l | !l | condition |
---|---|---|---|
39 | 2 | 3 | $$self{'fitParams'} ||= [] |
88 | 16 | 2 | $$self{'iterations'} ||= 1000 |
89 | 16 | 2 | $$self{'exitPlateauDP'} ||= 10 |
94 | 15 | 3 | $$self{'meWeight'} ||= 0.5 |
95 | 15 | 3 | $$self{'themWeight'} ||= 0.5 |
96 | 15 | 3 | $$self{'inertia'} ||= 0.9 |
97 | 0 | 18 | $$self{'verbose'} ||= 0 |
135 | 8 | 0 | $$self{$_} > 0 or die "-$_ must be greater then 0" |
158 | 0 | 0 | $num ||= 1 |
line | l | !l&&r | !l&&!r | condition |
---|---|---|---|---|
84 | 11 | 2 | 0 | $$self{'numParticles'} ||= $$self{'dimensions'} * 10 |
86 | 11 | 2 | 0 | $$self{'numNeighbors'} ||= int sqrt $$self{'numParticles'} |
90 | 16 | 2 | 0 | $$self{'exitPlateauWindow'} ||= $$self{'iterations'} * 0.1 |
91 | 16 | 2 | 0 | $$self{'exitPlateauBurnin'} ||= $$self{'iterations'} * 0.5 |
146 | 0 | 1 | 0 | $iterations ||= $$self{'iterations'} |
321 | 1 | 2070 | 8915 | !defined($old) || $new < $old |
348 | 0 | 0 | 9000 | not $vel or $$self{'stallSpeed'} and $vel <= $$self{'stallSpeed'} |
391 | 9000 | 11673 | 24327 | not defined $bestNFitness or $$self{'prtcls'}[$prtclNIndex]{'bestFit'} < $bestNFitness |