Rule GML writer.
More...
#include <Rule_GML_writer.hh>
|
static void | write (std::ostream &out, const Rule &rule, const bool withSpaces=true) |
|
static void | writeCompact (std::ostream &out, const Rule &rule, const bool withSpaces=true) |
|
Algorithm wrapper class to write a ggl rule in GGL GML format to stream.
- Author
- Martin Mann (c) 2013 http://www.bioinf.uni-freiburg.de/~mmann/
Definition at line 20 of file Rule_GML_writer.hh.
ggl::Rule_GML_writer::Rule_GML_writer |
( |
| ) |
|
ggl::Rule_GML_writer::~Rule_GML_writer |
( |
| ) |
|
Writes the GML part for the given context
- Parameters
-
graph | the rule core graph |
context | the context to print |
whether | to print with whitespaces or minimal |
- Returns
- the GML notation for the current context
static void ggl::Rule_GML_writer::write |
( |
std::ostream & |
out, |
|
|
const Rule & |
rule, |
|
|
const bool |
withSpaces = true |
|
) |
| |
|
static |
Writes a boost rule in GGL GML format to stream.
NOTE: currently no constraints are printed...
- Parameters
-
out | the stream to write to |
rule | the rule to print |
withSpaces | if true newlines and white spaces are used to write a user friendly and readable output, otherwise a one-line output with minimal space requirement is produced. |
static void ggl::Rule_GML_writer::writeCompact |
( |
std::ostream & |
out, |
|
|
const Rule & |
rule, |
|
|
const bool |
withSpaces = true |
|
) |
| |
|
static |
Writes a boost rule in compacted GGL GML format to stream.
Therin, each node/label occurs only once. To indicate label changes or edge insertions/deletions, a label is in one of the following 4 forms:
- "C" : the according node/edge has this label left and right = context
- "L|" : the according edge is removed and the left side label L is given
- "|R" : the according edge is inserted and the right side label R is given
- "L|R" : the node label changes from left label L to right label R or the edge changes from valence L to valence R during the reaction
- Parameters
-
out | the stream to write to |
rule | the rule to print |
withSpaces | if true newlines and white spaces are used to write a user friendly and readable output, otherwise a one-line output with minimal space requirement is produced. |
The documentation for this class was generated from the following file: