View source: R/weightFunctions.R
simpleCostFn | R Documentation |
Calculates the weight of an edge between two nodes as the mean value
of an input cost raster at each of those nodes (x1
and x2
).
simpleCostFn(x1, x2, hdistance)
x1 , x2 |
Number. Value of the input cost raster at two nodes. |
hdistance |
Number. Horizontal distance between the nodes - for penalizing longer diagonal edges. |
simpleCostFn(0.5,0.7,1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.