Initialization

Before we can use update! we have to initialize with SimpleSolvers.initialize![1].

Similar to update!, SimpleSolvers.initialize! returns the first input argument as output. Examples include:

We demonstrate this for an instance of SimpleSolvers.NewtonOptimizerCache[2]:

x = rand(3)
cache = SimpleSolvers.NewtonOptimizerCache(x)
initialize!(cache, x)
cache.g
3-element Vector{Float64}:
 NaN
 NaN
 NaN

Reasoning behind Initialization with NaNs

We initialize with NaNs instead of with zeros (or other values) as this clearly divides the initialization from the numerical operations (which are done with update!).

Alloc Functions