CMR  1.3.0
Functions
graphic_internal.h File Reference
#include <cmr/graphic.h>

Go to the source code of this file.

Functions

CMR_ERROR CMRcomputeRepresentationMatrix (CMR *cmr, CMR_GRAPH *digraph, bool ternary, CMR_CHRMAT **ptranspose, bool *arcsReversed, int numForestArcs, CMR_GRAPH_EDGE *forestArcs, int numCoforestArcs, CMR_GRAPH_EDGE *coforestArcs, bool *pisCorrectForest)
 Computes the network or graphic matrix of a given (di)graph \( D = (V,A) \). More...
 

Function Documentation

◆ CMRcomputeRepresentationMatrix()

CMR_ERROR CMRcomputeRepresentationMatrix ( CMR cmr,
CMR_GRAPH digraph,
bool  ternary,
CMR_CHRMAT **  ptranspose,
bool *  arcsReversed,
int  numForestArcs,
CMR_GRAPH_EDGE forestArcs,
int  numCoforestArcs,
CMR_GRAPH_EDGE coforestArcs,
bool *  pisCorrectForest 
)

Computes the network or graphic matrix of a given (di)graph \( D = (V,A) \).

Computes the network matrix \( M := M(D,T) \) for given \( D \) and optionally given (directed) spanning forest \( T \subseteq A \) or the support matrix of \( M(D,T) \). If \( T \) is not given, an arbitrary (directed) spanning forest of \( D \) is used. The direction of the edges is that of digraph, but may be flipped by specifying arcsReversed. If forestArcs is NULL, an arbitrary (directed) spanning forest \( T \) of \( D \) is computed. The ordering of the columns can be specified via coforestArcs.

Note
The function computes a network matrix of \( D \) (and \( T \)) regardless of whether forestArcs is a correct (directed) spanning forest. Whether this was the case is indicated via *pisCorrectForest.
Parameters
cmrCMR environment.
digraphDigraph \( D = (V,A) \).
ternaryWhether we need to compute correct signs.
ptransposePointer for storing \( M^{\mathsf{T}} \) (may be NULL).
arcsReversedIndicates, for each edge \( \{u, v\}\), whether we consider \( (u, v)\) (if false) or \( (v,u)\) (if true).
numForestArcs\( |T| \) (0 if forestArcs is NULL).
forestArcs\( T \), ordered by the rows of \( M \) (may be NULL).
numCoforestArcs\( |A \setminus T| \) (0 if coforestArcs is NULL).
coforestArcs\( A \setminus T \), ordered by the columns of \( M \) (may be NULL).
pisCorrectForestPointer for storing whether forestArcs is a (directed) spanning forest of \( D \)'s underlying undirected graph (may be NULL).