Documentation
¶
Overview ¶
Package sgi implementing graph isomorphism algorithms and helpers.
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var NullNode = -1
Functions ¶
func FindIsomorphism ¶
FindIsomorphism using the given state machine.
func FindVF2SubgraphIsomorphism ¶
func FindVF2SubgraphIsomorphism(query, target Graph, fsem SemFeasFunc) []map[int]int
FindVF2SubgraphIsomorphism finds a graph within another using the VF2 algorithm. It returns numeric mappings between the query and target graphs. Use the SemFeasFunc to further limit the algorithm to the nodes which really should be related.
Example ¶
var db, subgraph *dbGraphMock FindVF2SubgraphIsomorphism(subgraph, db, func(state State, fromQueryNode, fromTargetNode, toQueryNode, toTargetNode int) bool { return isSemanticallyFeasable(state, fromQueryNode, fromTargetNode, toQueryNode, toTargetNode) })
Output:
Types ¶
type SemFeasFunc ¶
type SemFeasFunc func(state State, fromQueryNode, fromTargetNode, toQueryNode, toTargetNode int) bool
SemFeasFunc to describe if it semantically feasable to traverse from one node to another by looking at the describing query nodes and the actual nodes in the graph. This is called if a raw edge between the two nodes exist.
Click to show internal directories.
Click to hide internal directories.