Compute the centroid structure
[Calculating Partition Functions and Pair Probabilities]

Collaboration diagram for Compute the centroid structure:

Functions

char * get_centroid_struct_pl (int length, double *dist, plist *pl)
 Get the centroid structure of the ensemble.
char * get_centroid_struct_pr (int length, double *dist, double *pr)
 Get the centroid structure of the ensemble.

Function Documentation

char* get_centroid_struct_pl ( int  length,
double *  dist,
plist pl 
)

Get the centroid structure of the ensemble.

This function is a threadsafe replacement for centroid() with a 'plist' input

The centroid is the structure with the minimal average distance to all other structures
$ <d(S)> = \sum_{(i,j) \in S} (1-p_{ij}) + \sum_{(i,j) \notin S} p_{ij} $
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 dist.

Parameters:
[in] length The length of the sequence
[out] dist A pointer to the distance variable where the centroid distance will be written to
[in] pl A pair list containing base pair probability information about the ensemble
Returns:
The centroid structure of the ensemble in dot-bracket notation
char* get_centroid_struct_pr ( int  length,
double *  dist,
double *  pr 
)

Get the centroid structure of the ensemble.

This function is a threadsafe replacement for centroid() with a probability array input

The centroid is the structure with the minimal average distance to all other structures
$ <d(S)> = \sum_{(i,j) \in S} (1-p_{ij}) + \sum_{(i,j) \notin S} p_{ij} $
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 dist.

Parameters:
[in] length The length of the sequence
[out] dist A pointer to the distance variable where the centroid distance will be written to
[in] pr A upper triangular matrix containing base pair probabilities (access via iindx get_iindx() )
Returns:
The centroid structure of the ensemble in dot-bracket notation

Generated on 20 Mar 2013 for RNAlib-2.1.1 by  doxygen 1.6.1