lyra_graphtool

lyra_graphtool.configuration module

lyra_graphtool.edge module

class lyra_graphtool.edge.Edge(v1: Vertex, v2: Vertex)[source]

Bases: Generic[Edge]

in_graph() bool[source]

This determines if edge is allowed to travel in 1 timestep

Arguments:

None

Return:
bool

True - edge is allowed for travel in 1 timestep: add to graph False - cannot travel across edge in 1 timestep: do not add to graph

info(verbose=False) List[source]

Displays list of information about the object

Arguments:

verbose : bool, default False

Return:

list

nearest_neighbor() bool[source]

Defines “nearest neighbor”

Arguments:

None

Return:
bool

True if edge consists of “nearest neighbors”, False otherwise

lyra_graphtool.graph module

lyra_graphtool.parameters module

lyra_graphtool.utils module

lyra_graphtool.utils.bostr(arg)[source]
lyra_graphtool.utils.checkd3(type_list, arg_list, default, use_arg_default: bool = False)[source]
lyra_graphtool.utils.checkf(arg: float, default: int = -99.0, use_arg_default: bool = False)[source]
lyra_graphtool.utils.checki(arg: int, default: int = -99, use_arg_default: bool = False)[source]
lyra_graphtool.utils.checkp2(arg, default: Tuple, use_arg_default: bool = False)[source]
lyra_graphtool.utils.comma_separated_float_3(arg)[source]
lyra_graphtool.utils.comma_separated_int_2(arg)[source]
lyra_graphtool.utils.grstr(arg)[source]
lyra_graphtool.utils.nnfloat(arg)[source]
lyra_graphtool.utils.nnint(arg)[source]
lyra_graphtool.utils.ostr(arg)[source]
lyra_graphtool.utils.pint(arg)[source]
lyra_graphtool.utils.sstr(arg)[source]
lyra_graphtool.utils.vertices_array(vert_list: List) ndarray[source]

lyra_graphtool.vertex module

class lyra_graphtool.vertex.Vertex(x, y, v_type=Vertex_Type.BASIC, reward=0, mult_time=1, mult_time_active=(None, None), mult_worker=None, expiration_time=None, time_to_acquire=0)[source]

Bases: Generic[Vertex]

static accessible_types() List[source]
info(verbose=False) List[source]

Get information about vertex

Arguments:

verbose: bool, default=False

Return:

list, vertices information list

class lyra_graphtool.vertex.Vertex_Type(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)[source]

Bases: IntEnum

Used to define type of location.

Note: BASIC is a location in space, neither a SITE nor ORIGIN

BASIC = 0
ORIGIN = 1
OTHER = 5
OTHER2 = 6
SITE1 = 2
SITE2 = 3
SITE3 = 4

lyra_graphtool.worker module