statalign.postprocess.utils
Class RNAFoldingTools.MultiThreadedPosteriorDecoding

java.lang.Object
  extended by statalign.postprocess.utils.RNAFoldingTools.MultiThreadedPosteriorDecoding
Enclosing class:
RNAFoldingTools

public class RNAFoldingTools.MultiThreadedPosteriorDecoding
extends java.lang.Object

A class, which given a base-pairing probability matrix and an array representing the probabilities of a single nucleotides being unpaired, performs a multi-threaded posterior-decoding and returns the MPD consensus structure.


Constructor Summary
RNAFoldingTools.MultiThreadedPosteriorDecoding(double[][] basePairCount, double[] singleBaseCount)
           
 
Method Summary
 double compute()
          Initializes the posterior-decoding procedure by launching a specified number of threads.
 void computeNextSection()
          Launches new threads until no more sections are available.
 statalign.postprocess.utils.RNAFoldingTools.Pair getNextSection()
          Generates a sequence of coordinates of windows on which posterior-decoding can be performed independently in parallel.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RNAFoldingTools.MultiThreadedPosteriorDecoding

public RNAFoldingTools.MultiThreadedPosteriorDecoding(double[][] basePairCount,
                                                      double[] singleBaseCount)
Method Detail

compute

public double compute()
Initializes the posterior-decoding procedure by launching a specified number of threads.

Returns:
the value of the dynamic programming matrix at (0, N).
See Also:
computeNextSection()

computeNextSection

public void computeNextSection()
Launches new threads until no more sections are available. The thread class itself recursively calls computeNextSection() each time it completes, ensuring that the number of threads running at any one time is less than number of available processing cores.


getNextSection

public statalign.postprocess.utils.RNAFoldingTools.Pair getNextSection()
Generates a sequence of coordinates of windows on which posterior-decoding can be performed independently in parallel.

Returns:
the positions of the next window to perform posterior-decoding.