Learn R Programming

orloca (version 5.6)

distsumlp: distsumlp and distsumlpgra at orloca package

Description

distsum and distsumgra functions with \(l_p\) norm. Mainly for internal use.

Usage

distsumlp(o, x = 0, y = 0, p = 2)

Value

distsumlp returns the objective function of the min-sum location problem with \(l_p\) norm, \(\sum_{a_i \in o} w_i d(a_i, (x,y))\), where \(d(a_i, (x,y))\) gives the distances between \(a_i\) and the point \((x,y)\) using \(l_p\) norm.

distsumlpgra returns the gradient vector of the function distsumlp. If \((x,y)\) is a demand point partial=T means ignore such point to compute the gradient. This option is mainly for internal use.

Arguments

o

An object of loca.p class.

x

The x coordinate of the point to be evaluated.

y

The y coordinate of the point to be evaluated.

p

The \(l_p\) norm to use.

Details

If \(p<1\) then \(l_p\) is not a norm, so only \(p>=1\) are valid values.

Since \(l_2\) norm is the Euclidean norm, when \(p=2\) distsumlp are equal to distsum, and distsumlpgra are equal to distsumgra. But the computations involved are greater for the firsts form.

See Also

See also distsum, orloca-package and distsumlpmin.