Added utility arr2mat which creates adjacency matrix from list of dicrected edges.