Path object holding a list of nodes and data types which trace a single path through the graph.
More...
Path object holding a list of nodes and data types which trace a single path through the graph.
Definition at line 540 of file trfGraph.py.
◆ __init__()
def python.trfGraph.graphPath.__init__ |
( |
|
self, |
|
|
|
endNodeName, |
|
|
|
data, |
|
|
|
cost = 0 |
|
) |
| |
graphPath constructor
- Parameters
-
endNodeName | The node name where this path will end |
data | The data type which this path will make |
cost | The starting cost of this path (default 0) |
Definition at line 546 of file trfGraph.py.
546 def __init__(self, endNodeName, data, cost = 0):
547 self._path = [endNodeName]
555 self._newData = dict()
556 self._extraData = dict()
◆ __str__()
def python.trfGraph.graphPath.__str__ |
( |
|
self | ) |
|
Definition at line 583 of file trfGraph.py.
584 return '{0}: path {1}; cost {2}, newData {3}, extraData {4}'.
format(self._data, self._path, self._cost, self._newData, self._extraData)
◆ addCost()
def python.trfGraph.graphPath.addCost |
( |
|
self, |
|
|
|
cost |
|
) |
| |
Definition at line 580 of file trfGraph.py.
580 def addCost(self, cost):
◆ addToPath()
def python.trfGraph.graphPath.addToPath |
( |
|
self, |
|
|
|
newNodeName, |
|
|
|
newData = set() , |
|
|
|
extraData = set() , |
|
|
|
extraCost = 0 |
|
) |
| |
Definition at line 574 of file trfGraph.py.
574 def addToPath(self, newNodeName, newData = set(), extraData =
set(), extraCost = 0):
575 self._path.insert(0, newNodeName)
576 self._newData[newNodeName] = newData
577 self._cost += extraCost
578 self._extraData[newNodeName] = extraData
◆ cost()
def python.trfGraph.graphPath.cost |
( |
|
self | ) |
|
◆ extraData()
def python.trfGraph.graphPath.extraData |
( |
|
self | ) |
|
Definition at line 571 of file trfGraph.py.
572 return self._extraData
◆ newData()
def python.trfGraph.graphPath.newData |
( |
|
self | ) |
|
◆ path()
def python.trfGraph.graphPath.path |
( |
|
self | ) |
|
◆ _cost
python.trfGraph.graphPath._cost |
|
private |
◆ _data
python.trfGraph.graphPath._data |
|
private |
◆ _extraData
python.trfGraph.graphPath._extraData |
|
private |
◆ _newData
python.trfGraph.graphPath._newData |
|
private |
- Note
- These are dictionaries, keyed by substep, with the data which needs to be produced in that substep, i.e., it is the output data for that step and the input data for the downstream step. To avoid data duplication the values are sets.
extraData
gives data which is not made in this path itself, but is needed in order to satisfy multi-data entry criteria. newData
is data which is produced along this path.
Definition at line 555 of file trfGraph.py.
◆ _path
python.trfGraph.graphPath._path |
|
private |
The documentation for this class was generated from the following file:
int cost(std::vector< std::string > &files, node &n, const std::string &directory="", bool deleteref=false, bool relocate=false)
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.