Skip to contents

A step of the cgnonl_native implementation. Called by .cgnonl_beta. See the file header for the source the module follows.

Usage

cgnonl_beta_polak_ribiere(g_new, g_old, plus = FALSE)

Arguments

g_new

Numeric; combined arithmetically in the body.

g_old

Numeric; combined arithmetically in the body.

plus

A flag; the body branches on it. Defaults to FALSE.

Value

One of two values, depending on the branch taken.

Examples

cgnonl_beta_polak_ribiere(g_new = c(0.5, -0.2), g_old = c(1, 0.3))
#> [1] -0.1376147
cgnonl_beta_polak_ribiere(g_new = c(0.5, -0.2), g_old = c(1, 0.3), plus = TRUE)
#> [1] 0