Changeset 399 for trunk/EventBenchCore


Ignore:
Timestamp:
03/09/12 13:40:55 (13 years ago)
Author:
sherbold
Message:
  • adapted implementation of de.ugoe.cs.eventbench.models.Trie.getNumLeafAncestors() and de.ugoe.cs.eventbench.TrieNode?().getLeafAncestors() as the assumptions of these methods were invalidated by the new and more precise equals functions
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

    r397 r399  
    88import java.util.LinkedList; 
    99import java.util.List; 
    10 import java.util.Set; 
    1110 
    1211import de.ugoe.cs.util.StringTools; 
     
    408407         */ 
    409408        public int getNumLeafAncestors() { 
    410                 Set<TrieNode<T>> ancestors = new HashSet<TrieNode<T>>(); 
     409                List<TrieNode<T>> ancestors = new LinkedList<TrieNode<T>>(); 
    411410                rootNode.getLeafAncestors(ancestors); 
    412411                return ancestors.size(); 
  • trunk/EventBenchCore/src/de/ugoe/cs/eventbench/models/TrieNode.java

    r397 r399  
    66import java.util.LinkedList; 
    77import java.util.List; 
    8 import java.util.Set; 
    98 
    109import de.ugoe.cs.eventbench.models.Trie.Edge; 
     
    350349         *            set of all ancestors of leafs 
    351350         */ 
    352         protected void getLeafAncestors(Set<TrieNode<T>> ancestors) { 
     351        protected void getLeafAncestors(List<TrieNode<T>> ancestors) { 
    353352                boolean isAncestor = false; 
    354353                for (TrieNode<T> child : children) { 
Note: See TracChangeset for help on using the changeset viewer.