Learn R Programming

eiR (version 1.12.2)

setDefaultDistance: Set the default distance function for a descriptor type

Description

Set the default distance function for a descriptor type. This is the distance function that will be used if none is given for a particular function call.

Usage

setDefaultDistance(descriptorType, distance)

Arguments

descriptorType
The type of the descriptor to set a distance function for. Built-in values are "ap" and "fp". Additional values can be set as well.
distance
A distance function taking two descriptor objects (as returned by toObject in a descriptor transform, see ink{addTransform} for details), and returning a distance value.

Value

  • No return value.

See Also

addTransform

Examples

Run this code
setDefaultDistance("ap", function(d1,d2) 1-cmp.similarity(d1,d2) )

Run the code above in your browser using DataLab