Definition
An instance r of the data type TaggedRule is a rule
(p1, i1) ...
(pk, ik)
q,
where (pj, ij)
(1 < = j < = k) are tagged rule
literals (of type TRLiteral), and q is a key.
Tagged rules are used by modules in order to
define postcondition rules.
#include < AGD/TaggedRule.h >
Creation
TaggedRule | r | creates an instances r of type TaggedRule
initialized to
![]() |
TaggedRule | r(AgdKey q) | creates an instances r of type TaggedRule
initialized to
![]() |
TaggedRule | r(const leda_list<TRLiteral>& L, AgdKey q) | |
creates an instances r of type TaggedRule
initialized to
l1 ![]() ![]() ![]() |
Operations
const leda_list<TRLiteral>& | r.left() | returns the left side of r, i.e., (p1, i1),...,(pk, ik). |
AgdKey | r.right() | returns the right side of r, i.e., q. |
int | r.length() | returns the number k of literals on the left side of r. |
TaggedRule& | r.And(AgdKey p, int j = 1) | |
extends r to
(p1, i1) ![]() ![]() ![]() ![]() |
||
TaggedRule& | r.implies(AgdKey q) | sets the right side of r to q and returns r. |
ostream& | ostream& os << const TaggedRule& r | |
writes tagged rule r to output stream os. |
Example
We create a tagged rule
(planar, 1) (triconnected, 1)
(simple, 1)
(no
self
loops, 1)
convex and set it
as postcondition rule of a layout algorithm.
SampleLayout::SampleLayout() : LayoutModule (true) { TaggedRule r(convex); r.And(planar).And(triconnected).And(simple).And(no_self_loops); add_post_rule(r); .... }
© Copyright 1998-2001, Algorithmic Solutions Software GmbH. All rights reserved.
2001-08-13