in reply to Re^3: RFC - Documentation Review
in thread Please review documentation of my AI::Embedding module
I have no problem with the name, only with the interface...
Sorry...I don't understand. Either that or I haven't properly explained what the comparator does.
The comparator method doesn't do any work other than to set a value to be compared with the compare method. So these two are exactly equivalent:
The only time it makes any sense to use the comparator method is when there are lots of values to compare to the same thing:my $difference = $embedding->compare($embed2, $embed1); $embedding->comparator($embed1); my $difference = $embedding->compare($embed2);
$embedding->comparator($embed1); my $diff2 = $embedding->compare($embed2); # Compares $embed2 to $emb +ed1 my $diff3 = $embedding->compare($embed3); # Compares $embed3 to $emb +ed1 my $diff4 = $embedding->compare($embed4); # Compares $embed4 to $emb +ed1 my $diff5 = $embedding->compare($embed5); # Compares $embed5 to $emb +ed1 my $diff6 = $embedding->compare($embed6); # Compares $embed6 to $emb +ed1 my $diff7 = $embedding->compare($embed7); # Compares $embed7 to $emb +ed1 # ... etc ...
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^5: RFC - Documentation Review
by hv (Prior) on Jun 03, 2023 at 14:12 UTC | |
Re^5: RFC - Documentation Review
by afoken (Chancellor) on Jun 03, 2023 at 12:23 UTC |