Learn R Programming

som.nn (version 1.4.4)

dist.torus: Torus distance matrix

Description

Calculates the distance matrix of points on the surface of a torus.

Usage

dist.torus(coors)

Value

 Complete distance matrix with diagonal and upper triangle values.

Arguments

coors

data.frame or matrix with two columns with x- and y-coordinates.

Details

A rectangular plane is considered as torus (i.e. on an endless plane that contimues on the left, when leaving at the right side, and in the same way connects top and bottom border). Distances between two points on the plane are calculated as the shortest distance between the points on the torus surface.