Added matrix graph class