pal.treesearch
Class BranchAccess.Utils

java.lang.Object
  extended by pal.treesearch.BranchAccess.Utils
Enclosing interface:
BranchAccess

public static final class BranchAccess.Utils
extends java.lang.Object


Constructor Summary
BranchAccess.Utils()
           
 
Method Summary
static BranchAccess getMatching(BranchAccess[] base, BranchAccess query)
           
static BranchAccess getMatching(BranchAccess[] base, java.lang.String[] queryLeftLeaves, java.lang.String[] queryRightLeaves)
           
static boolean isContained(java.lang.String[] larger, java.lang.String[] smaller)
           
static boolean isIntersection(java.lang.String[] one, java.lang.String[] two)
           
static boolean isMatching(BranchAccess branch, java.lang.String[] queryLeftLeaves, java.lang.String[] queryRightLeaves)
           
static void transferAnnotation(BranchAccess[] source, BranchAccess[] destination)
          Transfers the annotation across two independent sets of BranchAccess objects.
static void transferAnnotation(BranchAccess source, BranchAccess[] desination)
           
static void transferAnnotation(java.lang.String[] sourceLeftLeaves, java.lang.String[] sourceRightLeaves, java.lang.Object annotation, BranchAccess[] desination)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BranchAccess.Utils

public BranchAccess.Utils()
Method Detail

isContained

public static final boolean isContained(java.lang.String[] larger,
                                        java.lang.String[] smaller)

isIntersection

public static final boolean isIntersection(java.lang.String[] one,
                                           java.lang.String[] two)

isMatching

public static final boolean isMatching(BranchAccess branch,
                                       java.lang.String[] queryLeftLeaves,
                                       java.lang.String[] queryRightLeaves)

getMatching

public static final BranchAccess getMatching(BranchAccess[] base,
                                             BranchAccess query)

getMatching

public static final BranchAccess getMatching(BranchAccess[] base,
                                             java.lang.String[] queryLeftLeaves,
                                             java.lang.String[] queryRightLeaves)

transferAnnotation

public static final void transferAnnotation(BranchAccess source,
                                            BranchAccess[] desination)

transferAnnotation

public static final void transferAnnotation(java.lang.String[] sourceLeftLeaves,
                                            java.lang.String[] sourceRightLeaves,
                                            java.lang.Object annotation,
                                            BranchAccess[] desination)

transferAnnotation

public static final void transferAnnotation(BranchAccess[] source,
                                            BranchAccess[] destination)
Transfers the annotation across two independent sets of BranchAccess objects. It is expected that the leaf sets are relatively common (they don't have to match - if there are no matches in leaf sets this method won't do anything except eat CPU time). This method is time consuming

Parameters:
source - The source of the annotation
destination - The destination of the annotation