Wolfram Function Repository
Instant-use add-on functions for the Wolfram Language
Function Repository Resource:
Determine whether a Wolfram model rule is left-connected
ResourceFunction["ConnectedWolframModelQ"][rule] yields True if the left-hand side of the rule is connected, and the right-hand side is connected to the left-hand side. | |
An example of a connected rule:
| In[1]:= |
|
| Out[1]= |
|
An example of a disconnected rule:
| In[2]:= |
|
| Out[2]= |
|
Multiple rules are supported:
| In[3]:= |
|
| Out[3]= |
|
| In[4]:= |
|
| Out[4]= |
|
Unary edges are supported:
| In[5]:= |
|
| Out[5]= |
|
| In[6]:= |
|
| Out[6]= |
|
| In[7]:= |
|
| Out[7]= |
|
By default, the right-hand side is allowed to be disconnected:
| In[8]:= |
|
| Out[8]= |
|
Left- and right- hand sides should be connected to each other:
| In[9]:= |
|
| Out[9]= |
|
While the right-hand side can be disconnected, each piece must be connected to the left-hand side:
| In[10]:= |
|
| Out[10]= |
|
One can also require the right-hand side to be connected separately:
| In[11]:= |
|
| Out[11]= |
|
This work is licensed under a Creative Commons Attribution 4.0 International License