BiobaseXNA-0.7.0.1: Efficient RNA/DNA representations

Safe HaskellNone

Biobase.Secondary.Constraint

Contents

Synopsis

Documentation

class MkConstraint a whereSource

We can create a constraint from different sources

newtype Constraint Source

A constraint is nothing more than a vector of constraint characters together with a possible pairing for each character.

Constructors

Constraint 

Fields

unConstraint :: Vector (Char, Int)
 

bonusTable :: Double -> Double -> Constraint -> Unboxed DIM2 DoubleSource

Given a Constraint, create an NxN matrix with bonus energies. These energies can be included in all pair-creating functions and will disallow or strongly favor certain pairings, while others will receive neither bonus nor malus.

In case, a pair (i,j) is annotated as both, bonus- and malus-receiving, it will be set to receive a malus. This can happen, if something like < would give a bonus, but x gives a malus (and other cases).

TODO and again, we should parametrize over Energy, Score, etc (that is, Prim a)

Instances