| 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__ | ||