- Timestamp:
- 10/11/11 20:40:58 (13 years ago)
- Location:
- trunk/EventBenchCore/src/de/ugoe/cs/eventbench/models
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/EventBenchCore/src/de/ugoe/cs/eventbench/models/Trie.java
r248 r251 85 85 */ 86 86 public void train(List<T> sequence, int maxOrder) { 87 if( maxOrder<1 ) { 88 return; 89 } 87 90 IncompleteMemory<T> latestActions = new IncompleteMemory<T>(maxOrder); 88 91 int i = 0; -
trunk/EventBenchCore/src/de/ugoe/cs/eventbench/models/TrieNode.java
r248 r251 246 246 void getGraph(TrieVertex parent, DelegateTree<TrieVertex, Edge> graph) { 247 247 TrieVertex currentVertex; 248 if ( symbol == null) {248 if (isRoot()) { 249 249 currentVertex = new TrieVertex("root"); 250 250 graph.addVertex(currentVertex); … … 270 270 void appendDotRepresentation(StringBuilder stringBuilder) { 271 271 String thisSaneId; 272 if ( symbol == null) {272 if (isRoot()) { 273 273 thisSaneId = "root"; 274 274 } else { … … 297 297 protected boolean isLeaf() { 298 298 return children.isEmpty(); 299 } 300 301 /** 302 * <p> 303 * Checks if the node is the root. 304 * </p> 305 * 306 * @return true if the node is the root of the trie, false otherwise 307 */ 308 protected boolean isRoot() { 309 return symbol==null; 299 310 } 300 311
Note: See TracChangeset
for help on using the changeset viewer.