The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

Set::Similarity::BV::Overlap - Overlap coefficent for sets

SYNOPSIS

 use Set::Similarity::BV::Overlap;

 my $overlap = Set::Similarity::BV::Overlap->new;
 my $similarity = $overlap->similarity('af09ff','9c09cc');

DESCRIPTION

Overlap coefficient

( A intersect B ) / min(A,B)

METHODS

Set::Similarity::BV::Overlap inherits all methods from Set::Similarity::BV and implements the following new ones.

from_integers

  my $similarity = $object->from_integers($AoI1,$AoI2);

This method expects two array references of integers as parameters. The parameters are not checked, thus can lead to funny results or uncatched divisions by zero.

If you want to use this method directly, you should catch the situation where one of the parameters is empty (similarity is 0), or both are empty (similarity is 1).

SOURCE REPOSITORY

http://github.com/wollmers/Set-Similarity-BV

AUTHOR

Helmut Wollmersdorfer, <helmut.wollmersdorfer@gmail.com>

COPYRIGHT AND LICENSE

Copyright (C) 2016 by Helmut Wollmersdorfer

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.