Package mrv :: Module dge
[hide private]
[frames] | no frames]

Module dge

source code

Contains a simple but yet powerful dependency graph engine allowing computations to be organized more efficiently.
Classes [hide private]
  _PlugShell
Handles per-node-instance plug connection setup and storage.
  Graph
Holds the nodes and their connections
  _NodeBaseCheckMeta
Class checking the consistency of the nodebase class before it is being created
  NodeBase
Base class that provides support for plugs to the superclass.
    Exceptions
  ConnectionError
Exception base for all plug related errors
  PlugIncompatible
Thrown whenever plugs are not compatible with each other during connection
  PlugAlreadyConnected
Thrown if one tries to connect a plug to otherplug when otherplug is already connected
  AccessError
Base class for all errors indicating invalid access
  NotWritableError
Thrown if a non-writable plug is being written to
  NotReadableError
Thrown if a non-readable attribute is being read
  MissingDefaultValueError
Thrown if a default value is missing for input attributes that are not connected
  ComputeError
Thrown if the computation done by a plug failed by an unknown exception It will be passed on in the exception
  ComputeFailed
Raised by the derived class computing a value if the computational goal cannot be achieved ( anymore )
  PlugUnhandled
Raised if a plug was not handled by the node's compute method
    END Plugs and Attributes
  Attribute
Simple class defining the type of a plug and several flags that affect it.
  iPlug
Defines an interface allowing to compare compatabilies according to types.
  plug
Defines an interface allowing to compare compatabilies according to types.
Functions [hide private]
    Iterators
 
iterShells(rootPlugShell, stopAt=<function <lambda> at 0x2f55410>, prune=<function <lambda> at 0x2f55488>, direction='up', visit_once=False, branch_first=False)
Iterator starting at rootPlugShell going "up"stream ( input ) or "down"stream ( output ) breadth first over plugs, applying filter functions as defined.
source code
Variables [hide private]
  __package__ = 'mrv'
Function Details [hide private]

iterShells(rootPlugShell, stopAt=<function <lambda> at 0x2f55410>, prune=<function <lambda> at 0x2f55488>, direction='up', visit_once=False, branch_first=False)

source code 
Iterator starting at rootPlugShell going "up"stream ( input ) or "down"stream ( output ) breadth first over plugs, applying filter functions as defined.
Parameters:
  • rootPlugShell - shell at which to start the traversal. The root plug will be returned as well
  • stopAt - if function returns true for given PlugShell, iteration will not proceed at that point ( possibly continuing at other spots ). Function will always be called, even if the shell would be pruned as well. The shell serving as stop marker will not be returned
  • prune - if function returns true for given PlugShell, the shell will not be returned but iteration continues.
  • direction - traversal direction "up" upstream, in direction of inputs of plugs "down" downstream, in direction of outputs of plugs
  • visit_once - if True, plugs will only be returned once, even though they are
  • branch_first - if True, individual branches will be travelled first ( thuse the node will be left quickly following the datastream ). If False, the plugs on the ndoe will be returned first before proceeding to the next node encountered several times as several noodes are connected to them in some way.