Skip to contents

Declare supplied transport costs or ground distances

Usage

ot_cost(values, type = c("cost", "distance"), metric = FALSE)

Arguments

values

A finite nonnegative cross-matrix.

type

Whether entries are already powered costs or ground distances.

metric

Whether the caller declares that values derive from a metric. This is a declaration, not a verified triangle inequality.

Value

A `t4transport_cost` object. Distance entries are powered exactly once by the order supplied to `ot_distance`; cost entries are used unchanged.