R
- The result type of the alignment algorithm.public class ParallelProcessingEngine<R> extends Object
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULTTHREADNUM |
Constructor and Description |
---|
ParallelProcessingEngine(AlignmentAlgorithm<R> algorithm,
Sequence[] sequences)
This sets up a ParallelProcessingEngine for the given AlignmentAlgorithm
and the given Sequences.
|
Modifier and Type | Method and Description |
---|---|
void |
calculate()
This starts the calculation of the pairwise alignment of the input
Sequencs according to the given algorithm.
|
AlignmentAlgorithm<R> |
getAlgorithm() |
boolean[][] |
getDoCalculation()
Please refer to the corresponding setter method for more information.
|
int |
getNumberOfThreads()
Please refer to the corresponding setter method for more information.
|
R[][] |
getResultMatrix()
This returns the matrix of results if the calculation is done or null if
it has not finished yet.
|
double[][] |
getScoreMatrix()
This method will only work if the Result class is Double.
|
Sequence[] |
getSequences() |
boolean |
isFinished() |
boolean |
isSymmetric()
Please refer to the corresponding setter method for more information.
|
boolean |
isVerbose()
If verbose is set to true the ParallelProcessingEngine will give
information about the current state of the calculation.
|
void |
setDoCalculation(boolean[][] doCalculation)
This enables a user to specifically set which pairwise similarity
calculations should be done and which should not be done.
|
void |
setNumberOfThreads(int numThreads)
Sets the number of threads that are used.
|
void |
setSymmetric(boolean symmetric)
If this is set to true it is assumed that the desired result of the
alignment is symmetric, meaning that the alignment between the sequences
i and j is equal to the alignment between j and i.
|
void |
setVerbose(boolean verbose)
If verbose is set to true the ParallelProcessingEngine will give
information about the current state of the calculation.
|
public static final int DEFAULTTHREADNUM
public ParallelProcessingEngine(AlignmentAlgorithm<R> algorithm, Sequence[] sequences)
algorithm
- an AlignmentAlgorithm of your choice.sequences
- an array of Sequences. Per default the
ParallelProcessingEngine will calculate all pairwise alignments between
them.public AlignmentAlgorithm<R> getAlgorithm()
public Sequence[] getSequences()
public void setVerbose(boolean verbose)
verbose
- true or false.public boolean isVerbose()
public void setDoCalculation(boolean[][] doCalculation)
doCalculation
- a S x S - matrix that specifies which pairwise
alignment calculations should be done.public boolean[][] getDoCalculation()
public void setNumberOfThreads(int numThreads)
numThreads
- the number of threads that are used.public int getNumberOfThreads()
public void setSymmetric(boolean symmetric)
symmetric
- true or false.public boolean isSymmetric()
public R[][] getResultMatrix()
public double[][] getScoreMatrix()
public boolean isFinished()
public void calculate()
Copyright © 2014. All rights reserved.