denise-is-complex
module to measure the complexity of a graph
Install
npm install --save denise-graph-complex-js
Usage
const allPath const data = 1 1 1 1 0 1 0 0 1 0 0 0 0 1 0 0;const vertices = 4;const result = 11 21 7 7 0 4 0 0 7 10 4 4 0 4 0 0;const all = ;assert; const data = 1 1 1 1 0 1 0 0 1 0 0 0 0 1 0 0;const vertices = 4;const result = 218181818181818172333333333333333521428571428571432142857142857143 Infinity175InfinityInfinity 214285714285714325225 225 Infinity175InfinityInfinity;const all = ;assert; const data = 1 1 1 1 0 1 0 0 1 0 0 0 0 1 0 0;const dim = 4;const result = 1111 Infinity1InfinityInfinity 1222 Infinity1InfinityInfinity ;result_isDistance = true
API
meanPath(graph = [], vertices = 0) -> Array
return the mean path matrix for the graph given without passing twice by the same vertice.
allPath(graph = [], vertices = 0) -> Array
return the matrix with all paths possibles without passing twice by the same vertice.
getDistance(graph = [], vertices = 0) -> Array
return the matrix with distances between vertices without passing twice by the same vertice.
getEfficiency(graphDistance = [], vertices = 0)
return the graph efficiency of graph, the graphDistance must be the array returned by getDistance.
getLocalClustering(graph = [], vertices = 0) -> Array
return a array with local clustering.
getGlobalClustering(graphLocalClustering = [], vertices = 0)
return average of local clustering,the graphLocalClustering must be the array returned by getLocalClustering.