## Methods

### canberra(a, b) → {Number}

Computes the canberra distance between `a`

and `b`

.

**Parameters:**

Name | Type | Description |
---|---|---|

`a` | Array.<Number> | |

`b` | Array.<Number> |

- Source

**Returns:**

the canberra distance between `a`

and `b`

.

- Type:
- Number

### chebyshev(a, b) → {Number}

Computes the chebyshev distance (L_{∞}) between `a`

and `b`

.

**Parameters:**

Name | Type | Description |
---|---|---|

`a` | Array.<Number> | |

`b` | Array.<Number> |

- Source

**Returns:**

the chebyshev distance between `a`

and `b`

.

- Type:
- Number

### cosine(a, b) → {Number}

Computes the cosine distance (not similarity) between `a`

and `b`

.

**Parameters:**

Name | Type | Description |
---|---|---|

`a` | Array.<Number> | |

`b` | Array.<Number> |

- Source

**Returns:**

The cosine distance between `a`

and `b`

.

- Type:
- Number

**Example**

```
import * as druid from "@saehrimnir/druidjs";
druid.cosine([1,0],[1,1]) == 0.7853981633974484 == π/4;
```

### euclidean(a, b) → {Number}

Computes the euclidean distance (`l`

) between _{2}`a`

and `b`

.

**Parameters:**

Name | Type | Description |
---|---|---|

`a` | Array.<Number> | |

`b` | Array.<Number> |

- Source

**Returns:**

the euclidean distance between `a`

and `b`

.

- Type:
- Number

### euclidean_squared(a, b) → {Number}

Computes the squared euclidean distance (l_{2}^{2}) between `a`

and `b`

.

**Parameters:**

Name | Type | Description |
---|---|---|

`a` | Array.<Number> | |

`b` | Array.<Number> |

**Returns:**

the squared euclidean distance between `a`

and `b`

.

- Type:
- Number

### hamming(a, b) → {Number}

Computes the hamming distance between `a`

and `b`

.

**Parameters:**

Name | Type | Description |
---|---|---|

`a` | Array.<Number> | |

`b` | Array.<Number> |

- Source

**Returns:**

the hamming distance between `a`

and `b`

.

- Type:
- Number

### jaccard(a, b) → {Number}

Computes the jaccard distance between `a`

and `b`

.

**Parameters:**

Name | Type | Description |
---|---|---|

`a` | Array.<Number> | |

`b` | Array.<Number> |

- Source

**Returns:**

the jaccard distance between `a`

and `b`

.

- Type:
- Number

### manhattan(a, b) → {Number}

Computes the manhattan distance (`l`

) between _{1}`a`

and `b`

.

**Parameters:**

Name | Type | Description |
---|---|---|

`a` | Array.<Number> | |

`b` | Array.<Number> |

- Source

**Returns:**

the manhattan distance between `a`

and `b`

.

- Type:
- Number

### sokal_michener(a, b) → {Number}

Computes the Sokal-Michener distance between `a`

and `b`

.

**Parameters:**

Name | Type | Description |
---|---|---|

`a` | Array.<Number> | |

`b` | Array.<Number> |

- Source

**Returns:**

the Sokal-Michener distance between `a`

and `b`

.

- Type:
- Number

### yule(a, b) → {Number}

Computes the yule distance between `a`

and `b`

.

**Parameters:**

Name | Type | Description |
---|---|---|

`a` | Array.<Number> | |

`b` | Array.<Number> |

- Source

**Returns:**

the yule distance between `a`

and `b`

.

- Type:
- Number