coarsen_one_level_localvar: Single-level local variation coarsening step (Edge-based)

View source: R/multi_coarsen.R

coarsen_one_level_localvarR Documentation

Single-level local variation coarsening step (Edge-based)

Description

Performs one coarsening step: - Computes edge costs - Selects edges to contract (if none meet threshold, force one contraction if force_contraction=TRUE) - Constructs P, updates L and U

Usage

coarsen_one_level_localvar(
  L,
  U,
  n,
  sigma_prime,
  force_contraction = FALSE,
  verbose = FALSE
)

Arguments

L

Current Laplacian.

U

Current subspace U (N x k).

n

Target size after coarsening (N_new <= n ideally).

sigma_prime

Variation threshold.

force_contraction

If TRUE, force at least one edge contraction if none selected normally.

verbose

If TRUE, prints messages.

Value

A list:

L_new

Reduced Laplacian.

P

Coarsening matrix.

U_new

Updated subspace.

N_new

New dimension.

sigma

Approx. variation cost (for epsilon update).


bbuchsbaum/graphweights documentation built on Dec. 14, 2024, 1:13 a.m.