|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--Algorithm | +--UPGMA
This class implements UPGMA described in the package.
Field Summary |
Fields inherited from class Algorithm |
ansField, ansFrame, ansLabel, answer, count, display, infoArea, inputTable, interNode, interTable, maxLength, maxName, mini, minj, minLength, names, nodes, numOfNodes, numOfNodesLeft, okAnsButton, okQuesButton, phyTreesControls, popUpQues, quesFrame, quesLabel, question, random_i, random_j, roots, runType, treeDisplay |
Constructor Summary | |
UPGMA(PTCControls inPhyTreesControls)
Initializes specific GUI components used in the UPGMA algorithm. |
Method Summary | |
void |
actionPerformed(java.awt.event.ActionEvent e)
Defines how to handle the actions of the OK buttons for the question and the answer windows in the UPGMA algorithm. |
java.lang.String |
buildAnswer()
Generates the answers for the questions in the UPGMA algorithm. |
void |
calculateNewDistance()
Implements the method in the Algorithm calss and defines how to calculate new distance matrix in the UPGMA algorithm. |
double |
findAndCalculate()
Defines how to find the nodes to join and calculate branch lengths in the UPGMA algorithm. |
boolean |
findOne()
Implements the method in the Algorithm class and indicates if one tree is found. |
void |
generateRandom_ij()
Generates random numbers for pop up questions involved the new distance table in the UPGMA algorithm. |
double[][] |
getDistance()
Gets the distance matrix used in the UPGMA algorithm. |
boolean |
init()
Overrides the method in the Algorithm class and initializes specific data components used in the UPGMA algorithm. |
boolean |
isEnd()
Implements the method in the Algorithm class and indicates if the algorithm terminates in the UPGMA algorithm. |
void |
join(double height)
Defines how to join nodes in the UPGMA algorithm. |
void |
popUpQuestion()
Generates pop up questions in the UPGMA algorithm. |
void |
process()
Defines how to process in the UPGMA algorithm. |
void |
run()
Implements the method in the Algorithm class and defines how to run the UPGMA algorithm. |
void |
trace()
Implements the method in the Algorithm class and defines how to trace the UPGMA algorithm. |
void |
updateUI()
Defines how to update the tree and the intermediate distance table in the UPGMA algorithm. |
Methods inherited from class Algorithm |
computeMaxName, computeMinMaxLength, constructAnsFrame, constructButton, constructQuesFrame, deleteNodes, findMin, getCount, getDisplay, getInterNode, getMaxLength, getMaxName, getMinLength, getNames, getNode, getNodes, getNumOfNodes, getNumOfNodesLeft, getRoots, randomInt, reset, setPopUpQues, setRoots, setRunType, setThreeFractionDigit, updateTree |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public UPGMA(PTCControls inPhyTreesControls)
inPhyTreesControls
- the PTCControls objectMethod Detail |
public double[][] getDistance()
public boolean init()
init
in class Algorithm
true
- the algorithm is properly initialized
false
- input data is not rightpublic void trace()
trace
in class Algorithm
public void run()
run
in class Algorithm
public void process()
public double findAndCalculate()
public void join(double height)
public void updateUI()
public void calculateNewDistance()
calculateNewDistance
in class Algorithm
public boolean isEnd()
isEnd
in class Algorithm
true
- the algorithm terminates
false
- the algorithm does not terminatepublic boolean findOne()
findOne
in class Algorithm
false
for the NJ algorithmpublic void generateRandom_ij()
public void popUpQuestion()
public java.lang.String buildAnswer()
public void actionPerformed(java.awt.event.ActionEvent e)
e
- the ActionEvent object which is responsible for the action
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |