Graph adjacency matrix to incidence matrix
by Ondrej
08 Jul 2009
(Updated 06 Jul 2011)
Conversion from graph adjacency matrix to incidence matrix.
|
Watch this File
|
| File Information |
| Description |
Returns a sparse incidence matrix 'mInc' according to the adjacency matrix 'mAdj'. The edge ordering in the incidence matrix is according to the order of adjacent edges of vertices starting from the 1st vertex, i.e. first edges coincide with first vertex, next edges coincide with second vertex, etc.
If the graph is directed, the incidence matrix mInc contains -1s, indicating an "in-going" edge, and 1s indicating an "out-going" edge.
If the graph is undirected, the incidence matrix mInc contains only 1s. |
| MATLAB release |
MATLAB 7.6 (R2008a)
|
|
Tags for This File
|
| Everyone's Tags |
|
| Tags I've Applied |
|
| Add New Tags |
Please login to tag files.
|
| Updates |
| 08 Jul 2009 |
Error handling added + new comments |
| 08 Jul 2009 |
Major speed-up update thanks to Wolfgang Schwanghart |
| 10 Jul 2009 |
Self-loops check added (Thanks to Wolfgang Schwanghart) |
| 23 Mar 2011 |
warning identifier added + minor comments |
| 24 Mar 2011 |
faster check for matrix symmetry (minor speed-up) |
| 26 Mar 2011 |
function renamed to adj2inc() + speed-up |
| 06 Jul 2011 |
new optional parameter: adj2inc(A,0)= directed, graph,adj2inc(A,1) = undirected graph |
|
Contact us