supposing I have a matrix like

```
0 -1  0  0
0  0 -1  0
0  0  0  0
0  0 -1 -1

```

so in this case The matrix represents:
![enter image description here](https://i.stack.imgur.com/xo3xd.png)

0's are conected and -1 are not
How can I get Adjacency matrix from it?

I know 

```
h[i][j] = 0, if there is no direct link from i to j 
(i and j are not neighbors)
h[i][j] = 1, if there is a direct link from i to j 
(i and j are neighbors)

```

so I am doing something like:

```
Int32[,] original = new int[4, 4]
{
  {0, -1,  0,  0},
  {0,  0, -1,  0},
  {0,  0,  0,  0},
  {0,  0, -1, -1}
}

Int32[,] adjacent;
for (int i = 0; i < original.GetLength(0); i++){
    for (int j = 0; j < original.GetLength(1); j++) {
         //How to know if there is direct link from i to j 
         //if(){
         //   adjacent[i,j]=0;
         //}else{
         //   adjacent[i,j]=1;
         //}
    }
 }

```