Skip to content
Snippets Groups Projects

Resolve "Operation Traversing"

Merged Jacob Wahlman requested to merge 11-operation-traversing into develop
All threads resolved!
2 files
+ 7
13
Compare changes
  • Side-by-side
  • Inline
Files
2
@@ -4,7 +4,7 @@ TODO: More info.
"""
from abc import abstractmethod
from typing import List, Dict, Optional, Any
from typing import List, Set, Dict, Optional, Any
from numbers import Number
from b_asic.port import InputPort, OutputPort
@@ -107,14 +107,8 @@ class AbstractOperation(Operation, AbstractGraphComponent):
return neighbours
def traverse(self) -> List[Operation]:
"""Traverse the the operation tree and return operation where type matches.
If the type is None then return the entire tree.
Keyword arguments:
type_ -- the operation type to search for (default None)
"""
def traverse(self) -> Set[Operation]:
"""Traverse the operation tree and return a generator with start point in the operation."""
return breadth_first_search(self)
# TODO: More stuff.
Loading