class_docstr: Worker class of LOBPCG methods.
class_docstr_tok: ["Worker","class","of","LOBPCG","methods","."]
docstr: Set and update iteration variables.
docstr_tok: ["Set","and","update","iteration","variables","."]
code: def update(self):
      """Set and update iteration variables."""
      if self.ivars["istep"] == 0:
          X_norm = float(torch.norm(self.X))
          iX_norm = X_norm**-1
          A_norm = (
              float(torch.norm(_utils.matmul(self.A, self.X))) * iX_norm
          )
          B_norm = (
              float(torch.norm(_utils.matmul(self.B, self.X))) * iX_norm
          )
          self.fvars["X_norm"] = X_norm
          self.fvars["A_norm"] = A_norm
          self.fvars["B_norm"] = B_norm
          self.ivars["iterations_left"] = self.iparams["niter"]
          self.ivars["converged_count"] = 0
          self.ivars["converged_end"] = 0
  
      if self.method == "ortho":
          self._update_ortho()
      else:
          self._update_basic()
  
      self.ivars["iterations_left"] = self.ivars["iterations_left"] - 1
      self.ivars["istep"] = self.ivars["istep"] + 1
  
imports: from typing import Dict, Optional, Tuple
  import torch
  from torch import Tensor
  from .None import _linalg_utils
  from .overrides import handle_torch_function, has_torch_function
label_desc: Use image node_id 3 for calling the LOBPCG obj's underlying member method code with example usage: obj.update() without return types