Computes covariate distance between connected vertices

Computes weighted variance

1 2 3 | ```
weighted_var(x, w)
wvar(x, w)
``` |

`x` |
A numeric vector of length |

`w` |
A numeric vector of length |

`weighted_variance`

implements weighted variance computation
in the following form:

*
sum[w(i)'(x(i) - w.mean(x))^2/(1-n)]
*

where *w(i)' = w(i)/sum(w)*, and
*w.mean(x)=sum[w(i)'*x(i)]*.

Numeric scalar with the weighted variance.

This function is used in `diffmap`

.

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.