Comparison of the official Graphology API against the existing ReScript bindings. Identifies unbound packages and missing methods within partially-bound modules.
Graph analysis metrics.
Graph-level metrics:
density,diameter,modularity,simpleSize,weightedSize,nodeExtent,edgeExtent
Node metrics:
weightedDegree,weightedInDegree,weightedOutDegree,weightedInboundDegree,weightedOutboundDegree,weightedUndirectedDegree,weightedDirectedDegree,eccentricity
Edge metrics:
disparity,simmelianStrength,chiSquare,gSquare
Centrality:
betweennessCentrality,edgeBetweennessCentrality,closenessCentrality,degreeCentrality,inDegreeCentrality,outDegreeCentrality,eigenvectorCentrality,hits,pagerank
Layout quality:
edgeUniformity,neighborhoodPreservation,stress
Community detection via Louvain algorithm.
louvain- returns community partition mappinglouvain.assign- assigns communities as node attributeslouvain.detailed- returns detailed result with modularity, dendrogram, move stats
Connected component analysis.
connectedComponentsforEachConnectedComponentforEachConnectedComponentOrdercountConnectedComponentslargestConnectedComponentlargestConnectedComponentSubgraphcropToLargestConnectedComponentstronglyConnectedComponents
Graph transformation operators.
Unary: subgraph, reverse
Binary: disjointUnion, union
Cast: toDirected, toMixed, toMulti, toSimple, toUndirected
Directed acyclic graph utilities.
hasCyclewillCreateCycletopologicalSorttopologicalGenerationsforEachNodeInTopologicalOrderforEachTopologicalGeneration
K-core decomposition.
coreNumberkCorekShellkCrustkCoronakTrussonionLayers
Graph comparison assertions (except isGraph which is in Utils).
isGraphConstructorhaveSameNodes,haveSameNodesDeepareSameGraphs,areSameGraphsDeephaveSameEdges,haveSameEdgesDeep
isBipartiteBy
GraphML format parser/writer.
parsewrite
Force-directed layout.
forceLayout- synchronous layout computationforceLayout.assign- assign positions to nodesForceSupervisorclass (start,stop,kill,isRunning)
ForceAtlas2 layout algorithm.
forceAtlas2- synchronous computationforceAtlas2.assign- assign positionsforceAtlas2.inferSettings- auto-configure settingsFA2Layoutworker class (start,stop,kill,isRunning)
Anti-collision layout.
noverlap- synchronous computationnoverlap.assign- assign positionsNoverlapLayoutworker class (start,stop,kill,isRunning)
Canvas rendering.
Specialized graph indices (neighborhood index, Louvain index).
| Method | Description |
|---|---|
directedSize |
Number of directed edges |
undirectedSize |
Number of undirected edges |
directedSelfLoopCount |
Number of directed self-loops |
undirectedSelfLoopCount |
Number of undirected self-loops |
| Method | Description |
|---|---|
inDegree |
Incoming edge count |
outDegree |
Outgoing edge count |
directedDegree |
Directed edge count (in + out) |
undirectedDegree |
Undirected edge count |
inDegreeWithoutSelfLoops |
Incoming edges minus self-loops |
outDegreeWithoutSelfLoops |
Outgoing edges minus self-loops |
directedDegreeWithoutSelfLoops |
Directed edges minus self-loops |
undirectedDegreeWithoutSelfLoops |
Undirected edges minus self-loops |
isUndirected |
Check if edge is undirected |
directedEdge |
Get directed edge between two nodes |
undirectedEdge |
Get undirected edge between two nodes |
hasDirectedEdge |
Check directed edge existence |
hasUndirectedEdge |
Check undirected edge existence |
areDirectedNeighbors |
Check directed adjacency |
areUndirectedNeighbors |
Check undirected adjacency |
areInNeighbors |
Check in-neighbor relationship |
areOutNeighbors |
Check out-neighbor relationship |
areInboundNeighbors |
Check inbound neighbor (in + undirected) |
areOutboundNeighbors |
Check outbound neighbor (out + undirected) |
| Method | Description |
|---|---|
addDirectedEdge |
Add a directed edge |
addUndirectedEdge |
Add an undirected edge |
addDirectedEdgeWithKey |
Add directed edge with explicit key |
addUndirectedEdgeWithKey |
Add undirected edge with explicit key |
mergeDirectedEdge |
Merge a directed edge |
mergeUndirectedEdge |
Merge an undirected edge |
mergeDirectedEdgeWithKey |
Merge directed edge with key |
mergeUndirectedEdgeWithKey |
Merge undirected edge with key |
updateDirectedEdge |
Update a directed edge |
updateUndirectedEdge |
Update an undirected edge |
updateDirectedEdgeWithKey |
Update directed edge with key |
updateUndirectedEdgeWithKey |
Update undirected edge with key |
dropDirectedEdge |
Drop a directed edge by source/target |
dropUndirectedEdge |
Drop an undirected edge by source/target |
| Method | Description |
|---|---|
copy |
Deep copy the graph |
emptyCopy |
Copy graph structure without nodes/edges |
nullCopy |
Copy graph settings only |
toJSON |
Serialize graph to JSON |
- Missing
modeoption parameter for early termination (returningtruefrom callback to stop traversal)
star- Star graph generatorbarabasiAlbert- Barabasi-Albert preferential attachment generator
isGraphConstructoraddEdge,copyEdge,mergeEdge,updateEdge(edge helpers)addNode,copyNode(node helpers)
| Package | npm name | Status | Priority |
|---|---|---|---|
| graphology (core) | graphology |
Partially bound (~35 methods missing) | High |
| graphology-metrics | graphology-metrics |
Not bound | High |
| graphology-communities-louvain | graphology-communities-louvain |
Not bound | High |
| graphology-components | graphology-components |
Not bound | High |
| graphology-operators | graphology-operators |
Not bound | High |
| graphology-dag | graphology-dag |
Not bound | Medium |
| graphology-cores | graphology-cores |
Not bound | Medium |
| graphology-layout-forceatlas2 | graphology-layout-forceatlas2 |
Not bound | Medium |
| graphology-layout-force | graphology-layout-force |
Not bound | Medium |
| graphology-layout-noverlap | graphology-layout-noverlap |
Not bound | Medium |
| graphology-assertions | graphology-assertions |
Not bound (except isGraph) |
Low |
| graphology-graphml | graphology-graphml |
Not bound | Low |
| graphology-bipartite | graphology-bipartite |
Not bound | Low |
| graphology-canvas | graphology-canvas |
Not bound | Low |
| graphology-indices | graphology-indices |
Not bound | Low |
| graphology-generators | graphology-generators |
Mostly bound (2 missing) | Low |
| graphology-traversal | graphology-traversal |
Mostly bound (missing options) | Low |
| graphology-utils | graphology-utils |
Mostly bound | Low |
| graphology-shortest-path | graphology-shortest-path |
Fully bound | Done |
| graphology-simple-path | graphology-simple-path |
Fully bound | Done |
| graphology-layout | graphology-layout |
Fully bound | Done |
| graphology-gexf | graphology-gexf |
Fully bound | Done |
| graphology-svg | graphology-svg |
Fully bound | Done |