lib/MLPerl/Classifier/KNeighbors/Neighbor2D.pm untested

filter: Statementstmt 0.0% 0 / 17 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 5 Podpod n/a totaltotal 0.0% 0 / 22 CC 1 SCAR 6.9
CC
1
Cov
0%
BEGIN
2.0
BEGIN
2.0
BEGIN
2.0
CRAP 2.0
1 # [[[ HEADER ]]]
2 use RPerl;
3 package MLPerl::Classifier::KNeighbors::Neighbor2D;
4 use strict;
5 use warnings;
6 our $VERSION = 0.001_000;
7  
8 # [[[ OO INHERITANCE ]]]
9 use parent qw(RPerl::CompileUnit::Module::Class); # no non-system inheritance, only inherit from base class
10 use RPerl::CompileUnit::Module::Class;
11  
12 # [[[ CRITICS ]]]
13 ## no critic qw(ProhibitUselessNoCritic ProhibitMagicNumbers RequireCheckedSyscalls) # USER DEFAULT 1: allow numeric values & print operator
14 ## no critic qw(RequireInterpolationOfMetachars) # USER DEFAULT 2: allow single-quoted control characters & sigils
15 ## no critic qw(ProhibitConstantPragma ProhibitMagicNumbers) # USER DEFAULT 3: allow constants
16 ## no critic qw(Capitalization ProhibitMultiplePackages ProhibitReusedNames) # SYSTEM DEFAULT 3: allow multiple & lower case & mixed-case package names
17 ## no critic qw(ProhibitAutomaticExportation) # SYSTEM SPECIAL 14: allow global exports from Config.pm & elsewhere
18  
19 # [[[ OO PROPERTIES ]]]
20 our hashref $properties = {
21 data => my number_arrayref $TYPED_data->[2 - 1] = undef, # size 2 for 2D, undef to avoid allocating memory during construction
22 distance => my number $TYPED_distance = -1, # default to defined-but-invalid negative distance
23 classification => my string $TYPED_classification = q{} # default to defined-but-invalid empty group
24 };
25  
26 1; # end of class