eval_f_xm1sq: Evaluate Objective Function for '(x - 1)^2'.

Description Usage Arguments Value

View source: R/functions_ipopt.r

Description

Evaluate an objective function that calculates the weighted sum of (x - 1)^2 at a specific point x, where x is the ratio of new weights to existing weights. It weights elements in the sum by the initial weights. It scales the calculation by a scaling factor. Most users will have no need to call this function, but it can be useful when debugging a problem.

Usage

1
eval_f_xm1sq(x, inputs)

Arguments

x

Numeric vector representing the ratio of new weights to initial weights, length h.

inputs

List created by reweight. It must have the following elements:

iweight

vector of initial weights, length h

objscale

scalar to divide calculations by

Value

A scalar, the scaled weighted sum of the differences between x and 1.


donboyd5/microweight documentation built on Aug. 17, 2020, 4:48 p.m.