CMR
1.3.0

Let \( D = (V,A) \) be a digraph and let \( T \) be an (arbitrarily) directed spanning forest of the underlying undirected graph. The matrix \( M(D,T) \in \{1,0,1\}^{T \times (A \setminus T)} \) defined via
\[ M(D,T)_{a,(v,w)} := \begin{cases} +1 & \text{if the unique $v$$w$path in $T$ passes through $a$ forwardly}, \\ 1 & \text{if the unique $v$$w$path in $T$ passes through $a$ backwardly}, \\ 0 & \text{otherwise} \end{cases} \]
is called the network matrix of \( D \) with respect to \( T \). A matrix \( M \) is called network matrix if there exists a digraph \( D \) with a directed spanning forest \( T \) such that \( M = M(D,T) \). Moreover, \( M \) is called conetwork matrix if \( M^{\textsf{T}} \) is a network matrix.
The command
cmrnetwork INMAT [OPTION]...
determines whether the matrix given in file INMAT
is (co)network.
Options:
i FORMAT
Format of file INMAT
, among dense
for densematrix and sparse
for sparsematrix; default: dense.t
Test for being conetwork; default: test for being network.G OUTGRAPH
Write a digraph to file OUTGRAPH
; default: skip computation.T OUTTREE
Write a directed spanning tree to file OUTTREE
; default: skip computation.D OUTDOT
Write a dot file OUTDOT
with the digraph and the directed spanning tree; default: skip computation.N NONSUB
Write a minimal nonnetwork submatrix to file NONSUB
; default: skip computation.s
Print statistics about the computation to stderr.If INMAT
is 
then the matrix is read from stdin. If OUTGRAPH
, OUTTREE
, OUTDOT
or NONSUB
is 
then the graph (resp. the tree, dot file or non(co)network submatrix) is written to stdout.
The implemented recognition algorithm first tests the support matrix of \( M \) for being (co)graphic and uses Camion's Signing Algorithm for testing whether \( M \) is signed correctly.
The corresponding functions in the library are
and are defined in network.h.
The command
cmrnetwork c INGRAPH OUTMAT [OPTION]...
computes a (co)network matrix corresponding to the digraph from file INGRAPH
and writes it to OUTMAT
.
Options:
o FORMAT
Format of file OUTMAT
, among dense
for densematrix and sparse
for sparsematrix; default: dense.t
Return the transpose of the network matrix.T INTREE
Read a directed tree from file INTREE
; default: use first specified arcs as tree edges.s
Print statistics about the computation to stderr.If INGRAPH
or INTREE
is 
then the digraph (resp. directed tree) is read from stdin. If OUTMAT
is 
then the matrix is written to stdout.
The corresponding function in the library is
and is defined in network.h.