distsumlp: distsumlp and distsumlpgra at orloca package

distsumlpR Documentation

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)

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.

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.

See Also

See also distsum, orloca-package and distsumlpmin.


orloca documentation built on Feb. 1, 2024, 3 p.m.