Initialise a graph node from an executor.
More...
|
def | _flattenSet (self, startSet) |
| Take a list and return all simple members plus the members of any list/tuples in the set (i.e., flatten out multiple input tuples) More...
|
|
Initialise a graph node from an executor.
Definition at line 530 of file trfGraph.py.
◆ __init__()
def python.trfGraph.executorNode.__init__ |
( |
|
self, |
|
|
|
executor = None , |
|
|
|
weight = None |
|
) |
| |
executorNode constructor
- Note
- This is just a wrapper to call the parent class's constructor with the extracted input and output data types
- Parameters
-
executor | Executor used to make this node |
weight | Weight specifier |
Definition at line 536 of file trfGraph.py.
536 def __init__(self, executor = None, weight = None):
537 super(executorNode, self).
__init__(executor.name, executor.inData, executor.outData, weight)
◆ __repr__()
def python.trfGraph.graphNode.__repr__ |
( |
|
self | ) |
|
|
inherited |
Definition at line 525 of file trfGraph.py.
526 return '{0} (dataIn {1}, weights {2}; dataOut {3}; connect {4})'.
format(self._name, self._inData, self._inWeights, self._outData, self._connections)
◆ __str__()
def python.trfGraph.graphNode.__str__ |
( |
|
self | ) |
|
|
inherited |
Definition at line 522 of file trfGraph.py.
523 return '{0} (dataIn {1} -> dataOut {2})'.
format(self._name, self._inData, self._outData)
◆ _flattenSet()
def python.trfGraph.graphNode._flattenSet |
( |
|
self, |
|
|
|
startSet |
|
) |
| |
|
privateinherited |
Take a list and return all simple members plus the members of any list/tuples in the set (i.e., flatten out multiple input tuples)
Definition at line 513 of file trfGraph.py.
513 def _flattenSet(self, startSet):
515 for data
in startSet:
516 if isinstance(data, (list, tuple)):
517 flatData.update(data)
519 flatData.update([data])
◆ addConnection()
def python.trfGraph.graphNode.addConnection |
( |
|
self, |
|
|
|
toExe, |
|
|
|
data, |
|
|
|
direction = 'out' |
|
) |
| |
|
inherited |
Add a new edge connection for this node.
- Parameters
-
Definition at line 498 of file trfGraph.py.
499 self._connections[direction][toExe] =
set(data)
◆ connections()
def python.trfGraph.graphNode.connections |
( |
|
self | ) |
|
|
inherited |
Definition at line 487 of file trfGraph.py.
487 def connections(self):
488 return self._connections
◆ delConnection()
def python.trfGraph.graphNode.delConnection |
( |
|
self, |
|
|
|
toExe, |
|
|
|
direction = 'out' |
|
) |
| |
|
inherited |
Delete a connection from this node.
- Parameters
-
Definition at line 504 of file trfGraph.py.
504 def delConnection(self, toExe, direction = 'out'):
505 del self._connections[direction][toExe]
◆ inData()
def python.trfGraph.graphNode.inData |
( |
|
self | ) |
|
|
inherited |
◆ inputDataTypes()
def python.trfGraph.graphNode.inputDataTypes |
( |
|
self | ) |
|
|
inherited |
Definition at line 479 of file trfGraph.py.
479 def inputDataTypes(self):
480 return self._flattenSet(self.inData)
◆ name()
def python.trfGraph.graphNode.name |
( |
|
self | ) |
|
|
inherited |
◆ outData()
def python.trfGraph.graphNode.outData |
( |
|
self | ) |
|
|
inherited |
◆ outputDataTypes()
def python.trfGraph.graphNode.outputDataTypes |
( |
|
self | ) |
|
|
inherited |
Definition at line 483 of file trfGraph.py.
483 def outputDataTypes(self):
484 return self._flattenSet(self._outData)
◆ resetConnections()
def python.trfGraph.graphNode.resetConnections |
( |
|
self | ) |
|
|
inherited |
Delete all connections.
Definition at line 508 of file trfGraph.py.
508 def resetConnections(self):
509 self._connections = {
'in': {},
'out': {}}
◆ weights()
def python.trfGraph.graphNode.weights |
( |
|
self | ) |
|
|
inherited |
Definition at line 491 of file trfGraph.py.
492 return self._inWeights
◆ _connections
python.trfGraph.graphNode._connections |
|
privateinherited |
◆ _inData
python.trfGraph.graphNode._inData |
|
privateinherited |
◆ _inputDataTypes
python.trfGraph.graphNode._inputDataTypes |
|
privateinherited |
◆ _inWeights
python.trfGraph.graphNode._inWeights |
|
privateinherited |
- Note
_inWeights
takes the form of a dictionary, keyed by input data type and giving the relative cost of executing this node with those input data types.
Definition at line 446 of file trfGraph.py.
◆ _name
python.trfGraph.graphNode._name |
|
privateinherited |
◆ _outData
python.trfGraph.graphNode._outData |
|
privateinherited |
◆ _outputDataTypes
python.trfGraph.graphNode._outputDataTypes |
|
privateinherited |
The documentation for this class was generated from the following file:
constexpr std::enable_if_t< is_bitmask_v< E >, E & > set(E &lhs, E rhs)
Convenience function to set bits in a class enum bitmask.