Changeset 1734 for branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/alignment/algorithms/NeedlemanWunsch.java
- Timestamp:
- 09/05/14 20:20:29 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/alignment/algorithms/NeedlemanWunsch.java
r1733 r1734 1 /* 2 * 3 */ 1 4 package de.ugoe.cs.autoquest.tasktrees.alignment.algorithms; 2 5 … … 8 11 import de.ugoe.cs.autoquest.tasktrees.alignment.algorithms.Constants; 9 12 13 // TODO: Auto-generated Javadoc 14 /** 15 * The Class NeedlemanWunsch. 16 */ 10 17 public class NeedlemanWunsch implements AlignmentAlgorithm { 11 18 12 /** 13 * The first input 14 */ 19 /** The first input. */ 15 20 private int[] input1; 16 21 17 /** 18 * The second input String 19 */ 22 /** The second input String. */ 20 23 private int[] input2; 21 24 22 /** 23 * The lengths of the input 24 */ 25 /** The lengths of the input. */ 25 26 private int length1, length2; 26 27 … … 31 32 private MatrixEntry[][] matrix; 32 33 34 /** The alignment. */ 33 35 private ArrayList<NumberSequence> alignment; 34 36 35 /** 36 * Substitution matrix to calculate scores 37 */ 37 /** Substitution matrix to calculate scores. */ 38 38 private SubstitutionMatrix submat; 39 39 40 /* (non-Javadoc) 41 * @see de.ugoe.cs.autoquest.tasktrees.alignment.algorithms.AlignmentAlgorithm#align(de.ugoe.cs.autoquest.tasktrees.alignment.algorithms.NumberSequence, de.ugoe.cs.autoquest.tasktrees.alignment.algorithms.NumberSequence, de.ugoe.cs.autoquest.tasktrees.alignment.matrix.SubstitutionMatrix, float) 42 */ 40 43 @Override 41 44 public void align(NumberSequence input1, NumberSequence input2, … … 155 158 } 156 159 160 /* (non-Javadoc) 161 * @see de.ugoe.cs.autoquest.tasktrees.alignment.algorithms.AlignmentAlgorithm#getMatches() 162 */ 157 163 @Override 158 164 public ArrayList<Match> getMatches() { … … 163 169 /** 164 170 * Get the maximum value in the score matrix. 171 * 172 * @return the max score 165 173 */ 166 174 @Override … … 180 188 } 181 189 190 /* (non-Javadoc) 191 * @see de.ugoe.cs.autoquest.tasktrees.alignment.algorithms.AlignmentAlgorithm#printAlignment() 192 */ 182 193 @Override 183 194 public void printAlignment() { … … 210 221 211 222 /** 212 * print the dynmaic programming matrix 223 * print the dynmaic programming matrix. 213 224 */ 214 225 @Override … … 232 243 } 233 244 245 /** 246 * Sets the alignment. 247 * 248 * @param alignment the new alignment 249 */ 234 250 public void setAlignment(ArrayList<NumberSequence> alignment) { 235 251 this.alignment = alignment; … … 250 266 } 251 267 268 /** 269 * Traceback. 270 */ 252 271 public void traceback() { 253 272 MatrixEntry tmp = matrix[length1][length2];
Note: See TracChangeset
for help on using the changeset viewer.