power_method#
- mrinufft.operators.base.power_method(max_iter: int, operator: FourierOperatorBase | Callable, norm_func: Callable | None = None, x: ndarray[tuple[int, ...], dtype[_ScalarType_co]] | None = None) tuple[floating | ndarray[tuple[int, ...], dtype[_ScalarType_co]], ndarray[tuple[int, ...], dtype[_ScalarType_co]]][source]#
Power method to find the Lipschitz constant of an operator.
- Parameters:
max_iter (int) – Maximum number of iterations
operator (FourierOperatorBase or child class or Callable) – NUFFT Operator of which to estimate the lipchitz constant. If it is Callable, it should implement the AHA operation.
norm_func (callable, optional) – Function to compute the norm , by default np.linalg.norm. Change this if you want custom norm, or for computing on GPU.
x (array_like, optional) – Initial value to use, by default a random numpy array is used.
- Returns:
x_new_norm (float or NDArray) – The maximum eigen value
x_new (NDArray) – The eigen vector associated with maximum eigen value
- Return type:
tuple[floating | ndarray[tuple[int, …], dtype[_ScalarType_co]], ndarray[tuple[int, …], dtype[_ScalarType_co]]]