calculateEuclideanDistance {Irescale}R Documentation

Given a 2D data structure, it calculates the euclidean distance among all the points.

Description

calculateEuclideanDistance Computes the euclidean distance betwen all pairs of nodes provided in the input vector.

Usage

calculateEuclideanDistance(data)

Arguments

data

2D data structure for latitute and longitute respectively.

Details

Computes the euclidean distance, \sqrt{(x_1-x_2)^2 + (y_1-y_2)^2}, matrix between each pair of points.

Value

Matrix, of size nrow(data) \times nrow(data), with the distance between all the pair of points.

Examples

fileInput <- system.file("testdata", "chen.csv", package="Irescale")
data<-loadFile(fileInput)
distM<-calculateEuclideanDistance(data$data)

[Package Irescale version 2.3.0 Index]