loca.p-class {orloca} | R Documentation |
An object of class loca.p
represents a weighted location
problem with a demand points set.
The orloca-package
is mainly devoted to deals with location problems.
The lengths of x
and y
vector must be equals. The length
of w
must be equal to the previous ones or must be 0. NA's
values are not allowed at any of the arguments.
If the arguments have valid values, it returns a new object of class
loca.p
, else it returns an error.
summary(x)
returns a summary of the x
loca.p
object and
print(x)
prints a summary of the x
loca.p
object.
The main generator is loca.p(x, y, w = numeric(0), label =
"")
. An alternative form is new("loca.p", x, y, w = numeric(0), label =
"")
.
See also orloca-package
.
# An unweighted new loca.p object loca <- loca.p(x = c(-1, 1, 1, -1), y = c(-1, -1, 1, 1)) # or loca <- new("loca.p", x = c(-1, 1, 1, -1), y = c(-1, -1, 1, 1)) # An example with weights and name locb <- new("loca.p", x = c(-1, 1, 1, -1), y = c(-1, -1, 1, 1), w = c(1, 2, 1, 2), label = "Weighted case")