Package pal.treesearch
Class BranchAccess.Utils
java.lang.Object
pal.treesearch.BranchAccess.Utils
- Enclosing interface:
- BranchAccess
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic final BranchAccessgetMatching(BranchAccess[] base, String[] queryLeftLeaves, String[] queryRightLeaves) static final BranchAccessgetMatching(BranchAccess[] base, BranchAccess query) static final booleanisContained(String[] larger, String[] smaller) static final booleanisIntersection(String[] one, String[] two) static final booleanisMatching(BranchAccess branch, String[] queryLeftLeaves, String[] queryRightLeaves) static final voidtransferAnnotation(String[] sourceLeftLeaves, String[] sourceRightLeaves, Object annotation, BranchAccess[] desination) static final voidtransferAnnotation(BranchAccess[] source, BranchAccess[] destination) Transfers the annotation across two independent sets of BranchAccess objects.static final voidtransferAnnotation(BranchAccess source, BranchAccess[] desination)
-
Constructor Details
-
Utils
public Utils()
-
-
Method Details
-
isContained
-
isIntersection
-
isMatching
public static final boolean isMatching(BranchAccess branch, String[] queryLeftLeaves, String[] queryRightLeaves) -
getMatching
-
getMatching
public static final BranchAccess getMatching(BranchAccess[] base, String[] queryLeftLeaves, String[] queryRightLeaves) -
transferAnnotation
-
transferAnnotation
public static final void transferAnnotation(String[] sourceLeftLeaves, String[] sourceRightLeaves, Object annotation, BranchAccess[] desination) -
transferAnnotation
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 annotationdestination- The destination of the annotation
-