\HeaderA{calssim}{Similarity function for comparison of two peak-lists.}{calssim}
\aliasA{calsrange}{calssim}{calsrange}
\keyword{misc}{calssim}
\begin{Description}\relax
PLs can be easily aligned if they have many matching peaks and the masses of this peaks span a wide mass range. The alignment of two PL fails if no matching peaks are found. We describe this properties mathematically by the following similarity measure.
\deqn{S_{A,B} = \left({\sum_{i=1}^{n}{\sum_{j=i+1}^{n}{ (|m_j-m_i|)^p} }} \right)^{1/p}
}{S(A,B)=(sum_(i=1)^n sum_(j=i+1)^(n) |m_j-m_i|^p)^(1/p) }
n is the number of matches and \eqn{m_i}{} and \eqn{m_j}{} are the masses of matching peaks. The measure computes the sum of all mass differences of matching peaks. The power p can be used to weight large differences stronger.
\end{Description}
\begin{Usage}
\begin{verbatim}
calssim(x, p)
calsrange(x, p)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{x}] masses of matching peaks
\item[\code{p}] additional parameter
\end{ldescription}
\end{Arguments}
\begin{Details}\relax
\end{Details}
\begin{Value}
similarity between peak-lists
\end{Value}
\begin{Note}\relax
\end{Note}
\begin{Author}\relax
W.E.Wolski witek96@users.sourceforge.net
\end{Author}
\begin{References}\relax
\end{References}
\begin{SeeAlso}\relax
\code{\LinkA{cals-methods}{cals.Rdash.methods}}
\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}
\end{ExampleCode}
\end{Examples}

