R/mat_support_distance.R

Defines functions mat_support_distance

Documented in mat_support_distance

#' Computes a measure of distance between the support of two matrices
#'
#' @param mat1 a square matrix
#' @param mat2 a square matrix
#'
#' @returns a measure of distance between the support of two matrices
#' @importFrom pracma          ceil
#' @keywords internal
mat_support_distance = function(mat1, mat2){
  return(mean(abs(pracma::ceil(mat1)-ceil(mat2))))
}

Try the scov package in your browser

Any scripts or data that you put into this service are public.

scov documentation built on March 18, 2026, 5:08 p.m.