tests.builder.test_adjmatrix

tests.builder.test_adjmatrix#

Unit tests for structure.twoendedlink.TwoEndedLink class.

Functions

test_adjmatrix_clrs09_22_2()

This graph is taken from [CLRS09], figure 22.2.

test_adjmatrix_edgetype()

Ensure adjmatrix respects user's edge type.

test_adjmatrix_nonsquare()

Ensure adjmatrix throws an error when the given matrix is not square.

test_adjmatrix_sidelen()

Ensure adjmatrix throws an error if the vertex array does not match the matrix size.

test_create_adjmat_dir()

Validate creation of adjacency matrices from a universe with only directed edges.

test_create_adjmat_mixed()

Test creation of an adjacency matrix from a universe with both directed and undirected edges.

test_create_adjmat_undir()

Validate creation of adjacency matrices from a universe with only undirected edges.