TourLength: Calculate tour length

Description Usage Arguments

View source: R/TourLength.R

Description

Takes a tour and distance matrix and returns the tour length

Usage

1
TourLength(distances, tour)

Arguments

distances

A nxn matrix where first row is not column headers. Each cell represents the distance from the row index node to the column index node.

tour

A numeric vector with the order that the nodes in the coordMatrix are visited. Must be the same length as the coordMatrix


bjhufstetler/LeapFrog documentation built on March 19, 2020, 11:51 p.m.