directedNET: Only allow the network to flow from source to sink

Description Usage Arguments Value Examples

Description

This function replaces the bottom side of the distance network with zeroes. This ensures that everything can only go in one direction. i.e. from code example A to B, A to C, A to D, B to C, B to D and C to D

Usage

1
directedNET(dist, include_diagonal = TRUE, replaceWith = 0)

Arguments

dist

This is a distance matrix between two sites

include_diagonal

'TRUE' means the diagonal is replaced (such that animals cannot remain in a site) and 'FALSE' means they are not

replaceWith

Replace lower part of distance matrix with e.g. zeros or NAs, default is set to 0

Value

A distance matrix in kilometres between all pairs sites

Examples

1
2
3
dta <- data.frame(Site= LETTERS[1:4], Lat= 1:4, Lon= 5:8, Pop=100:103)
dist <- point2DIST(dta)
directedNET(dist)

KiranLDA/maxflow documentation built on May 16, 2019, 11:03 a.m.