@@ -7,7 +7,7 @@ with a preconditioner to induce the metric from the Hilbert space inner product.
77
88## Fields
99- `method::OptimKit.OptimizationAlgorithm`: algorithm to perform the gradient search
10- - `finalize!::Function `: user-supplied function which is applied after each iteration, with
10+ - `finalize!`: user-supplied callable which is applied after each iteration, with
1111 signature `finalize!(x::GrassmannMPS.ManifoldPoint, f, g, numiter) -> x, f, g`
1212
1313---
@@ -23,9 +23,9 @@ with a preconditioner to induce the metric from the Hilbert space inner product.
2323- `maxiter::Int`: maximum amount of iterations
2424- `verbosity::Int`: level of information display
2525"""
26- struct GradientGrassmann <: Algorithm
27- method:: OptimKit.OptimizationAlgorithm
28- finalize!:: Function
26+ struct GradientGrassmann{O <: OptimKit.OptimizationAlgorithm ,F} <: Algorithm
27+ method:: O
28+ finalize!:: F
2929
3030 function GradientGrassmann (; method= ConjugateGradient, (finalize!)= OptimKit. _finalize!,
3131 tol= Defaults. tol, maxiter= Defaults. maxiter, verbosity= 2 )
@@ -39,7 +39,7 @@ struct GradientGrassmann <: Algorithm
3939 msg = " method should be either an instance or a subtype of `OptimKit.OptimizationAlgorithm`."
4040 throw (ArgumentError (msg))
4141 end
42- return new (m, finalize!)
42+ return new {typeof(m),typeof(finalize!)} (m, finalize!)
4343 end
4444end
4545
0 commit comments