| 1 | package Algorithm::LibLinear::Types; | ||
| 2 | |||
| 3 | 6 | ▶ | use 5.014; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 4 | 6 | ▶ | use List::MoreUtils qw//; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 5 | 6 | ▶ | use Type::Library -base; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 6 | 6 | ▶ | use Types::Standard qw/Dict Int Map Num/; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 7 | |||
| 8 | 6 | my $Feature = __PACKAGE__->add_type( | |
| 9 | constraint => q!List::MoreUtils::all { $_ > 0 } keys %$_!, | ||
| 10 | name => 'Feature', | ||
| 11 | parent => Map[Int, Num], | ||
| 12 | ); | ||
| 13 | |||
| 14 | 6 | __PACKAGE__->add_type( | |
| 15 | name => 'FeatureWithLabel', | ||
| 16 | parent => Dict[ feature => $Feature, label => Num ], | ||
| 17 | ); | ||
| 18 | |||
| 19 | 6 | 1; | |