jarvisPatrick_c {ChemmineR} | R Documentation

## Jarvis Patrick Clustering in C code

### Description

This not meant to be used directly, use `jarvisPatrick` instead. It is exposed so other libraries can make use of it.

### Usage

    jarvisPatrick_c(neighbors,minNbrs,fast=TRUE,bothDirections=FALSE,linkage = "single")

### Arguments

`neighbors` | A matrix of integers. Non integer matricies will be coerced. Each row represensts one element, indexed 1 to N. The values in row i should be the index value of the neighbors of i. Thus, each value should itself be a valid row index.
`minNbrs` | The minimum number of common neibhbors needed for two elements to be merged.
`fast` | If true, only the neibhors given in each row are checked to see if they share `minNbrs` neighbors in common. If false, all pairs of elements are compared. For a matrix of size NxM, the first method yeilds a running time of O(NM), while the second yeilds a running time of O(N^2).
`bothDirections` | If true, two elements must contain each other in their neighbor list in order to be merged. If false and fast is true, then only one element must contain the other as a neighbor. If false and fast is false, than neither element must contain the other as a neighbor, though in all cases there must still be at least `minNbrs` neibhros in common.
`linkage` | See `jarvisPatrick` for details.

### Value

A cluster array with no names.

### Author(s)

Kevin Horan

[Package ChemmineR version 3.36.0 Index]