flowConnection: Creates a matrix of flow connectedness for a tree

View source: R/gr_flowConnection.R

flowConnectionR Documentation

Creates a matrix of flow connectedness for a tree

Description

Designed for use on river network and its representation as a tree. It is used on object of class FlowConnectionGraph.

Usage

flowConnection(obj, ...)

## S3 method for class 'FlowConnectionGraph'
flowConnection(obj, ...)

Arguments

obj

object of class FlowConnectionGraph

...

additional arguments

Details

As input it takes a directed tree according to the flow connection and the output is a matrix of 1's and 0's 1 meaning flow connectedness between node i and node j.

Value

A symmetric matrix with named rows and columns and with entries one or zero with one on element ij if location i is flow onnected with location j.

Examples

g<- graph(c(1,2,3,2, 2,4,4,5), directed=TRUE)
g<- set.vertex.attribute(g, "name", V(g), c("a", "b", "c", "d", "e"))
fcg<- FlowConnectionGraph(g)
flowConnection(fcg)

gremes documentation built on Feb. 16, 2023, 8:06 p.m.