Learn R Programming

comparator (version 0.1.3)

PairwiseMatrix-class: Pairwise Similarity/Distance Matrix

Description

Represents a pairwise similarity or distance matrix.

Usage

as.PairwiseMatrix(x, ...)

# S4 method for matrix as.PairwiseMatrix(x, ...)

# S4 method for PairwiseMatrix as.matrix(x, ...)

Arguments

x

an R object.

...

additional arguments to be passed to methods.

Functions

  • as.PairwiseMatrix: Convert an R object x to a PairwiseMatrix.

  • as.PairwiseMatrix,matrix-method: Convert an ordinary matrix x to a PairwiseMatrix.

  • as.matrix,PairwiseMatrix-method: Convert a PairwiseMatrix x to an ordinary matrix.

Slots

.Data

entries of the matrix in column-major order. Entries in the upper triangle and/or on the diagonal may be omitted.

Dim

integer vector of length 2. The dimensions of the matrix.

Diag

logical indicating whether the diagonal entries are stored in .Data.

Details

If the elements being compared are from the same set, the matrix may be symmetric if the comparator is symmetric. In this case, entries in the upper triangle and/or along the diagonal may not be stored in memory, since they are redundant.