-
Notifications
You must be signed in to change notification settings - Fork 76
List of functions
adj2adjL: convert an adjacency matrix to an adjacency list;
adjL2adj: convert an adjacency list to an adjacency matrix;
adj2edgeL: convert an adjacency matrix to an edge list;
edgeL2adj: convert edge list to adjacency matrix;
adj2inc: convert an adjacency matrix to an incidence matrix;
inc2adj: convert an incidence matrix to an adjacency matrix;
adj2str: convert an adjacency matrix to a string (text) graph representation;
str2adj: convert a string (text) graph representation to an adjacency matrix;
adjL2edgeL: convert an adjacency list to an edge list;
edgeL2adjL: convert an edge list to an adjacency list;
inc2edgeL: convert an incidence matrix to an edge list;
adj2simple: remove self-loops, multi-edges, edge weights and symmetrize to produce a simple graph from a general adjacency matrix;
edgeL2simple: remove self-loops, multi-edges, edge weights and symmetrize to produce a simple graph from a general edge list;
symmetrize: symmetrize a square matrix;
symmetrizeEdgeL: symmetrize an edge list;
addEdgeWeights: adding the weights of edges that occur multiple times in an edge list; summing weights;
getNodes: return the list of nodes for varying graph representations;
getEdges: return the list of edges for varying graph representations;
numNodes: number of nodes in the network;
numEdges: number of links in the network;
linkDensity: the density of links, i.e. the number of links divided by the number of node pairs;
selfLoops: number of edges that start and end at the same node;
multiEdges: number of edges that share origin and destination nodes with another edge;
averageDegree: the average number of links per node;
numConnComp: find the number of connected components;
findConnComp: find the connected components in an undirected graph;
findConnCompI: find the connected component to which a given node belongs to;
giantComponent: the largest connected component in a graph;
strongConnComp: support function for the Tarjan algorithm;
tarjan: find the strongly connected components in a directed graph;
graphComplement: graph on the same nodes as the original graph, but with inverted edges;
graphDual: the inverted nodes-edges graph;
subgraph: return the adjacency matrix of a subgraph, given a subset of nodes;
leafNodes: nodes that are adjacent to only one other node;
leafEdges: edges that are adjacent to only one other edge;
minSpanTree: minimum spanning tree (Prim's algorithm);
DFS: depth-first-search, all shortest paths;
BFS: breath-first-search tree, given a start and a target node;
isSimple: check whether a graph is simple, i.e. no self-loops, no multiple edges, undirected and unweighted;
isDirected: check whether a graph is directed;
isSymmetric: check whether a matrix is symmetric;
isConnected: check whether a graph is connected, i.e. there is a path from any node to any other node;
isWeighted: check whether a graph has weighted links;
isRegular: check whether a graph is regular, i.e. every node has the same degree;
isComplete: check whether a graph is complete, i.e. every node has degree n-1;
isEulerian: check whether a graph is Eulerian;
isTree: check whether a graph is a tree;
isGraphic: check whether a sequence of integers is graphic;
isBipartite: check whether a graph is bipartite;
degrees: the number of links for every vertex;
rewire: degree-preserving random rewiring of edges;
rewireThisEdge: degree-preserving random rewiring of a given edge;
rewireAssort: degree-preserving random rewiring of edges with increasing assortativity;
rewireDisassort: degree-preserving random rewiring of edges with decreasing assortativity;
aveNeighborDeg: average neighbor degree for every vertex;
sortNodesBySumNeighborDegrees: sort nodes first by degree, then by sum of the degrees of neighboring nodes;
sortNodesByMaxNeighborDegree: sort nodes first by degree, then by the maximum degree of neighboring nodes;
closeness: the inverse of the sum of distances to all other nodes (for every node);
nodeBetweenness: a node metric, proportional to the number of shortest paths going through that node;
nodeBetweennessFaster: a faster implementation of node betweenness;
edgeBetweenness: an edge metric, proportional to the number of shortest paths going through an edge;
eigenCentrality: the eigenvector corresponding to the largest eigenvalue of the adjacency matrix;
clustCoeff: clustering coefficient;
transitivity: transitivity;
weightedClustCoeff: clustering coefficient for weighted graphs;
pearson: Pearson degree correlation;
pearsonW: Pearson degree correlation using matrix algebra only;
richClubMetric: the density of links among nodes with nodal degree k or higher;
sMetric: the sum of products of nodal degrees across all edges;
simpleDijkstra: compute distances from a given node to all other nodes in the graph, without remembering the paths;
dijkstra: Dijkstra's algorithm: returns all node pairs' shortest distances, with their respective shortest paths;
shortestPathDP: shortest path algorithm using dynamic programming; returns the minimum weight path length and the route;
findAllShortestPaths: finding all shortest paths between two nodes, given a graph;
kneighbors: nodes exactly k links away from a given node (not necessarily along the shortest path)
kminNeighbors: nodes that are minimum k links away from a given node;
diameter: the maximum shortest path across all node pairs;
avePathLength: the average shortest path;
smoothDiameter: the number d at which a threshold fraction p of pairs of nodes are at distance at most d;
vertexEccentricity: the vertex eccentricity of a node is defined as the maximum distance to any other node;
graphRadius: the minimum vertex eccentricity;
distanceDistribution: the distribution of shortest paths in the graph;
numConnTriples: count the number of connected triples in a graph;
numCycles: calculate the number of independent cycles;
cycles3: count all cycles of size 3 in the graph;
loops3rev2: find all cycles of size 3, works for directed graphs;
cycles4: count all cycles of size 4 in the graph;
cycle4nodes: return all 4-tuples of nodes that form cycles of size 4;
numStarMotifs: number of k-tuples that form a “star” subgraph, i.e. a hub node with (k−1) spokes;
[kregular](https://github.com/aeolianine/octave-networks-toolbox/blob/master/kregular.m): build a k-regular graph, i.e. all nodes have **k** links;
[randomGraph](https://github.com/aeolianine/octave-networks-toolbox/blob/master/randomGraph.m): the classic Erdős–Rényi model;
[randomDirectedGraph](https://github.com/aeolianine/octave-networks-toolbox/blob/master/randomDirectedGraph.m): create a random directed graph;
[graphFromDegreeSequence](https://github.com/aeolianine/octave-networks-toolbox/blob/master/graphFromDegreeSequence.m): construct a graph, given a degree sequence deterministically (the Havel-Hakimi algorithm);
[randomGraphFromDegreeSequence](https://github.com/aeolianine/octave-networks-toolbox/blob/master/randomGraphFromDegreeSequence.m): construct a random graph, given a degree sequence;
[randomGraphDegreeDist](https://github.com/aeolianine/octave-networks-toolbox/blob/master/randomGraphDegreeDist.m): construct a random graph, given a degree distribution;
[randomModularGraph](https://github.com/aeolianine/octave-networks-toolbox/blob/master/randomModularGraph.m): a random graph with prescribed number of modules and different density of links within and between modules;
[buildSmaxGraph](https://github.com/aeolianine/octave-networks-toolbox/blob/master/buildSmaxGraph.m): construct the graph with the maximum possible [s-metric](https://github.com/aeolianine/octave-networks-toolbox/blob/master/sMetric.m), given the degree sequence;
[PriceModel](https://github.com/aeolianine/octave-networks-toolbox/blob/master/PriceModel.m): the Price citations growth model;
[preferentialAttachment](https://github.com/aeolianine/octave-networks-toolbox/blob/master/preferentialAttachment.m): the preferential attachment growth model;
[exponentialGrowthModel](https://github.com/aeolianine/octave-networks-toolbox/blob/master/exponentialGrowthModel.m): build a graph with an exponential degree distribution;
[masterEquationGrowthModel](https://github.com/aeolianine/octave-networks-toolbox/blob/master/masterEquationGrowthModel.m): a generalized network growth model, based on the in-degree distribution;
[newmanGastner](https://github.com/aeolianine/octave-networks-toolbox/blob/master/newmanGastner.m): a spatial distribution growth model;
[fabrikantModel](https://github.com/aeolianine/octave-networks-toolbox/blob/master/fabrikantModel.m): yet another spatial distribution growth model;
[DoddsWattsSabel](https://github.com/aeolianine/octave-networks-toolbox/blob/master/DoddsWattsSabel.m): building randomized hierarchies;
[nestedHierarchiesModel](https://github.com/aeolianine/octave-networks-toolbox/blob/master/nestedHierarchiesModel.m): building nested random hierarchies;
[forestFireModel](https://github.com/aeolianine/octave-networks-toolbox/blob/master/forestFireModel.m): forest fire graph model by [Leskovec et al](http://arxiv.org/abs/physics/0603229);
simpleSpectralPartitioning: simple graph partitioning by sorting of the Fiedler vector;
newmanGirvan: a community finding algorithm which uses edge betweenness;
newmanEigenvectorMethod: a community finding algorithm which uses an eigenvector to partition the nodes;
newmanCommFast: community finding algorithm which returns the modularity metric for every possible number of communities;
modularityMetric: measure the strength of a given partition of the nodes of a graph;
louvainCommunityFinding: the first phase of the Louvain method;
[dotMatrixPlot](https://github.com/aeolianine/octave-networks-toolbox/blob/master/dotMatrixPlot.m): matrix sparsity plots with different node orderings;
[drawCircGraph](https://github.com/aeolianine/octave-networks-toolbox/blob/master/drawCircGraph.m): circular visual representation of a graph with nodes ordered by degree;
[radialPlot](https://github.com/aeolianine/octave-networks-toolbox/blob/master/radialPlot.m): plotting nodes radially out from a center/root node (best for sparse graphs)
[el2geom](https://github.com/aeolianine/octave-networks-toolbox/blob/master/el2geom.m): plot a graph given node coordinates with color-coding and thickness of edge weights
[edgeL2cyto](https://github.com/aeolianine/octave-networks-toolbox/blob/master/edgeL2cyto.m): convert an edge list to simple [Cytoscape](http://cytoscape.org) text format;
laplacianMatrix: defined as the degree matrix minus the adjacency;
signlessLaplacian: defined as the degree matrix plus the adjacency;
graphSpectrum: the list of eigenvalues of the Laplacian of the graph;
algebraicConnectivity: the second smallest eigenvalue of the Laplacian of the adjacency matrix of the graph;
fiedlerVector: the vector corresponding to the second smallest eigenvalue of the Laplacian matrix;
graphEnergy: the sum of the absolute values of (the real components of) the eigenvalues of
the adjacency matrix;
<script type="text/javascript"> var _gaq = _gaq || []; _gaq.push(['_setAccount', 'UA-7597435-1']); _gaq.push(['_trackPageview']); (function() { var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); })(); </script>