Class BigraphCanonicalForm
- All Implemented Interfaces:
BigraphCanonicalFormSupport
The string representations are the minimal of all these possible breadth-first/depth-first representation according to the lexicographic order (= constraint). This guarantees the uniques of the string representation.
Note: This implementation only considers the first root of a bigraph.
Note on the Implementation: The algorithm used to generate the canonical form is adopted from [1]
. The needed top-down BFS is an implementation
described in [2]
(a sequential bottom-up BFS algorithm).
References
[1] Chi, Y., Yang, Y., Muntz, R.R.: Canonical forms for labelled trees and their applications in frequent subtree mining. Knowl Inf Syst. 8, 203–234 (2005). https://doi.org/10.1007/s10115-004-0180-7.
[2] Beamer, S., Asanović, K., Patterson, D.: Direction-optimizing Breadth-first Search. In: Proceedings of the International Conference on High Performance Computing, Networking, Storage and Analysis. pp. 12:1–12:10. IEEE Computer Society Press, Los Alamitos, CA, USA (2012).
- Author:
- Dominik Grzelak
-
Field Summary
Fields inherited from interface org.bigraphs.framework.simulation.encoding.BigraphCanonicalFormSupport
ELEMENTARY_ENCODINGS
-
Method Summary
Modifier and TypeMethodDescriptionvoid
assertBigraphHasRoots
(PureBigraph bigraph) bfcs
(B bigraph) Build a breadth-first canonical string (BFCS) for a pure bigraph according to the lexicographic order of the control's labels.protected String
bfcs
(ElementaryBigraph<?> elementaryBigraph) static BigraphCanonicalForm
static BigraphCanonicalForm
createInstance
(boolean withNodeIdentifiers) boolean
boolean
setRewriteOpenLinks
(boolean rewriteOpenLinks) setWithNodeIdentifiers
(boolean withNodeIdentifiers)
-
Method Details
-
createInstance
-
createInstance
-
bfcs
Build a breadth-first canonical string (BFCS) for a pure bigraph according to the lexicographic order of the control's labels. The representation is unique.// * The bigraph must be prime, i.e., the place graph must only have one root.
- Type Parameters:
B
- the type of the bigraph- Parameters:
bigraph
- the bigraph- Returns:
- the BFCS of the place graph of the given bigraph
-
bfcs
-
isWithNodeIdentifiers
public boolean isWithNodeIdentifiers() -
setWithNodeIdentifiers
-
isRewriteOpenLinks
public boolean isRewriteOpenLinks() -
setRewriteOpenLinks
-
assertBigraphHasRoots
-