R/floyd.R

Defines functions floyd

Documented in floyd

#[export]
floyd<-function(x){
  i4_huge<-2147483647
  y<-as.vector(x)
  y[is.na(y)]<-i4_huge
  dm<-dim(x)[2L]
  y<-.Call(Rfast_floyd_john,dm,y)
  y[y==i4_huge]<-NA
  y[seq.int(1,length(y),dim(x)[2L]+1)]<-0
  dim(y)<-c(dm,dm)
  y
}

Try the Rfast package in your browser

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

Rfast documentation built on Nov. 9, 2023, 5:06 p.m.