PairwiseMatrix-class {comparator} | R Documentation |
Pairwise Similarity/Distance Matrix
Description
Represents a pairwise similarity or distance matrix.
Usage
as.PairwiseMatrix(x, ...)
## S4 method for signature 'matrix'
as.PairwiseMatrix(x, ...)
## S4 method for signature 'PairwiseMatrix'
as.matrix(x, ...)
Arguments
x |
an R object. |
... |
additional arguments to be passed to methods. |
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.
Functions
-
as.PairwiseMatrix
: Convert an R objectx
to aPairwiseMatrix
. -
as.PairwiseMatrix,matrix-method
: Convert an ordinarymatrix
x
to aPairwiseMatrix
. -
as.matrix,PairwiseMatrix-method
: Convert aPairwiseMatrix
x
to an ordinarymatrix
.
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
.