\HeaderA{dissimilarity.object}{Dissimilarity Matrix Object}{dissimilarity.object}
\keyword{cluster}{dissimilarity.object}
\begin{Description}\relax
Objects of class \code{"dissimilarity"} representing the dissimilarity
matrix of a dataset.
\end{Description}
\begin{Value}
The dissimilarity matrix is symmetric, and hence its lower triangle
(column wise) is represented as a vector to save storage space.
If the object, is called \code{do}, and \code{n} the number of
observations, i.e., \code{n <- attr(do, "Size")}, then
for \eqn{i < j <= n}{}, the dissimilarity between (row) i and j is
\code{do[n*(i-1) - i*(i-1)/2 + j-i]}.
The length of the vector is \eqn{n*(n-1)/2}{}, i.e., of order \eqn{n^2}{}.

\code{"dissimilarity"} objects also inherit from class
\code{\LinkA{dist}{dist}} and can use \code{dist} methods, in
particular, \code{\LinkA{as.matrix}{as.matrix}}, such that \eqn{d_{ij}}{d(i,j)}
from above is just \code{as.matrix(do)[i,j]}.

The object has the following attributes:
\begin{ldescription}
\item[\code{Size}] the number of observations in the dataset.
\item[\code{Metric}] the metric used for calculating the
dissimilarities.  Possible values are "euclidean", "manhattan",
"mixed" (if variables of different types were present in the
dataset), and "unspecified".
\item[\code{Labels}] optionally, contains the labels, if any, of the
observations of the dataset.
\item[\code{NA.message}] optionally, if a dissimilarity could not be
computed, because of too many missing values for some observations
of the dataset.
\item[\code{Types}] when a mixed metric was used, the types for each
variable as one-letter codes (as in the book, e.g. p.54):
\describe{
\item[A] Asymmetric binary
\item[S] Symmetric  binary
\item[N] Nominal (factor)
\item[O] Ordinal (ordered factor)
\item[I] Interval scaled (numeric)
\item[T] raTio to be log transformed (positive numeric)
}.
\end{ldescription}
\end{Value}
\begin{Section}{GENERATION}
\code{\LinkA{daisy}{daisy}} returns this class of objects.
Also the functions \code{pam}, \code{clara}, \code{fanny},
\code{agnes}, and \code{diana} return a \code{dissimilarity} object,
as one component of their return objects.
\end{Section}
\begin{Section}{METHODS}
The \code{"dissimilarity"} class has methods for the following generic
functions: \code{print}, \code{summary}.
\end{Section}
\begin{SeeAlso}\relax
\code{\LinkA{daisy}{daisy}}, \code{\LinkA{dist}{dist}},
\code{\LinkA{pam}{pam}}, \code{\LinkA{clara}{clara}}, \code{\LinkA{fanny}{fanny}},
\code{\LinkA{agnes}{agnes}}, \code{\LinkA{diana}{diana}}.
\end{SeeAlso}

