buildExhaustive: Prepare data for an exhaustive search

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/buildExhaustive.R

Description

Transform data in preparation for an exhaustive (i.e., brute-force) search.

Usage

1
2
3
4
5
buildExhaustive(
  X,
  transposed = FALSE,
  distance = c("Euclidean", "Manhattan", "Cosine")
)

Arguments

X

A numeric matrix where rows correspond to data points and columns correspond to variables (i.e., dimensions).

transposed

Logical scalar indicating whether X is transposed, i.e., rows are variables and columns are data points.

distance

String specifying the type of distance to use.

Details

This algorithm is largely provided as a baseline for comparing against the other algorithms. On rare occasions, it may actually be useful in, e.g., very high-dimensional data where the indexing step of other algorithms adds computational overhead for no benefit.

Value

An ExhaustiveIndex object containing indexed data.

Author(s)

Allison Vuong

See Also

ExhaustiveIndex, for details on the output class.

findExhaustive and queryExhaustive, for dependent functions.

Examples

1
2
3
Y <- matrix(rnorm(100000), ncol=20)
out <- buildExhaustive(Y)
out

LTLA/BiocNeighbors documentation built on Sept. 18, 2021, 8:19 p.m.