apply_similarity: Apply similarity function to rows of a matrix
Description
Apply similarity function to rows of a matrix
Usage
apply_similarity(idx, mat, similarity, ...)
Arguments
- idx
vector of length two containing row indices
- mat
a matrix
- similarity
similarity function to apply
- ...
additional parameters to be passed to the similarity function