The Dynamic Programming Matrices

Overview

This module provides interfaces that deal with creation and destruction of dynamic programming matrices used within the RNAlib. More…

// typedefs

typedef struct vrna_mx_mfe_s vrna_mx_mfe_t
typedef struct vrna_mx_pf_s vrna_mx_pf_t

// enums

enum vrna_mx_type_e

// structs

struct vrna_mx_mfe_s
struct vrna_mx_pf_s

// global functions

int vrna_mx_add (
    vrna_fold_compound_t* vc,
    vrna_mx_type_e type,
    unsigned int options
    )

int vrna_mx_mfe_add (
    vrna_fold_compound_t* vc,
    vrna_mx_type_e mx_type,
    unsigned int options
    )

int vrna_mx_pf_add (
    vrna_fold_compound_t* vc,
    vrna_mx_type_e mx_type,
    unsigned int options
    )

int vrna_mx_prepare (
    vrna_fold_compound_t* vc,
    unsigned int options
    )

void vrna_mx_mfe_free (vrna_fold_compound_t* vc)
void vrna_mx_pf_free (vrna_fold_compound_t* vc)

Detailed Documentation

This module provides interfaces that deal with creation and destruction of dynamic programming matrices used within the RNAlib.

Typedefs

typedef struct vrna_mx_mfe_s vrna_mx_mfe_t
Typename for the Minimum Free Energy (MFE) DP matrices data structure vrna_mx_mfe_s .
typedef struct vrna_mx_pf_s vrna_mx_pf_t
Typename for the Partition Function (PF) DP matrices data structure vrna_mx_pf_s .

Global Functions

int vrna_mx_add (
    vrna_fold_compound_t* vc,
    vrna_mx_type_e type,
    unsigned int options
    )
Add Dynamic Programming (DP) matrices (allocate memory)

This function adds DP matrices of a specific type to the provided vrna_fold_compound_t , such that successive DP recursion can be applied. The function caller has to specify which type of DP matrix is requested, see vrna_mx_type_e , and what kind of recursive algorithm will be applied later on, using the parameters type, and options, respectively. For the latter, Minimum free energy (MFE), and Partition function (PF) computations are distinguished. A third option that may be passed is VRNA_OPTION_HYBRID , indicating that auxiliary DP arrays are required for RNA-RNA interaction prediction.

Parameters:

vc The vrna_fold_compound_t that holds pointers to the DP matrices
type The type of DP matrices requested
options Option flags that specify the kind of DP matrices, such as MFE or PF arrays, and auxiliary requirements

Returns:

1 if DP matrices were properly allocated and attached, 0 otherwise

Note

Usually, there is no need to call this function, since the constructors of vrna_fold_compound_t are handling all the DP matrix memory allocation.

void vrna_mx_mfe_free (vrna_fold_compound_t* vc)
Free memory occupied by the Minimum Free Energy (MFE) Dynamic Programming (DP) matrices.

Parameters:

vc The vrna_fold_compound_t storing the MFE DP matrices that are to be erased from memory
void vrna_mx_pf_free (vrna_fold_compound_t* vc)
Free memory occupied by the Partition Function (PF) Dynamic Programming (DP) matrices.

Parameters:

vc The vrna_fold_compound_t storing the PF DP matrices that are to be erased from memory