compose
Stable function · Editing
Tier: stable · Kind: function · Topic: Editing
| Julia | TypeScript | Python | Rust | Go |
|---|---|---|---|---|
compose | compose | not exported | compose | Compose |
Julia
compose(file::EsmFile, system_a::String, system_b::String)
compose(file::EsmFile, system_a::String, system_b::String) -> EsmFile
Convenience function to create an operator_compose coupling entry linking two systems.
TypeScript
function compose(file: EsmFile, a: string, b: string): EsmFile
Compose two systems using a coupling entry
Parameters
file— ESM filea— First system nameb— Second system name
Returns
New ESM file with composition coupling added
Python
Python does not export this function.
Rust
pub fn compose(a: &CallbackSet, b: &CallbackSet) -> CallbackSet
Concatenate two callback sets into a new one.
This is the explicit composition §2.5.4 requires: a callback argument to
solve
REPLACES the EsmProblem’s set entirely — it does not append, merge or
wrap — so a caller who wants to extend rather than replace reads the
existing set back with callbacks
and composes:
let cb = compose(callbacks(&prob), &my_extra);
solve(&prob, &SolveOptions { callback: Some(cb), ..Default::default() })