Added function to test node-adjacency matrices

(1) Tests that matrix is 0-1
(2) Tests that the diagonal is 0
(3) Tests that matrix is symmetric
Rewrote SFNG to be faster