This is a generic S3 function that dispatches to the correct update rule based on the optimizer's class.

step(optimizer, i, V_current, descent_gradient, ...)

Arguments

optimizer

The optimizer object from `create_optimizer()`.

i

The index of the modality currently being updated.

V_current

The current V matrix for modality `i`.

descent_gradient

The Riemannian DESCENT gradient (-grad(E)) for V_current.

...

Additional arguments required by the specific method (e.g., `full_energy_function` for line searches, `learning_rate` for others).

Value

A list containing `updated_V` and the updated `optimizer` object.