mop_distances calculates the Euclidean distance between two matrices.

mop_distance(M, G)

Arguments

M

A numeric matrix of dimension n x m

G

A numeric matrix of dimension n x m

Value

A numeric value that represents the Euclidean distance between the two matrices

Examples


set.seed(111)
n=1000
M <- matrix(rnorm(4*n), 2*n, 2)
G <- matrix(rnorm(4*n), 2*n, 2)
mdist <- smop::mop_distance(M,G)