calc_af

calc_af(xyz1, xyz2, wij, alpha=0.29)

Arguments

xyz1

xyz2

wij

alpha

0.29

Details

Value

References

Note

See also

Examples

##---- Should be DIRECTLY executable !! ---- ##-- ==> Define data, use random, ##-- or do help(data=index) for the standard data sets. ## The function is currently defined as calc_af <- function(xyz1, xyz2, wij, alpha=0.29) { size1 <- dim(xyz1)[2] size2 <- dim(xyz2)[2] af <- 0 for (i in 1:size1) { for (j in 1:size2) { rij2 <- 0 for (k in 1:3) { rij2 <- rij2 + (xyz1[k,i]-xyz2[k,j])^2 } af <- af - wij[i,j] * exp(-alpha * rij2) } } af }