GrGen.NET v4.4 API: the libGr class library (the type exact interface gets generated)
LGSPMatchesList<(Of <(<'Match, MatchInterface>)>)> Class
Namespacesde.unika.ipd.grGen.lgspLGSPMatchesList<(Of <(<'Match, MatchInterface>)>)>
An object representing a (possibly empty) set of matches in a graph before the rewrite has been applied. It is returned by IAction.Match() and given to the OnMatched, OnFinishing and OnFinished event. Generic to be instantiated with the exact interface and the exact implementation type of the match object Every generated Action contains a LGSPMatchesList, the matches contain one LGSPMatchesList per iterated pattern. A matches list stores the matches found by the last application of the action, the matches objects within the list are recycled by the next application of the action, only their content gets updated. The purpose of this list is to act as a memory manager to save new/garbage collection cycles and improve cache footprint. Additionally this list is used for storing the results of an iteration in the matches objects, Producer being null in this case. Then it is just used as a container for already allocated elements.
Declaration Syntax
C#
public class LGSPMatchesList<Match, MatchInterface> : IMatchesExact<MatchInterface>, 
	IMatches, IEnumerable<IMatch>, IEnumerable
where Match : new(), ListElement<Match>, MatchInterface
where MatchInterface : IMatch
Generic Template Parameters
Match
MatchInterface
Members
All MembersConstructorsMethodsPropertiesFields



IconMemberDescription
LGSPMatchesList<(Of <(<'Match, MatchInterface>)>)>(IAction)
Constructs a new LGSPMatchesList instance.

LGSPMatchesList<(Of <(<'Match, MatchInterface>)>)>(LGSPMatchesList<(Of <<'(Match, MatchInterface>)>>))
Initializes a new instance of the LGSPMatchesList<(Of <(<'Match, MatchInterface>)>)> class

Add(Match)
adds a match object to the end of the list; only applicable if this is the match of an iteration, not an action

Clear()()()()
remove all filled and committed elements from the list

Clone()()()()
Clone the matches

Count
The number of matches in this list.

FilterKeepFirst(Int32)
For filtering with the auto-supplied filter keepFirst

FilterKeepFirstFraction(Double)
For filtering with the auto-supplied filter keepFirstFraction

FilterKeepLast(Int32)
For filtering with the auto-supplied filter keepLast

FilterKeepLastFraction(Double)
For filtering with the auto-supplied filter keepLastFraction

FilterRemoveFirst(Int32)
For filtering with the auto-supplied filter removeFirst

FilterRemoveFirstFraction(Double)
For filtering with the auto-supplied filter removeFirstFraction

FilterRemoveLast(Int32)
For filtering with the auto-supplied filter removeLast

FilterRemoveLastFraction(Double)
For filtering with the auto-supplied filter removeLastFraction

First
The first match of this list.

FirstExact
Returns the first match of exact type (null if no match exists).

FirstImplementation
Returns the first match of exact type (null if no match exists).

FromList()()()()
Reincludes the array handed out with ToList, REPLACING the current matches with the ones from the list. The list might have been reordered, matches might have been removed, or even added. Elements which were null-ed count as deleted; this gives an O(1) mechanism to remove from the array.

GetEnumerator()()()()
Returns an enumerator over all found matches with inexact match interface type.

GetEnumeratorExact()()()()
Returns an enumerator over all found matches with exact match interface type

GetMatch(Int32)
Returns the match with the given index. Invalid indices cause an exception. This may be slow. If you want to iterate over the elements the Matches IEnumerable should be used.

GetMatchExact(Int32)
Returns the match of exact type with the given index. Invalid indices cause an exception. This may be slow. If you want to iterate over the elements the MatchesExact IEnumerable should be used.

GetNextUnfilledPosition()()()()
returns an empty match object from the matches list to be filled by the matching action with the found nodes, edges and subpatterns. unless PositionWasFilledFixIt is called you always get the same element

Item[([( Int32])])
Returns the match with the given index. This may be slow. If you want to iterate over the elements the Matches IEnumerable should be used.

PositionWasFilledFixIt()()()()
the match object returned by GetNextUnfilledPosition was filled, now fix it within the list, so that the next call to GetNextUnfilledPosition returns a new element

producer
the action object used to generate this LGSPMatchesList object

Producer
The action object used to generate this LGSPMatchesList object

RemoveFirst()()()()
removes the first match object from the the list

RemoveMatch(Int32)
Removes the match at the given index and returns it.

RemoveMatchExact(Int32)
Removes the match of exact type at the given index and returns it.

Root
The root element of the list.

ToList()()()()
Returns the content of the current matches list in form of an array which can be efficiently indexed and reordered. The array is destroyed when this method is called again, the content is destroyed when the rule is matched again (there is only one array existing).

Inheritance Hierarchy
Object
LGSPMatchesList<(Of <(<'Match, MatchInterface>)>)>

Assembly: lgspBackend (Module: lgspBackend) Version: 4.4.0.0 (4.4.0.0)