utv_weighted_norm#
- t3toolbox.backend.utv_operations.utv_weighted_norm(variations, weights, n_stack)#
def utv_weighted_norm( variations: typ.Tuple, # UT3Variations .data: (tkv, ttv, shape, masks), stack = K + C weights: typ.Tuple, # UT3FrameWeights .data: (up, down, left, right, masks), stack = C n_stack: int, # leading K+C stack axes to keep; 0 -> a single scalar ) -> NDArray: # weighted coordinate norm, shape = stack_shape[:n_stack]
Weighted (Grasedyck-Kramer) coordinate norm of a uniform tangent’s variations: absorb the metric into the variation supercores, then take the corewise stack-norm. Uniform twin of
fv_weighted_norm.The frame (orthonormal) is not needed and not touched, so this is O(ranks). The inserted diagonal is squared by the norm, so
weights = 1/sigmapenalises by1/sigma^2. Likecorewise_normthis is the coordinate metric (= Hilbert-Schmidt only on an orthonormal, gauged frame) – and note that absorbing weights breaks the gauge, so the HS reading does not survive the weighting.Weighting does not mask; the reduction does (
utv_corewise_innermasks its own input), so garbage padding is zeroed where the sum happens. Precondition: the weight’s masks (broadcast overK) must equal the variations’ –ufv_weights_consistent; the frontend enforces it.Lives here, not in
ufv_operationsbesideufv_absorb_weights, because the corewise reduction it needs isutv_corewise_innerandutv_operationsalready importsufv_operations– the other placement would be a circular import. (Ragged has no such constraint: itsfv_weighted_normreaches a standalonecorewisemodule.)- Parameters:
variations (t3toolbox.backend.common.typ.Tuple)
weights (t3toolbox.backend.common.typ.Tuple)
n_stack (int)
- Return type: