R/streamorder.R

Defines functions streamorder

streamorder <- function(dem,out) {

# data preparation

nrow <- dim(dem)[1]
ncol <- dim(dem)[2]

# calling the function

  result <- .C("c_streamorder",
		PACKAGE = "topmodel",
		as.double(dem),
		result = double(nrow*ncol),
		as.integer(nrow),
		as.integer(ncol),
		as.integer(out[1]),
		as.integer(out[2]))$result

# formatting of the results

return(matrix(result, nrow=nrow))

}

Try the topmodel package in your browser

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

topmodel documentation built on Nov. 16, 2022, 9:08 a.m.