R/ComputeWeightsInBins.R

Defines functions ComputeWeightsInBins

ComputeWeightsInBins <- function(
    B, 
    weight, 
    nvertices
){
	# Use C call to compute the sum of the adjusted vertex weights for each vertex and each bin
	diam <- max(B)
	matrix(
		.Call("computeweights",
			as.integer(as.vector(B)),
			as.double(weight),
			as.integer(nvertices),
			as.integer(diam)
		),
	nvertices, diam)
}

Try the SANTA package in your browser

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

SANTA documentation built on Oct. 31, 2019, 3:21 a.m.