Karana.KUtils.MultibodyTUI.graph#

Attributes#

T

Classes#

GraphAdapter

Common interface for various types of directed graphs

BodyGraphAdapter

Multibody wrapper implementing the GraphAdapater interface

FrameGraphAdapter

FrameContainer wrapper implementing the GraphAdapater interface

Module Contents#

Karana.KUtils.MultibodyTUI.graph.T#
class Karana.KUtils.MultibodyTUI.graph.GraphAdapter[source]#

Bases: abc.ABC, Generic[T]

Common interface for various types of directed graphs

The purpose of this class is to define a common interface for wrapper classes that adapt different graphs, each with their own interface, to a single common interface.

abstract parents(node: T, /) list[T][source]#

Get the list of parents for a given node

abstract children(node: T, /) list[T][source]#

Get the list of children for a given node

abstract nodes() list[T][source]#

Get the list of all nodes in the graph

descendants(node: T, /) list[T][source]#

Get the list of all descendants for a given node

ancestors(node: T, /) list[T][source]#

Get the list of all ancestors for a given node

class Karana.KUtils.MultibodyTUI.graph.BodyGraphAdapter(multibody: Karana.Dynamics.Multibody)[source]#

Bases: GraphAdapter[Karana.Dynamics.PhysicalBody]

Multibody wrapper implementing the GraphAdapater interface

multibody#
parents(body: Karana.Dynamics.PhysicalBody) list[Karana.Dynamics.PhysicalBody][source]#
children(body: Karana.Dynamics.PhysicalBody) list[Karana.Dynamics.PhysicalBody][source]#
nodes() list[Karana.Dynamics.PhysicalBody][source]#
class Karana.KUtils.MultibodyTUI.graph.FrameGraphAdapter(frame_container: Karana.Frame.FrameContainer)[source]#

Bases: GraphAdapter[Karana.Frame.Frame]

FrameContainer wrapper implementing the GraphAdapater interface

frame_container#
parents(frame: Karana.Frame.Frame) list[Karana.Frame.Frame][source]#
children(frame: Karana.Frame.Frame) list[Karana.Frame.Frame][source]#
nodes() list[Karana.Frame.Frame][source]#