From 556052d014cacbe1b6bbf02cff06ea8145c7f752 Mon Sep 17 00:00:00 2001 From: Sam Date: Thu, 22 Sep 2022 08:55:09 -0700 Subject: [PATCH] Fix function name in Hessian example in README Rename function in code block to match main text --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 3511ac6a..2b10bf40 100644 --- a/README.md +++ b/README.md @@ -212,8 +212,8 @@ and a color vector and sparsity pattern, this can be accomplished using `numauto_color_hessian` or its in-place form `numauto_color_hessian!`. ```julia -H = numauto_color_hessian(fscalar, x, colorvec, sparsity) -numauto_color_hessian!(H, fscalar, x, colorvec, sparsity) +H = numauto_color_hessian(f, x, colorvec, sparsity) +numauto_color_hessian!(H, f, x, colorvec, sparsity) ``` To avoid unnecessary allocations every time the Hessian is computed, @@ -230,7 +230,7 @@ Alternatively, if you have your own custom gradient function `g!`, you can speci it as an argument to `ForwardColorHesCache`: ```julia -hescache = ForwardColorHesCache(fscalar, x, colorvec, sparsity, g!) +hescache = ForwardColorHesCache(f, x, colorvec, sparsity, g!) ``` Note that any user-defined gradient needs to have the signature `g!(G, x)`, i.e. updating the gradient `G` in place. @@ -356,4 +356,4 @@ ArrayInterfaceBlockBandedMatrices.jl to basically work with any functionality for sparsity patterns. In the future, those two packages should just depend on ArrayInterface.jl and remove this issue entirely from the user space. -Additionally, GPUs need ArrayInterfaceGPUArrays for proper determination of the indexing. \ No newline at end of file +Additionally, GPUs need ArrayInterfaceGPUArrays for proper determination of the indexing.