Algorithm-LibLinear
view release on metacpan or search on metacpan
lib/Algorithm/LibLinear/Types.pm view on Meta::CPAN
package Algorithm::LibLinear::Types;
use 5.014;
use List::MoreUtils qw//;
use Type::Library -base;
use Types::Standard qw/Dict Int Map Num/;
my $Feature = __PACKAGE__->add_type(
constraint => q!List::MoreUtils::all { $_ > 0 } keys %$_!,
name => 'Feature',
parent => Map[Int, Num],
);
__PACKAGE__->add_type(
name => 'FeatureWithLabel',
parent => Dict[ feature => $Feature, label => Num ],
);
1;
( run in 0.479 second using v1.01-cache-2.11-cpan-a5abf4f5562 )