Chain of nodes.
This class allows to concatenate a list of nodes into a processing chain. When called with a dataset, it is sequentially fed through a nodes in the chain. A ChainNode may also be used as a generator. In this case, all nodes in the chain are treated as generators too, and the ChainNode behaves as a single big generator that recursively calls all embedded generators and yield the results.
A ChainNode behaves similar to a list container: Nodes can be appended, and the chain can be sliced like a list, etc ...
Notes
Available conditional attributes:
(Conditional attributes enabled by default suffixed with +)
Methods
append(node) | Append a node to the chain. | ||
generate(ds[, startnode]) |
|
||
get_postproc() | Returns the post-processing node or None. | ||
get_space() | Query the processing space name of this node. | ||
reset() | |||
set_postproc(node) | Assigns a post-processing node | ||
set_space(name) | Set the processing space name of this node. |
Parameters : | nodes: list :
enable_ca : None or list of str
disable_ca : None or list of str
space: str, optional :
postproc : Node instance, optional
descr : str
|
---|
Methods
append(node) | Append a node to the chain. | ||
generate(ds[, startnode]) |
|
||
get_postproc() | Returns the post-processing node or None. | ||
get_space() | Query the processing space name of this node. | ||
reset() | |||
set_postproc(node) | Assigns a post-processing node | ||
set_space(name) | Set the processing space name of this node. |
Append a node to the chain.
Parameters : | ds: Dataset :
startnode: int :
|
---|