Constructor that converts a Digraph object to an AdjacencyMatrix

What will be an ideal response?


```
AdjacencyMatrix :: AdjacencyMatrix( const Digraph& d )
{
int i, j, k;

n = d.getN();

// initialize matrix
for (i = 0; i < n; ++i)
for (j = 0; j < n; ++j)
mat[i][j] = 0;

// set edges to 1
for (k=0; k d.getEdge(k,i,j);
mat[i-1][j-1] = 1; // remember to adjust subscript by 1
}
}

```

Computer Science & Information Technology

You might also like to view...

JavaFX properties are ________—when a property’s value changes, other objects can respond accordingly.

a. transparent b. transferable c. observable d. disposable

Computer Science & Information Technology

A printer is usually plugged into a __________ that transmits several bits at a time.

a. serial port b. controller c. parallel port d. bus

Computer Science & Information Technology

The name of the element in row 3 and column 5 of jagged array d is __________ .

Fill in the blank(s) with the appropriate word(s).

Computer Science & Information Technology

Which of the following is the programming code for the insertion of a file name into a footer?

A) &[filename]& B) &[file] C) [filename] D) [footer filename]

Computer Science & Information Technology