Tessero\Optimize\HessianUpdateStrategy
AI assistant
Build this with Claude Code, Cursor or Copilot
Copy a Tessero-tuned prompt for Tessero\Optimize\HessianUpdateStrategy, grounded in 4 real API signatures , into your IDE's AI. No chatbot, just exact context.
__construct
__construct(string|float $initScale = 'auto')
initialize
initialize(int $n, string $approxType = 'hess'): void
Allocate the n x n identity for the Hessian ('hess') or inverse Hessian ('inv_hess').
update
update(array $dx, array $dg): void
Update the internal matrix from a step dx = x2 - x1 and gradient change dg.
dot
dot(array $p): array
Product of the internal matrix with p (the `@`-operator in scipy).
getMatrix
getMatrix(): array
The current dense n x n matrix (symmetric).