distsuml2 function

distsuml2 and distsuml2gra at orloca package

distsuml2 and distsuml2gra at orloca package

distsum and distsumgra functions for the Euclidean norm (l2l_2). Mainly for internal use.

distsuml2(o, x = 0, y = 0)

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.

Returns

distsuml2 returns the objective function of the min-sum location problem, aiowid(ai,(x,y))\sum_{a_i \in o} w_i d(a_i, (x,y)), where d(ai,(x,y))d(a_i, (x,y)) gives the euclidean distances between aia_i and the point (x,y)(x,y). distsumgra returns the gradient vector of the function distsum.

Details

If (x,y)(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 orloca-package, distsum, distsumgra and distsummin.