Module org.jgrapht.core
Package org.jgrapht.alg.similarity
Class ZhangShashaTreeEditDistance.CacheEntry
java.lang.Object
org.jgrapht.alg.similarity.ZhangShashaTreeEditDistance.CacheEntry
- Enclosing class:
ZhangShashaTreeEditDistance<V,
E>
Auxiliary class which is used in
treeDistance()
function to store intermediate edit
operations during dynamic programming computation.-
Field Summary
FieldsModifier and TypeFieldDescription(package private) int
Outer index of the previous entry which is part of the computed optimal solution.(package private) int
Inner index of the previous entry which is part of the computed optimal solution.(package private) ZhangShashaTreeEditDistance.EditOperation
<V> Edit operation stored in this entry.(package private) int
Outer index of an entry in $editOperationLists$ which should be taken in caseeditOperation
is $null$.(package private) int
Inner index of an entry in $editOperationLists$ which should be taken in caseeditOperation
is $null$. -
Constructor Summary
ConstructorsConstructorDescriptionCacheEntry
(int cachePreviousPosI, int cachePreviousPosJ, ZhangShashaTreeEditDistance.EditOperation<V> editOperation) Constructs an instance of entry for the givencachePreviousPosI
cachePreviousPosJ
andeditOperation
. -
Method Summary
-
Field Details
-
cachePreviousPosI
int cachePreviousPosIOuter index of the previous entry which is part of the computed optimal solution. -
cachePreviousPosJ
int cachePreviousPosJInner index of the previous entry which is part of the computed optimal solution. -
editOperation
ZhangShashaTreeEditDistance.EditOperation<V> editOperationEdit operation stored in this entry. Is this field is $null$ this indicates that operations from $editOperationLists[treeDistanceI][treeDistanceJ]$. -
treeDistanceI
int treeDistanceIOuter index of an entry in $editOperationLists$ which should be taken in caseeditOperation
is $null$. -
treeDistanceJ
int treeDistanceJInner index of an entry in $editOperationLists$ which should be taken in caseeditOperation
is $null$.
-
-
Constructor Details
-
CacheEntry
public CacheEntry(int cachePreviousPosI, int cachePreviousPosJ, ZhangShashaTreeEditDistance.EditOperation<V> editOperation) Constructs an instance of entry for the givencachePreviousPosI
cachePreviousPosJ
andeditOperation
.- Parameters:
cachePreviousPosI
- outer index of the previous cache entrycachePreviousPosJ
- inner index of the previous cache entryeditOperation
- edit operation of this entry
-