All docs
lsdtools.ecs reference
Generated public SDK reference for lsdtools.ecs.
SDK distribution 1.0.0; API contract 1.0; generator 1.0.0.
Product source digest: 170db6f659e9f79609ddaaec494ffad41f1d659a96001371132843e0c17a7e27.
Generated from declared public exports and source syntax. Signatures and annotations are declaration spellings; decorators, factories and annotations are never executed. Class members below are declared members; base classes remain explicit. Source docstrings describe their owning implementation; they do not grant app permissions.
Lazy public runtime-engine surface; importing this facade loads no DLL.
The runtime engine (``lsd-ecs``) is the native entity-component store every simulation
participant executes on. A package reaches it here -- never ``import lsd_ecs`` -- to declare
components, hold a world of its own, or read the engine's capabilities as data.
lsdtools.ecs.ColumnView#
Kind: class. Source: core/ecs/src/lsd_ecs/world.py:154.
Source docstring:
A numpy view over one page of a component: ``array[row]`` is the entity with index
``first + row``. Zero-copy; ``check`` refuses the view after a staged commit replaced the
page.
Implementation alias: lsd_ecs.world.ColumnView.
lsdtools.ecs.ColumnView.component#
Kind: attribute. Source: core/ecs/src/lsd_ecs/world.py:159.
component: Component
lsdtools.ecs.ColumnView.array#
Kind: attribute. Source: core/ecs/src/lsd_ecs/world.py:160.
array: np.ndarray
lsdtools.ecs.ColumnView.stage#
Kind: attribute. Source: core/ecs/src/lsd_ecs/world.py:161.
stage: np.ndarray | None
lsdtools.ecs.ColumnView.first#
Kind: attribute. Source: core/ecs/src/lsd_ecs/world.py:162.
first: int
lsdtools.ecs.ColumnView.rows#
Kind: attribute. Source: core/ecs/src/lsd_ecs/world.py:163.
rows: int
lsdtools.ecs.ColumnView.count#
Kind: attribute. Source: core/ecs/src/lsd_ecs/world.py:164.
count: int
lsdtools.ecs.ColumnView.pages#
Kind: attribute. Source: core/ecs/src/lsd_ecs/world.py:165.
pages: int
lsdtools.ecs.ColumnView.layout_epoch#
Kind: attribute. Source: core/ecs/src/lsd_ecs/world.py:166.
layout_epoch: int
lsdtools.ecs.ColumnView.check#
Kind: method. Source: core/ecs/src/lsd_ecs/world.py:169.
check(self) -> ColumnView
self: (unannotated)
lsdtools.ecs.Component#
Kind: class. Source: core/ecs/src/lsd_ecs/components.py:29.
Source docstring:
A component: ``dtype`` scalars, ``shape`` ``()`` for one per row or ``(k,)`` for a vector.
A ``bytes`` component is an opaque fixed-size struct: ``shape`` is ``(size,)`` and ``align`` its
alignment (a power of two up to 64). ``staged`` keeps a second page the writer fills and commits
(``World.commit``); ``reserve`` allocates the pages for that many entity indices up front.
Implementation alias: lsd_ecs.components.Component.
lsdtools.ecs.Component.name#
Kind: attribute. Source: core/ecs/src/lsd_ecs/components.py:37.
name: str
lsdtools.ecs.Component.dtype#
Kind: attribute. Source: core/ecs/src/lsd_ecs/components.py:38.
dtype: str
dtype = 'float64'
lsdtools.ecs.Component.shape#
Kind: attribute. Source: core/ecs/src/lsd_ecs/components.py:39.
shape: tuple[int, ...]
shape = ()
lsdtools.ecs.Component.staged#
Kind: attribute. Source: core/ecs/src/lsd_ecs/components.py:40.
staged: bool
staged = False
lsdtools.ecs.Component.align#
Kind: attribute. Source: core/ecs/src/lsd_ecs/components.py:41.
align: int
align = 0
lsdtools.ecs.Component.reserve#
Kind: attribute. Source: core/ecs/src/lsd_ecs/components.py:42.
reserve: int
reserve = 0
lsdtools.ecs.Component.width#
Kind: method. Source: core/ecs/src/lsd_ecs/components.py:74.
width(self) -> int
self: (unannotated)
Source docstring:
Scalars per row (bytes per row for a bytes component).
lsdtools.ecs.Component.itemsize#
Kind: method. Source: core/ecs/src/lsd_ecs/components.py:79.
itemsize(self) -> int
self: (unannotated)
lsdtools.ecs.Component.stride#
Kind: method. Source: core/ecs/src/lsd_ecs/components.py:83.
stride(self) -> int
self: (unannotated)
lsdtools.ecs.Component.numpy_dtype#
Kind: method. Source: core/ecs/src/lsd_ecs/components.py:88.
numpy_dtype(self) -> np.dtype
self: (unannotated)
Source docstring:
The dtype of one row: the scalar dtype, or ``V<stride>`` for a bytes component.
lsdtools.ecs.EcsError#
Kind: class. Source: core/ecs/src/lsd_ecs/errors.py:14.
Source docstring:
Something about a world, a component, a query or a system was refused.
Implementation alias: lsd_ecs.errors.EcsError.
Declared bases: RuntimeError.
lsdtools.ecs.EcsStatusError#
Kind: class. Source: core/ecs/src/lsd_ecs/errors.py:22.
EcsStatusError(self, status: int, label: str, export: str) -> None
Source docstring:
A native export answered a status other than ``ok``.
Implementation alias: lsd_ecs.errors.EcsStatusError.
Declared bases: EcsError.
lsdtools.ecs.EcsStatusError.__init__#
Kind: method. Source: core/ecs/src/lsd_ecs/errors.py:25.
__init__(self, status: int, label: str, export: str) -> None
export: str
label: str
self: (unannotated)
status: int
lsdtools.ecs.EcsStatusError.status#
Kind: attribute. Source: core/ecs/src/lsd_ecs/errors.py:27.
status: (unannotated)
status = int(status)
lsdtools.ecs.EcsStatusError.label#
Kind: attribute. Source: core/ecs/src/lsd_ecs/errors.py:28.
label: (unannotated)
label = str(label)
lsdtools.ecs.EcsStatusError.export#
Kind: attribute. Source: core/ecs/src/lsd_ecs/errors.py:29.
export: (unannotated)
export = str(export)
lsdtools.ecs.NONE#
Kind: value. Source: core/ecs/src/lsd_ecs/_abi.py:47.
NONE = 4294967295
Implementation alias: lsd_ecs._abi.NONE.
lsdtools.ecs.NUMERIC_DTYPES#
Kind: value. Source: core/ecs/src/lsd_ecs/components.py:14.
NUMERIC_DTYPES: tuple[str, ...]
NUMERIC_DTYPES = ('float64', 'float32', 'int64', 'int32', 'int16', 'int8', 'uint64', 'uint32', 'uint16', 'uint8')
Implementation alias: lsd_ecs.components.NUMERIC_DTYPES.
lsdtools.ecs.NativeUnavailableError#
Kind: class. Source: core/ecs/src/lsd_ecs/errors.py:18.
Source docstring:
The native engine is not admitted in this process; ``engine_refusal()`` says why.
Implementation alias: lsd_ecs.errors.NativeUnavailableError.
Declared bases: EcsError.
lsdtools.ecs.PhysicsBridge#
Kind: class. Source: core/ecs/src/lsd_ecs/_abi.py:199.
Source docstring:
``lsd_ecs_physics_bridge_v1``: what the physics lane binds (pointers stay the caller's).
Implementation alias: lsd_ecs._abi.PhysicsBridge.
Declared bases: C.Structure.
lsdtools.ecs.Query#
Kind: class. Source: core/ecs/src/lsd_ecs/world.py:94.
Source docstring:
A cached set of matching entities.
Implementation alias: lsd_ecs.world.Query.
lsdtools.ecs.Query.world#
Kind: attribute. Source: core/ecs/src/lsd_ecs/world.py:97.
world: World
lsdtools.ecs.Query.id#
Kind: attribute. Source: core/ecs/src/lsd_ecs/world.py:98.
id: int
lsdtools.ecs.Query.require#
Kind: attribute. Source: core/ecs/src/lsd_ecs/world.py:99.
require: tuple[str, ...]
lsdtools.ecs.Query.exclude#
Kind: attribute. Source: core/ecs/src/lsd_ecs/world.py:100.
exclude: tuple[str, ...]
lsdtools.ecs.Query.entities#
Kind: method. Source: core/ecs/src/lsd_ecs/world.py:102.
entities(self) -> np.ndarray
self: (unannotated)
Source docstring:
The matched handles right now (a copy; the query's order until ``sort``).
lsdtools.ecs.Query.sort#
Kind: method. Source: core/ecs/src/lsd_ecs/world.py:109.
sort(self) -> None
self: (unannotated)
lsdtools.ecs.Query.range#
Kind: method. Source: core/ecs/src/lsd_ecs/world.py:112.
range(self) -> tuple[int, int] | None
self: (unannotated)
Source docstring:
``(first, count)`` when the matches are one run of entity indices (``first + k`` is the
k-th match; a system may then walk the pages' rows directly), else ``None``. Joins keep a
run only at its tail and leaves only of its tail; ``sort`` makes contiguous indices a
run.
lsdtools.ecs.StaleEntityError#
Kind: class. Source: core/ecs/src/lsd_ecs/errors.py:32.
Source docstring:
An entity handle names a generation the world destroyed.
Implementation alias: lsd_ecs.errors.StaleEntityError.
Declared bases: EcsError, KeyError.
lsdtools.ecs.StaleLeaseError#
Kind: class. Source: core/ecs/src/lsd_ecs/errors.py:36.
Source docstring:
A column view was used after the pool's layout changed under it.
Implementation alias: lsd_ecs.errors.StaleLeaseError.
Declared bases: EcsError.
lsdtools.ecs.StepInfo#
Kind: class. Source: core/ecs/src/lsd_ecs/world.py:82.
Source docstring:
What a system receives about the step it runs in.
Implementation alias: lsd_ecs.world.StepInfo.
lsdtools.ecs.StepInfo.dt#
Kind: attribute. Source: core/ecs/src/lsd_ecs/world.py:85.
dt: float
lsdtools.ecs.StepInfo.time_us#
Kind: attribute. Source: core/ecs/src/lsd_ecs/world.py:86.
time_us: int
lsdtools.ecs.StepInfo.tick#
Kind: attribute. Source: core/ecs/src/lsd_ecs/world.py:87.
tick: int
lsdtools.ecs.StepInfo.substeps#
Kind: attribute. Source: core/ecs/src/lsd_ecs/world.py:88.
substeps: int
lsdtools.ecs.StepInfo.phase#
Kind: attribute. Source: core/ecs/src/lsd_ecs/world.py:89.
phase: str
lsdtools.ecs.StepInfo.system#
Kind: attribute. Source: core/ecs/src/lsd_ecs/world.py:90.
system: int
lsdtools.ecs.System#
Kind: class. Source: core/ecs/src/lsd_ecs/world.py:134.
Implementation alias: lsd_ecs.world.System.
lsdtools.ecs.System.world#
Kind: attribute. Source: core/ecs/src/lsd_ecs/world.py:135.
world: World
lsdtools.ecs.System.id#
Kind: attribute. Source: core/ecs/src/lsd_ecs/world.py:136.
id: int
lsdtools.ecs.System.name#
Kind: attribute. Source: core/ecs/src/lsd_ecs/world.py:137.
name: str
lsdtools.ecs.System.query#
Kind: attribute. Source: core/ecs/src/lsd_ecs/world.py:138.
query: Query | None
lsdtools.ecs.System.phase#
Kind: attribute. Source: core/ecs/src/lsd_ecs/world.py:139.
phase: str
lsdtools.ecs.System.enable#
Kind: method. Source: core/ecs/src/lsd_ecs/world.py:141.
enable(self, enabled: bool=True) -> None
enabled: bool
self: (unannotated)
lsdtools.ecs.System.run#
Kind: method. Source: core/ecs/src/lsd_ecs/world.py:146.
run(self, dt: float=0.0, *, substeps: int=1, time_us: int=0) -> None
dt: float
self: (unannotated)
substeps: int
time_us: int
lsdtools.ecs.System.profile#
Kind: method. Source: core/ecs/src/lsd_ecs/world.py:149.
profile(self) -> dict[str, int]
self: (unannotated)
lsdtools.ecs.World#
Kind: class. Source: core/ecs/src/lsd_ecs/world.py:184.
World(self, *, max_components: int=64, entities: int=1024, page_rows: int=0, profile: bool=False, single_page: bool=False) -> None
Source docstring:
One native runtime store.
Implementation alias: lsd_ecs.world.World.
lsdtools.ecs.World.__init__#
Kind: method. Source: core/ecs/src/lsd_ecs/world.py:187.
__init__(self, *, max_components: int=64, entities: int=1024, page_rows: int=0, profile: bool=False, single_page: bool=False) -> None
entities: int
max_components: int
page_rows: int
profile: bool
self: (unannotated)
single_page: bool
Source docstring:
``single_page`` makes every component one page of exactly ``entities`` rows (any count):
each column is one contiguous array whose row is the entity index, and the world holds at
most ``entities`` entities (the Trip's row layout).
lsdtools.ecs.World.close#
Kind: method. Source: core/ecs/src/lsd_ecs/world.py:224.
close(self) -> None
self: (unannotated)
lsdtools.ecs.World.__enter__#
Kind: method. Source: core/ecs/src/lsd_ecs/world.py:229.
__enter__(self) -> World
self: (unannotated)
lsdtools.ecs.World.__exit__#
Kind: method. Source: core/ecs/src/lsd_ecs/world.py:232.
__exit__(self, *exc) -> None
exc: (unannotated)
self: (unannotated)
lsdtools.ecs.World.closed#
Kind: method. Source: core/ecs/src/lsd_ecs/world.py:240.
closed(self) -> bool
self: (unannotated)
lsdtools.ecs.World.page_rows#
Kind: method. Source: core/ecs/src/lsd_ecs/world.py:244.
page_rows(self) -> int
self: (unannotated)
lsdtools.ecs.World.single_page#
Kind: method. Source: core/ecs/src/lsd_ecs/world.py:248.
single_page(self) -> bool
self: (unannotated)
lsdtools.ecs.World.define#
Kind: method. Source: core/ecs/src/lsd_ecs/world.py:257.
define(self, component: Component | str, *, dtype: str='float64', shape: tuple[int, ...]=(), staged: bool=False, align: int=0, reserve: int=0) -> Component
align: int
component: Component | str
dtype: str
reserve: int
self: (unannotated)
shape: tuple[int, ...]
staged: bool
Source docstring:
Define a component (a ``Component`` or a name plus its shape); returns the
declaration.
lsdtools.ecs.World.components#
Kind: method. Source: core/ecs/src/lsd_ecs/world.py:289.
components(self) -> tuple[Component, ...]
self: (unannotated)
lsdtools.ecs.World.component_id#
Kind: method. Source: core/ecs/src/lsd_ecs/world.py:292.
component_id(self, name: str) -> int
name: str
self: (unannotated)
lsdtools.ecs.World.defined#
Kind: method. Source: core/ecs/src/lsd_ecs/world.py:298.
defined(self, name: str) -> bool
name: str
self: (unannotated)
lsdtools.ecs.World.reserve#
Kind: method. Source: core/ecs/src/lsd_ecs/world.py:301.
reserve(self, name: str, rows: int) -> None
name: str
rows: int
self: (unannotated)
Source docstring:
Allocate the pages for entity indices below ``rows`` now, so later adds allocate
nothing.
lsdtools.ecs.World.create#
Kind: method. Source: core/ecs/src/lsd_ecs/world.py:310.
create(self, count: int | None=None) -> int | np.ndarray
count: int | None
self: (unannotated)
Source docstring:
Create ``count`` entities (a ``uint64`` array), or one (an ``int``) when ``count`` is
None.
lsdtools.ecs.World.destroy#
Kind: method. Source: core/ecs/src/lsd_ecs/world.py:325.
destroy(self, entities: EntityLike) -> None
entities: EntityLike
self: (unannotated)
lsdtools.ecs.World.alive#
Kind: method. Source: core/ecs/src/lsd_ecs/world.py:341.
alive(self, entity: int) -> bool
entity: int
self: (unannotated)
lsdtools.ecs.World.add#
Kind: method. Source: core/ecs/src/lsd_ecs/world.py:346.
add(self, name: str, entities: EntityLike, values: np.ndarray | None=None) -> None
entities: EntityLike
name: str
self: (unannotated)
values: np.ndarray | None
Source docstring:
Give the component to the entities, zeroed or from ``values`` (one row per entity).
lsdtools.ecs.World.remove#
Kind: method. Source: core/ecs/src/lsd_ecs/world.py:373.
remove(self, name: str, entities: EntityLike) -> None
entities: EntityLike
name: str
self: (unannotated)
lsdtools.ecs.World.has#
Kind: method. Source: core/ecs/src/lsd_ecs/world.py:385.
has(self, name: str, entity: int) -> bool
entity: int
name: str
self: (unannotated)
lsdtools.ecs.World.set#
Kind: method. Source: core/ecs/src/lsd_ecs/world.py:392.
set(self, name: str, entity: int, value) -> None
entity: int
name: str
self: (unannotated)
value: (unannotated)
Source docstring:
Write one row (adding the component when the entity lacks it).
lsdtools.ecs.World.get#
Kind: method. Source: core/ecs/src/lsd_ecs/world.py:406.
get(self, name: str, entity: int)
entity: int
name: str
self: (unannotated)
Source docstring:
One row as a numpy scalar (shape ``()``) or vector (a copy); ``None`` when absent.
lsdtools.ecs.World.column#
Kind: method. Source: core/ecs/src/lsd_ecs/world.py:455.
column(self, name: str, page: int=0) -> ColumnView
name: str
page: int
self: (unannotated)
Source docstring:
A zero-copy numpy view over one page of the component (``rows`` rows from entity index
``first``); rows of entities without the component hold unspecified bytes. The page is
allocated when it does not exist yet.
lsdtools.ecs.World.commit#
Kind: method. Source: core/ecs/src/lsd_ecs/world.py:492.
commit(self, name: str) -> None
name: str
self: (unannotated)
Source docstring:
Swap the staged pages of a staged component in.
lsdtools.ecs.World.bind#
Kind: method. Source: core/ecs/src/lsd_ecs/world.py:496.
bind(self, name: str, array: np.ndarray, *, page: int=0, mark: bool=True) -> np.ndarray
array: np.ndarray
mark: bool
name: str
page: int
self: (unannotated)
Source docstring:
Make ``array`` the page: the world reads and writes its memory as the component's rows
(``array[row]`` is the entity with index ``first + row``) and never frees it; the world
keeps a reference so the memory outlives every use. ``array`` must be C-contiguous, of the
component's dtype and ``(page_rows, *shape)``; ``mark`` adds the component to the page's
live entities without writing a byte (a read-only array binds as well: the world writes it
only through a system or ``set``). Binding the memory that already is the page moves
nothing (the page's lease epoch holds) and marks again.
lsdtools.ecs.World.bound#
Kind: method. Source: core/ecs/src/lsd_ecs/world.py:534.
bound(self, name: str, page: int=0) -> np.ndarray | None
name: str
page: int
self: (unannotated)
Source docstring:
The array bound as the page, or ``None`` when the world allocated the page itself.
lsdtools.ecs.World.records#
Kind: method. Source: core/ecs/src/lsd_ecs/world.py:538.
records(self) -> np.ndarray
self: (unannotated)
Source docstring:
The entity table as a read-only ``(entities, record)`` uint64 view: the mask words, then
the generation word (bit 31 set while free), then padding to the record's power of two.
Valid until the next entity creation.
lsdtools.ecs.World.rows#
Kind: method. Source: core/ecs/src/lsd_ecs/world.py:561.
rows(self, name: str) -> np.ndarray
name: str
self: (unannotated)
Source docstring:
The entity indices holding the component, ascending (a copy).
lsdtools.ecs.World.handles#
Kind: method. Source: core/ecs/src/lsd_ecs/world.py:572.
handles(self, indices: np.ndarray) -> np.ndarray
indices: np.ndarray
self: (unannotated)
Source docstring:
The current handles of entity indices (from the generation table).
lsdtools.ecs.World.query#
Kind: method. Source: core/ecs/src/lsd_ecs/world.py:581.
query(self, require: Iterable[str]=(), exclude: Iterable[str]=()) -> Query
exclude: Iterable[str]
require: Iterable[str]
self: (unannotated)
lsdtools.ecs.World.system#
Kind: method. Source: core/ecs/src/lsd_ecs/world.py:615.
system(self, fn: SystemFn, query: Query, phase: str='step', name: str | None=None) -> System
fn: SystemFn
name: str | None
phase: str
query: Query
self: (unannotated)
Source docstring:
Bind ``fn(world, entities, step)`` to the query in one phase; ``entities`` is a view of
the
query's matches valid during the call only.
lsdtools.ecs.World.systems#
Kind: method. Source: core/ecs/src/lsd_ecs/world.py:668.
systems(self) -> tuple[System, ...]
self: (unannotated)
lsdtools.ecs.World.bind_physics#
Kind: method. Source: core/ecs/src/lsd_ecs/world.py:671.
bind_physics(self, name: str, bridge: PhysicsBridge) -> System
bridge: PhysicsBridge
name: str
self: (unannotated)
Source docstring:
Bind the physics lane as a native ``step`` system: it steps the physics world once per
fixed step through the bound ``lsd_physics_world_step_scatter_v1`` and scatters the poses
into the scene's transform components. Every pointer in ``bridge`` stays the caller's and
must outlive the world.
lsdtools.ecs.World.rebind_physics#
Kind: method. Source: core/ecs/src/lsd_ecs/world.py:688.
rebind_physics(self, system: System, bridge: PhysicsBridge) -> None
bridge: PhysicsBridge
self: (unannotated)
system: System
Source docstring:
Point a bound lane at other columns (the same physics world and row count): the body
columns moved, as a swap-in commit of a Trip value moves them.
lsdtools.ecs.World.unbind_physics#
Kind: method. Source: core/ecs/src/lsd_ecs/world.py:693.
unbind_physics(self, system: System) -> None
self: (unannotated)
system: System
Source docstring:
Release a lane before its physics world or its columns go away: the system never runs
again and ``physics_status`` refuses it.
lsdtools.ecs.World.physics_status#
Kind: method. Source: core/ecs/src/lsd_ecs/world.py:698.
physics_status(self, system: System) -> tuple[int, int, int]
self: (unannotated)
system: System
Source docstring:
The bridge's last step: (physics status, frames done, steps so far).
lsdtools.ecs.World.step#
Kind: method. Source: core/ecs/src/lsd_ecs/world.py:722.
step(self, steps: int=1, dt: float=1.0 / 60.0, *, substeps: int=1, time_us: int=0) -> None
dt: float
self: (unannotated)
steps: int
substeps: int
time_us: int
Source docstring:
Run ``steps`` fixed steps: the before, step and after systems, in definition order. An
exception a Python system raised is re-raised here, after the engine call returned.
lsdtools.ecs.World.run_phase#
Kind: method. Source: core/ecs/src/lsd_ecs/world.py:733.
run_phase(self, phase: str, dt: float=0.0, *, substeps: int=1, time_us: int=0) -> None
dt: float
phase: str
self: (unannotated)
substeps: int
time_us: int
lsdtools.ecs.World.run#
Kind: method. Source: core/ecs/src/lsd_ecs/world.py:741.
run(self, system: System, dt: float=0.0, *, substeps: int=1, time_us: int=0) -> None
dt: float
self: (unannotated)
substeps: int
system: System
time_us: int
lsdtools.ecs.World.hash#
Kind: method. Source: core/ecs/src/lsd_ecs/world.py:749.
hash(self) -> int
self: (unannotated)
lsdtools.ecs.World.capture#
Kind: method. Source: core/ecs/src/lsd_ecs/world.py:754.
capture(self) -> bytes
self: (unannotated)
lsdtools.ecs.World.restore#
Kind: method. Source: core/ecs/src/lsd_ecs/world.py:767.
restore(self, capture: bytes) -> None
capture: bytes
self: (unannotated)
lsdtools.ecs.World.counters#
Kind: method. Source: core/ecs/src/lsd_ecs/world.py:774.
counters(self) -> dict[str, int]
self: (unannotated)
lsdtools.ecs.World.set_profiling#
Kind: method. Source: core/ecs/src/lsd_ecs/world.py:779.
set_profiling(self, level: int) -> None
level: int
self: (unannotated)
lsdtools.ecs.World.phase_profile#
Kind: method. Source: core/ecs/src/lsd_ecs/world.py:782.
phase_profile(self, phase: str) -> tuple[int, int]
phase: str
self: (unannotated)
Source docstring:
The last run of every enabled system of ``phase``, summed: (nanoseconds, entities
visited).
lsdtools.ecs.World.profile#
Kind: method. Source: core/ecs/src/lsd_ecs/world.py:789.
profile(self, system: System) -> dict[str, int]
self: (unannotated)
system: System
lsdtools.ecs.World.describe#
Kind: method. Source: core/ecs/src/lsd_ecs/world.py:794.
describe(self) -> dict[str, object]
self: (unannotated)
Source docstring:
The world as data: counters, components, queries and systems with their profiles.
lsdtools.ecs.capabilities#
Kind: function. Source: core/ecs/src/lsd_ecs/__init__.py:64.
capabilities() -> dict
Source docstring:
The engine as data: whether it is admitted, its artifact and ABI digests, its limits.
Implementation alias: lsd_ecs.capabilities.
lsdtools.ecs.engine_refusal#
Kind: function. Source: core/ecs/src/lsd_ecs/__init__.py:57.
engine_refusal()
Source docstring:
Why the native engine is not admitted in this process, or None when it is.
Implementation alias: lsd_ecs.engine_refusal.
lsdtools.ecs.entity_generation#
Kind: function. Source: core/ecs/src/lsd_ecs/world.py:63.
entity_generation(entity: int) -> int
entity: int
Implementation alias: lsd_ecs.world.entity_generation.
lsdtools.ecs.entity_index#
Kind: function. Source: core/ecs/src/lsd_ecs/world.py:59.
entity_index(entity: int) -> int
entity: int
Implementation alias: lsd_ecs.world.entity_index.
lsdtools.ecs.make_entity#
Kind: function. Source: core/ecs/src/lsd_ecs/world.py:67.
make_entity(index: int, generation: int=0) -> int
generation: int
index: int
Implementation alias: lsd_ecs.world.make_entity.
lsdtools.ecs.memory_trim#
Kind: function. Source: core/ecs/src/lsd_ecs/world.py:831.
memory_trim() -> int
Source docstring:
Return the blocks closed worlds left for reuse to the OS; the bytes released.
Implementation alias: lsd_ecs.world.memory_trim.
lsdtools.ecs.ns_per_entity_system#
Kind: function. Source: core/ecs/src/lsd_ecs/semantics.py:119.
ns_per_entity_system(step_ns: int, entities: int, systems: int=1) -> float | None
entities: int
step_ns: int
systems: int
Source docstring:
`per-entity`: simulation-thread nanoseconds per entity per system; None when nothing was
visited.
Implementation alias: lsd_ecs.semantics.ns_per_entity_system.