Changeset 1580 for branches/ralph/src/main/java/de/ugoe/cs
- Timestamp:
- 06/25/14 22:22:39 (10 years ago)
- Location:
- branches/ralph/src/main/java/de/ugoe/cs/autoquest/tasktrees
- Files:
-
- 2 deleted
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/ralph/src/main/java/de/ugoe/cs/autoquest/tasktrees/alignment/algorithms/NumberSequence.java
r1568 r1580 1 1 package de.ugoe.cs.autoquest.tasktrees.alignment.algorithms; 2 2 3 import java.io.Serializable; 4 import java.util.ArrayList; 3 5 4 import java.util.Random; 6 5 7 public class NumberSequence implements Serializable{6 public class NumberSequence { 8 7 private int[] sequence; 9 8 private int signature; -
branches/ralph/src/main/java/de/ugoe/cs/autoquest/tasktrees/alignment/matrix/DifferenceSubstitutionMatrix.java
r1578 r1580 4 4 package de.ugoe.cs.autoquest.tasktrees.alignment.matrix; 5 5 6 import java.util.Collection;7 import java.util.List;8 9 import de.ugoe.cs.autoquest.eventcore.Event;10 import de.ugoe.cs.autoquest.tasktrees.treeifc.IUserSession;11 6 12 7 /** -
branches/ralph/src/main/java/de/ugoe/cs/autoquest/tasktrees/alignment/matrix/NearbySubstitutionMatrix.java
r1578 r1580 3 3 */ 4 4 package de.ugoe.cs.autoquest.tasktrees.alignment.matrix; 5 6 import java.util.Collection;7 import java.util.List;8 9 import de.ugoe.cs.autoquest.eventcore.Event;10 import de.ugoe.cs.autoquest.tasktrees.treeifc.IUserSession;11 5 12 6 /** -
branches/ralph/src/main/java/de/ugoe/cs/autoquest/tasktrees/alignment/matrix/UPGMAMatrix.java
r1572 r1580 1 1 package de.ugoe.cs.autoquest.tasktrees.alignment.matrix; 2 2 3 import de.ugoe.cs.autoquest.tasktrees.alignment.pal.misc.Identifier;4 3 5 4 -
branches/ralph/src/main/java/de/ugoe/cs/autoquest/tasktrees/alignment/pal/tree/FengDoolittleNode.java
r1579 r1580 374 374 newNode.addChild(child2); 375 375 newNode.setIdentifier(new Identifier(child1.getIdentifier().getName() + " " + child2.getIdentifier().getName())); 376 System.out.println("Merging " + child1.getIdentifier() + " with " + child2.getIdentifier());376 //System.out.println("Merging " + child1.getIdentifier() + " with " + child2.getIdentifier()); 377 377 378 378 if(newNode instanceof FengDoolittleNode) { … … 410 410 } 411 411 else { 412 412 System.out.println("This should never happen, it's a binary tree."); 413 413 } 414 414 -
branches/ralph/src/main/java/de/ugoe/cs/autoquest/tasktrees/alignment/pal/tree/Node.java
r1577 r1580 134 134 ArrayList<NumberSequence> getSequences(); 135 135 136 137 136 void joinChildren( int n1, int n2); 138 137 -
branches/ralph/src/main/java/de/ugoe/cs/autoquest/tasktrees/alignment/pal/tree/NodeUtils.java
r1579 r1580 9 9 package de.ugoe.cs.autoquest.tasktrees.alignment.pal.tree; 10 10 11 import java.io.*; 12 13 import de.ugoe.cs.autoquest.tasktrees.alignment.pal.io.FormattedOutput; 11 14 12 import de.ugoe.cs.autoquest.tasktrees.alignment.pal.misc.Identifier; 15 13 … … 377 375 } 378 376 379 /** 380 * prints node in New Hamshire format. 381 */ 382 static void printNH(PrintWriter out, Node node, 383 boolean printLengths, boolean printInternalLabels) { 384 385 printNH(out, node, printLengths, printInternalLabels, 0, true); 386 } 387 388 389 static int printNH(PrintWriter out, Node node, 390 boolean printLengths, boolean printInternalLabels, int column, boolean breakLines) { 391 392 if (breakLines) column = breakLine(out, column); 393 394 if (!node.isLeaf()) 395 { 396 out.print("("); 397 column++; 398 399 for (int i = 0; i < node.getChildCount(); i++) 400 { 401 if (i != 0) 402 { 403 out.print(","); 404 column++; 405 } 406 407 column = printNH(out, node.getChild(i), printLengths, printInternalLabels, column, breakLines); 408 } 409 410 out.print(")"); 411 column++; 412 } 413 414 if (!node.isRoot()) 415 { 416 if (node.isLeaf() || printInternalLabels) 417 { 418 if (breakLines) column = breakLine(out, column); 419 420 String id = node.getIdentifier().toString(); 421 out.print(id); 422 column += id.length(); 423 } 424 425 if (printLengths) 426 { 427 out.print(":"); 428 column++; 429 430 if (breakLines) column = breakLine(out, column); 431 432 column += FormattedOutput.getInstance().displayDecimal(out, node.getBranchLength(), 7); 433 } 434 } 435 436 return column; 437 } 438 439 private static int breakLine(PrintWriter out, int column) 440 { 441 if (column > 70) 442 { 443 out.println(); 444 column = 0; 445 } 446 447 return column; 448 } 377 378 379 449 380 /** 450 381 * Returns the first nodes in this tree that has the -
branches/ralph/src/main/java/de/ugoe/cs/autoquest/tasktrees/alignment/pal/tree/SimpleTree.java
r1579 r1580 8 8 9 9 package de.ugoe.cs.autoquest.tasktrees.alignment.pal.tree; 10 11 import java.io.PrintWriter;12 import java.io.StringWriter;13 14 10 15 11 import de.ugoe.cs.autoquest.tasktrees.alignment.pal.misc.Identifier; … … 198 194 199 195 200 public String toString() {201 StringWriter sw = new StringWriter();202 NodeUtils.printNH(new PrintWriter(sw), getRoot(), false, true, 0, true);203 sw.write(";");204 return sw.toString();205 }206 207 208 209 210 196 211 197 -
branches/ralph/src/main/java/de/ugoe/cs/autoquest/tasktrees/temporalrelation/SequenceForTaskDetectionRuleAlignment.java
r1579 r1580 46 46 import de.ugoe.cs.autoquest.tasktrees.treeifc.IUserSession; 47 47 import de.ugoe.cs.autoquest.usageprofiles.SymbolMap; 48 import de.ugoe.cs.autoquest.usageprofiles.Trie;49 48 import de.ugoe.cs.autoquest.usageprofiles.TrieProcessor; 50 49 import de.ugoe.cs.util.StopWatch;
Note: See TracChangeset
for help on using the changeset viewer.