Add constructor using an adjacency matrix