Graph-Grammar

 view release on metacpan or  search on metacpan

lib/Graph/Grammar.pm  view on Meta::CPAN

When used before a neighbour condition, places a condition on edge connecting the center vertex with a neighbour matched by the following rule.
Accepts a block or sub {}, i.e.:

    EDGE { $_[0]->get_edge_attribute( $_[1], $_[2], 'color' ) eq 'red' }

Subroutine is evaluated with three parameters: graph, center vertex and its neighbour matching the following neighbour condition.
Subroutine should evaluate to true if condition is fulfilled.

=cut

sub EDGE(&) { Graph::Grammar::Rule::Edge->new( $_[0] ) }

=head2 C<NO_MORE_VERTICES>

When used before the rule action in a rule, restricts the number of center vertex neighbours to vertex conditions.

=cut

sub NO_MORE_VERTICES { Graph::Grammar::Rule::NoMoreVertices->new }

=head1 AUTHORS



( run in 0.393 second using v1.01-cache-2.11-cpan-49f99fa48dc )