# pyflagser.save_unweighted_flag¶

pyflagser.save_unweighted_flag(fname, adjacency_matrix)

Save the adjacency matrix of a directed/undirected unweighted graph into a .flag file.

Parameters
fnamefile, str, or pathlib.Path, required

Filename of extension .flag.

adjacency_matrix2d ndarray or scipy.sparse matrix, required

Adjacency matrix of a directed/undirected unweighted graph. It is understood as a boolean matrix. Off-diagonal, 0 or False values denote absent edges while non-0 or True values denote edges which are present. Diagonal values are ignored.

Notes

The input graphs cannot contain self-loops, i.e. edges that start and end in the same vertex, therefore diagonal elements of the input adjacency matrix will be ignored.

References

1

D. Luetgehetmann, “Documentation of the C++ flagser library”; GitHub: luetge/flagser.