lattice network metrics function