calculateDistMatrixFromBoard: Calculates the distance in a chessboard-alike structure.

Description Usage Arguments Value Examples

View source: R/rectifiedI.R

Description

calculateDistMatrixFromBoard calculates the distance matrix when the field is divided in a matrix shape (rows and columns). This board could have different number of columns for each row. For example:

1 1 1 1 1 1
2 2 2 2 2
3 3 3 3 3
4 4 4 4 4

The dimension of obtained squared matrix is given by the square of the maximumn dimension of the original matrix. In the previous example, the matrix will have a size of (36,36).

Usage

1

Arguments

data

is a 2D data structure.

Value

distM the distance between each cell.

Examples

1
2
3
fileInput <- system.file("testdata", "chessboard.csv", package="Irescale")
data<-loadChessBoard(fileInput)
distM<-calculateEuclideanDistance(data$data)

Irescale documentation built on Nov. 22, 2019, 1:07 a.m.