SObject
An SObject represents the structure of a physical object. Subclasses
extend that definition.
Subclasses:
Member functions:
- dimension: SObject -> int
The intrinsic dimension of
the object.
Secondary operations:
- update_converging: SObjects . (SObject.int->bool) calc
. (SObject.int->void) do=0 . (int->void) prop=0 -> void
Updates the objects until the calculation converges. At each step,
calls the calc function with an object and the step number; the op
returns whether or not the object actually changes. For parallel
updates, the do op actually performs the update calculated by the
calc step; for sequential updates, the calc step performs it and no do
op is required. Finally, after all objects have been updated, the
prop op is called and the next step starts.
- update_steps SObjects . int num_steps
. (SObject.int->void) calc . (SObject.int->void) do=0 . (int->void)
prop=0 -> void
The arguments are similar to update_converging,
but the iteration continues a specified number of steps, so the calc
function doesn't need to indicate whether or not the object has
changed.
- update_ui SObjects . UI . Menubar . int ui_priority .
(SObject.int->void) calc . (SObject.int->void) do=0 . (int->void)
prop=0 -> void
The arguments are similar to update_steps. A menu
is added to the menubar allowing the user to start iteration, stop
iteration, or perform a single step. The events reported by the UI
are checked every ui_priority steps.