Hpath_covid: Basic description

Description Usage Arguments Value See Also Examples

View source: R/Hpath_covid.R

Description

Applies the path.kruskal function based on the nodes and edge.cost (sorts the weights from minimum to maximum). Given the starting node, ending node, and the distance matrix, this function returns the list of nodes of each edge from the shortest Hamiltonian path. We have the Hamiltonian path from path.kruskal

Usage

1
Hpath_covid(n1,n2,mat)

Arguments

n1

starting node

n2

ending node

mat

distance matrix (distance type is determined by the reader)

Value

list of nodes of each edge from the shortest Hamiltonian path

See Also

Distance.data_covid, path.kruskal_covid

Examples

1
2
3
4
5
data(origin_data,package="GraphCpClust")
Lnorm = function(x) sqrt(sum(t(x)*x))
data.trans=Distance.data_covid(t(Data.new),1,34,Lnorm)
HD=data.trans$hd # distance matrix
Hpath_covid(1,34,HD)

Meiqian-Chen/GraphCpClust documentation built on April 27, 2021, 10:40 a.m.