Skip to contents

Computes the Canberra distance between two binary vectors.

Usage

distance_canberra_cpp(x, y)

Arguments

x

(required, numeric vector).

y

(required, numeric vector) of same length as x.

Value

numeric

Examples

distance_canberra_cpp(c(0, 1, 0, 1), c(1, 1, 0, 0))
#> [1] 2