Added network building from a boolean matrix.