Coverage
ReferencesA coverage specifies items, twigs or even entire trees using two integers. Coverages ignore actual paths, opting instead to identify elements using indices alone.
Properties
Methods
CreateFromAccess
#Create the initial coverage implied by an access flag.
IncrementItem
#Move the coverage to the next item. This method can only be called if the coverage access is Access.Item.
Returns: New coverage.
IncrementTwig
#Move the coverage to the next twig. This method can only be called if the coverage access is not Access.Tree.
Returns: New coverage.
IsValidCoverage
#Test whether a specific coverage validly applies to a tree.
IsValidCoverage
#Test whether the given coverages correctly identify specific elements of a an array of trees.
Slice
#Create a new tree based on this coverage of an existing tree.
public ITree Slice()
tree,
Tree to slice.
graftItem
If true, and the Access of this coverage is Access.Item, the item index will be appended to the returned tree.
TryIncrementItem
#Try and increment a coverage to the next item index.
TryIncrementItems
#Try and increment all coverages whose Access is set to Access.Item to the next item index.
Returns: True if at least one coverage in the array was successfully incremented.
TryIncrementTwig
#Try and increment a coverage to the next twig index.
TryIncrementTwigs
#Try and increment all coverages whose Access is set to either Access.Item or Access.Twig to the next twig index.
Returns: True if at least one coverage in the array was successfully incremented.