new Grammar(json, optsopt)
Represents a graph grammar.
Parameters:
| Name | Type | Attributes | Description | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
json | 
            
            Object | A description of the graph grammar, matching the JSON schema.  | 
        |||||||||||||||||
opts | 
            
            Object | 
                
                    <optional> | 
            
            
            Options Properties
  | 
        
Methods
canonicalJson() → {Object}
Returns the canonical JSON for a graph grammar.
Returns:
The JSON representation of the grammar.
- Type
 - Object
 
evolve(optsopt) → {EvolveReturnValue}
Evolve a graph using a graph grammar.
Parameters:
| Name | Type | Attributes | Description | ||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
opts | 
            
            Object | 
                
                    <optional> | 
            
            
            Options influencing the way the grammar is applied. Properties
  | 
        
Returns:
An object containing the results of the grammar application.
- Type
 - EvolveReturnValue
 
makeSchema() → {Object}
Get the JSON schema for a graph grammar.
Returns:
The JSON schema.
- Type
 - Object
 
toDot(graph) → {string}
Generate a GraphViz dot-format description of a graph.
Parameters:
| Name | Type | Description | 
|---|---|---|
graph | 
            
            Object | A graphlib graph.  | 
        
Returns:
The graph in GraphViz dot format.
- Type
 - string