distsumlp | R Documentation |
distsum and distsumgra functions with l_p
norm. Mainly for internal use.
distsumlp(o, x = 0, y = 0, p = 2)
o |
An object of |
x |
The x coordinate of the point to be evaluated. |
y |
The y coordinate of the point to be evaluated. |
p |
The |
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.
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 distsum
, orloca-package
and distsumlpmin
.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.