Class Compo
from raimad.compo
class Compo
Compos: the building blocks of RAIMAD.
TODO explain
def __init__(self, *args: Any, **kwargs: Any) -> None:
"""
Initialize self. See help(type(self)) for accurate signature.
"""
def _make(self, *args: Any, **kwargs: Any) -> None:
"""
"""
def steamroll(self) -> 'rai.typing.Geoms':
"""
Steamroll the entire compo hierarchy into one Geoms dict.
TODO more informative
"""
def final(self) -> Self:
"""
Return self.
This method exists for uniformity with Proxy.final
"""
def depth(self) -> int:
"""
Return the number zero.
This method exists for uniformity with Proxy.depth
"""
def descend(self) -> Iterator[Self]:
"""
Yield self.
This method exists for uniformity with Proxy.descend
"""
def descend_p(self) -> 'Iterator[rai.typing.Proxy]':
"""
Yield nothing.
This method exists for uniformity with Proxy.descend_p
"""
def proxy(self) -> 'rai.typing.Proxy':
"""
Return new Proxy pointing to this Compo.
"""
def walk_hier(self) -> Iterator[ForwardRef('rai.typing.CompoLike')]:
"""
Traverse the subcomponent hierarchy of this compo.
This method will recursively walk through the entire
subcompo hierarchy of this compo, including self.
"""
def transform_point(self, point: 'rai.typing.PointLike') -> 'rai.typing.PointLike':
"""
Do nothing to `point` and return as-is.
This method exists for uniformity with Proxy.transform_point.
"""
def auto_subcompos(self, locs: dict[typing.Any, typing.Any] | None = None) -> None:
"""
Dirty hack for use in `_make` to quickly add all proxies as subcompos.
Simply call `self.auto_subcompos(locals())` at the
end of your `_make()` function, and all of the
proxies in the scope of `_make()` will be added as
subcompos.
If you do no provide `locals()`, this function
will instead use arcane `inspect` magic
to traverse the stack and extract them automatically.
...or, better yet, do not use this function and
add subcompos explicitly.
"""
def __str__(self) -> str:
"""
Return str(self).
"""
def __repr__(self) -> str:
"""
Get string representation of compo.
"""