BV/Dice.pm

filter: Statementstmt 100% 13 / 13 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 4 / 4 Podpod 100% 1 / 1 totaltotal 100% 18 / 18 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« BV/Cosine.pm ↑ Summary BV/Jaccard.pm »
1 package Set::Similarity::BV::Dice;
2  
3 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 1 ▶use parent 'Set::Similarity::BV';
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 1 our $VERSION = '0.06';
9  
10 5 ▶sub from_integers {
Subroutine from_integers: called CC=1 SCAR=0.0
Pod documented
11 5 my ($self, $v1, $v2) = @_;
12  
13 # $dice = ($intersection * 2 / $combined_length);
14 return (
15 5 $self->intersection($v1,$v2) * 2 / $self->combined_length($v1,$v2)
16 );
17 }
18  
19 1 1;
20  
21 __END__
« BV/Cosine.pm ↑ Summary BV/Jaccard.pm »