From e312df1a7c8989101f494541a42c59d090922d6e Mon Sep 17 00:00:00 2001 From: Stefan Kroboth Date: Wed, 7 Feb 2024 20:16:47 +0100 Subject: [PATCH] Added note to Eggholder Hessian docs --- crates/argmin-testfunctions/src/eggholder.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/crates/argmin-testfunctions/src/eggholder.rs b/crates/argmin-testfunctions/src/eggholder.rs index ad8cc0525..00935dc31 100644 --- a/crates/argmin-testfunctions/src/eggholder.rs +++ b/crates/argmin-testfunctions/src/eggholder.rs @@ -97,6 +97,12 @@ where } /// Hessian of Eggholder test function +/// +/// This function can return NaN elements under the following conditions: +/// +/// * |x1 - x2 - 47| <= EPS && x1 != 0 +/// * |x2 - x1 + 47| <= EPS && x1 != 0 +/// * |x1/2 + x2 + 47| <= EPS && |x2 + 47| != 0 pub fn eggholder_hessian(param: &[T; 2]) -> [[T; 2]; 2] where T: Float + FromPrimitive,