ManifoldGeometryOps.aligned_padded_frame#

t3toolbox.backend.geometry.ManifoldGeometryOps.aligned_padded_frame(x0, x_old, project, hint, oversampling=ALIGN_OVERSAMPLING, oversampled_passes=ALIGN_OVERSAMPLED_PASSES, max_passes=ALIGN_MAX_PASSES, tol=ALIGN_TOL, alternate=ALIGN_ALTERNATE, seed=ZERO_FRAME_SEED, use_jit=False, timing=False)#
def aligned_padded_frame(
        self,
        x0:                  typ.Tuple,                 # (tucker_cores, tt_cores): the point at the target ranks
        x_old:               typ.Optional[typ.Tuple],   # the old point's cores at minimal ranks (rank 0 allowed); None = the zero tensor
        project:             typ.Callable,              # project(frame, hint) -> variations
        hint:                typ.Any,                   # opaque

        oversampling:        int   = ALIGN_OVERSAMPLING,
        oversampled_passes:  int   = ALIGN_OVERSAMPLED_PASSES,
        max_passes:          int   = ALIGN_MAX_PASSES,
        tol:                 float = ALIGN_TOL,
        alternate:           bool  = ALIGN_ALTERNATE,
        seed:                int   = ZERO_FRAME_SEED,
        use_jit:             bool  = False,             # passed to the loop
        timing:              bool  = False,             # True: a third element, the seconds per pass
) -> typ.Union[
    typ.Tuple[
        typ.Tuple,                 # the aligned frame of x0
        typ.Tuple[NDArray, ...],   # movements, one per pass, each shape=C
    ],
    typ.Tuple[typ.Tuple, typ.Tuple[NDArray, ...], typ.Tuple[float, ...]],   # timing=True: the two, then the seconds per pass
]:

The aligned padded frame of x0 from x_old: fv_aligned_padded_frame().

timing=True adds the seconds per pass (() when no pass runs), each from a synchronized start to a synchronized end; the frame and movements are those of timing=False, bitwise.

Parameters:
  • x0 (t3toolbox.backend.common.typ.Tuple)

  • x_old (t3toolbox.backend.common.typ.Optional[t3toolbox.backend.common.typ.Tuple])

  • project (t3toolbox.backend.common.typ.Callable)

  • hint (t3toolbox.backend.common.typ.Any)

  • oversampling (int)

  • oversampled_passes (int)

  • max_passes (int)

  • tol (float)

  • alternate (bool)

  • seed (int)

  • use_jit (bool)

  • timing (bool)

Return type:

t3toolbox.backend.common.typ.Union[t3toolbox.backend.common.typ.Tuple[t3toolbox.backend.common.typ.Tuple, t3toolbox.backend.common.typ.Tuple[NDArray, …]], t3toolbox.backend.common.typ.Tuple[t3toolbox.backend.common.typ.Tuple, t3toolbox.backend.common.typ.Tuple[NDArray, …], t3toolbox.backend.common.typ.Tuple[float, …]]]