find_path: Constructs a path from a matrix of edge weights.

View source: R/pathweights.R

find_pathR Documentation

Constructs a path from a matrix of edge weights.

Description

Returns a path, constructed by applying the function in path to the edge weights. If each edge has many weights, i.e if edgew is a matrix, these weights are first reduced by the function combine applied to the rows. If path is NULL, the returned path defaults to 1..nnodes(edgew)

Usage

find_path(edgew, path=NULL,  combine=sum, edge.index=edge_index(edgew),...)

Arguments

edgew

Matrix (or vector) whose ith row (or element) has weights for pair indexed by pair in row i of edge.index.

path

a function used to construct the index path.

combine

A function that combines the row of weights for an edge into a single numeric value.

edge.index

A 2-column matrix with each row giving indices for corresponding weight in edgew.

...

passed to path construction function.

Author(s)

C.B. Hurley and R.W. Oldford


PairViz documentation built on Aug. 12, 2022, 5:06 p.m.