UniformManifoldGeometryOps.aligned_padded_frame#

t3toolbox.backend.geometry.UniformManifoldGeometryOps.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,                 # bare (tucker_supercore, tt_supercore) at this geometry's masks
        x_old:               typ.Optional[typ.Tuple],   # the old point's full .data at minimal ranks (rank 0 allowed); None = the zero tensor

        project:             typ.Callable,              # project(frame_data, hint) -> variations (module-level under use_jit)
        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 (the whole-loop jit)
        timing:              bool  = False,             # True: a third element, the seconds per pass (None under use_jit)
) -> typ.Union[
    typ.Tuple[
        typ.Tuple,   # the aligned frame of x0 at the widths of self.var_masks, prefix masks
        NDArray,     # movements, (max_passes,)+C, NaN after the last pass
    ],
    typ.Tuple[typ.Tuple, NDArray, typ.Optional[typ.Tuple[float, ...]]],   # timing=True: the two, then the seconds per pass
]:

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

timing=True adds the seconds per pass (() when no pass runs), each from a synchronized start to a synchronized end; under use_jit the whole loop is one program and the third element is None. 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, NDArray], t3toolbox.backend.common.typ.Tuple[t3toolbox.backend.common.typ.Tuple, NDArray, t3toolbox.backend.common.typ.Optional[t3toolbox.backend.common.typ.Tuple[float, …]]]]