2.2.3. Derivation.hpp

2.2.3.1. Class Derivation

class Derivation

This class is a simple wrapper for passing data around. It contains two multisets of graphs \(G\) and \(H\), and optionally a rule \(p\). An object may thus implicitly store a set of direct derivations \(G\Rightarrow^p H\), though the validity of the data is not checked.

2.2.3.1.1. Synopsis

struct MOD_DECL Derivation {
    using GraphList = std::vector<std::shared_ptr<graph::Graph>>;
public:
    ~Derivation();
    MOD_DECL friend std::ostream &operator<<(std::ostream &s, const Derivation &d);
public:
    GraphList left;
    std::shared_ptr<rule::Rule> r;
    GraphList right;
public:
    operator Derivations() const;
};

2.2.3.1.2. Details

using GraphList = std::vector<std::shared_ptr<graph::Graph>>

Representation of a multiset of graphs.

GraphList left

Represents the multi-set of left graphs \(G\).

std::shared_ptr<rule::Rule> r

Represents the transformation rule \(p\), or no rule at all.

GraphList right

Represents the multi-set of right graphs \(H\).

operator Derivations() const
Returns

the Derivations object equivalent to this object.

2.2.3.2. Class Derivations

class Derivations

This class is a simple wrapper for passing data around. It contains two multisets of graphs \(G\) and \(H\), and (possibly empty) set of rules. An object may thus implicitly store a set of direct derivations \(G\Rightarrow^p H\) for each rule \(p\), though the validity of the data is not checked.

2.2.3.2.1. Synopsis

struct MOD_DECL Derivations {
    using GraphList = std::vector<std::shared_ptr<graph::Graph>>;
public:
    ~Derivations();
    MOD_DECL friend std::ostream &operator<<(std::ostream &s, const Derivations &d);
public:
    GraphList left;
    std::vector<std::shared_ptr<rule::Rule>> rules;
    GraphList right;
};

2.2.3.2.2. Details

using GraphList = std::vector<std::shared_ptr<graph::Graph>>

Representation of a multiset of graphs.

GraphList left

Represents the multi-set of left graphs \(G\).

std::vector<std::shared_ptr<rule::Rule>> rules

Represents a (possibly empty) set of transformation rules.

GraphList right

Represents the multi-set of right graphs \(H\).