euclidean_distance: Euclidean distance matrix between two input matrices

View source: R/RcppExports.R

euclidean_distanceR Documentation

Euclidean distance matrix between two input matrices

Description

Function to construct the euclidean distance matrix with the two input matrices.

Usage

euclidean_distance(input1, input2)

Arguments

input1

A matrix of input with the number of rows being the number of observations and the number of columns being the number of variables

input2

A matrix of input with the number of rows being the number of observations and the number of columns being the number of variables

Value

The euclidean distance matrix with the number of rows and the number of columns being the number of rows in the first and second input matrices.

Author(s)

Mengyang Gu [aut, cre], Jesus Palomo [aut], James Berger [aut]

Maintainer: Mengyang Gu <mengyang@pstat.ucsb.edu>

Examples

  # dimensional of the inputs
  dim_inputs <- 8    
  
  # number of the inputs
  num_obs <- 30       
  
  # uniform samples of design
  input <-matrix(runif(num_obs*dim_inputs), num_obs,dim_inputs) 

  # the Euclidean distance matrix 
  R0=euclidean_distance(input, input)

RobustGaSP documentation built on May 29, 2024, 1:26 a.m.