1 \hypertarget{group__centroid__fold}{\section{Compute the centroid structure}
2 \label{group__centroid__fold}\index{Compute the centroid structure@{Compute the centroid structure}}
4 Collaboration diagram for Compute the centroid structure\-:
9 \includegraphics[width=350pt]{group__centroid__fold}
12 \subsection*{Functions}
13 \begin{DoxyCompactItemize}
15 char $\ast$ \hyperlink{group__centroid__fold_ga9aba0ba1433a6d259331e0fe9fc4a9a6}{get\-\_\-centroid\-\_\-struct\-\_\-pl} (int length, double $\ast$dist, \hyperlink{structplist}{plist} $\ast$pl)
16 \begin{DoxyCompactList}\small\item\em Get the centroid structure of the ensemble. \end{DoxyCompactList}\item
17 char $\ast$ \hyperlink{group__centroid__fold_gacdabece4aa1e20c9eaa97acb4c4dcc38}{get\-\_\-centroid\-\_\-struct\-\_\-pr} (int length, double $\ast$dist, double $\ast$\hyperlink{fold__vars_8h_a0f5757427fd5f2f79d6fca0081cd5a52}{pr})
18 \begin{DoxyCompactList}\small\item\em Get the centroid structure of the ensemble. \end{DoxyCompactList}\end{DoxyCompactItemize}
21 \subsection{Detailed Description}
24 \subsection{Function Documentation}
25 \hypertarget{group__centroid__fold_ga9aba0ba1433a6d259331e0fe9fc4a9a6}{\index{Compute the centroid structure@{Compute the centroid structure}!get\-\_\-centroid\-\_\-struct\-\_\-pl@{get\-\_\-centroid\-\_\-struct\-\_\-pl}}
26 \index{get\-\_\-centroid\-\_\-struct\-\_\-pl@{get\-\_\-centroid\-\_\-struct\-\_\-pl}!Compute the centroid structure@{Compute the centroid structure}}
27 \subsubsection[{get\-\_\-centroid\-\_\-struct\-\_\-pl}]{\setlength{\rightskip}{0pt plus 5cm}char$\ast$ get\-\_\-centroid\-\_\-struct\-\_\-pl (
28 \begin{DoxyParamCaption}
29 \item[{int}]{length, }
30 \item[{double $\ast$}]{dist, }
31 \item[{{\bf plist} $\ast$}]{pl}
32 \end{DoxyParamCaption}
33 )}}\label{group__centroid__fold_ga9aba0ba1433a6d259331e0fe9fc4a9a6}
36 Get the centroid structure of the ensemble.
38 This function is a threadsafe replacement for \hyperlink{part__func_8h_ae89a63bd83e75a80b2ba36d20b31ce81}{centroid()} with a 'plist' input
40 The centroid is the structure with the minimal average distance to all other structures \par
41 $ <d(S)> = \sum_{(i,j) \in S} (1-p_{ij}) + \sum_{(i,j) \notin S} p_{ij} $ \par
42 Thus, the centroid is simply the structure containing all pairs with $p_ij>0.5$ The distance of the centroid to the ensemble is written to the memory adressed by {\itshape dist}.
45 \begin{DoxyParams}[1]{Parameters}
46 \mbox{\tt in} & {\em length} & The length of the sequence \\
48 \mbox{\tt out} & {\em dist} & A pointer to the distance variable where the centroid distance will be written to \\
50 \mbox{\tt in} & {\em pl} & A pair list containing base pair probability information about the ensemble \\
53 \begin{DoxyReturn}{Returns}
54 The centroid structure of the ensemble in dot-\/bracket notation
56 \hypertarget{group__centroid__fold_gacdabece4aa1e20c9eaa97acb4c4dcc38}{\index{Compute the centroid structure@{Compute the centroid structure}!get\-\_\-centroid\-\_\-struct\-\_\-pr@{get\-\_\-centroid\-\_\-struct\-\_\-pr}}
57 \index{get\-\_\-centroid\-\_\-struct\-\_\-pr@{get\-\_\-centroid\-\_\-struct\-\_\-pr}!Compute the centroid structure@{Compute the centroid structure}}
58 \subsubsection[{get\-\_\-centroid\-\_\-struct\-\_\-pr}]{\setlength{\rightskip}{0pt plus 5cm}char$\ast$ get\-\_\-centroid\-\_\-struct\-\_\-pr (
59 \begin{DoxyParamCaption}
60 \item[{int}]{length, }
61 \item[{double $\ast$}]{dist, }
62 \item[{double $\ast$}]{pr}
63 \end{DoxyParamCaption}
64 )}}\label{group__centroid__fold_gacdabece4aa1e20c9eaa97acb4c4dcc38}
67 Get the centroid structure of the ensemble.
69 This function is a threadsafe replacement for \hyperlink{part__func_8h_ae89a63bd83e75a80b2ba36d20b31ce81}{centroid()} with a probability array input
71 The centroid is the structure with the minimal average distance to all other structures \par
72 $ <d(S)> = \sum_{(i,j) \in S} (1-p_{ij}) + \sum_{(i,j) \notin S} p_{ij} $ \par
73 Thus, the centroid is simply the structure containing all pairs with $p_ij>0.5$ The distance of the centroid to the ensemble is written to the memory adressed by {\itshape dist}.
76 \begin{DoxyParams}[1]{Parameters}
77 \mbox{\tt in} & {\em length} & The length of the sequence \\
79 \mbox{\tt out} & {\em dist} & A pointer to the distance variable where the centroid distance will be written to \\
81 \mbox{\tt in} & {\em pr} & A upper triangular matrix containing base pair probabilities (access via iindx \hyperlink{utils_8h_a55c0f6b3b07b6adf2ee235ba901fe397}{get\-\_\-iindx()} ) \\
84 \begin{DoxyReturn}{Returns}
85 The centroid structure of the ensemble in dot-\/bracket notation