rlmesh.adapters.Concat

classfrom rlmesh.adapters import Concat[source]

A multi-part numeric state input: several roles packed into one tensor.

Concat(
    *parts: ConcatPart,
    pad_to: int | None = None,
    dtype: str = 'float32',
    reshape: tuple[int, ...] | None = None,
    container: Literal['array', 'list'] = 'array',
    clip: tuple[float, float] | None = None,
)

The multi-part state leaf. Parts are concatenated in order; each part is a bare role string (sugar for a role-only State), a State carrying part fields, or a Constant block. A single-role state is State directly; this is the >1-part case. Both serialize to the same {"type": "state", ...} wire form.

There is no key – placement in the input tree is the payload position.

parts

attribute[source]
parts: tuple[ConcatPart, ...]

Roles (or State / Constant parts) concatenated in order. At least one part must carry a role – a state of only constants reads nothing from the env.

pad_to

attribute[source]
pad_to: int | None

Zero-pad the concatenated vector to this length. Padding is the last step: every part is converted, ranged and scaled, the parts are concatenated in order, and only then is the result padded.

dtype

attribute[source]
dtype: str

NumPy dtype name of the resulting value.

reshape

attribute[source]
reshape: tuple[int, ...] | None

Optional target shape for the resulting value.

container

attribute[source]
container: Literal['array', 'list']

Emit a NumPy array or a plain Python list.

clip

attribute[source]
clip: tuple[float, float] | None

Clamp the concatenated vector to (low, high) after every part’s own transforms and before pad_to.