ds: add graph adjacent matrix operations