Spaces:
Build error
Build error
Upload 739 files
Browse filesThis view is limited to 50 files because it contains too many changes. See raw diff
- .gitattributes +1 -0
- Dockerfile +18 -0
- app.py +45 -0
- port.json +5 -0
- requirements.txt +5 -0
- run_docker.ps1 +26 -0
- run_docker.sh +75 -0
- snap-python/mcp_output/README_MCP.md +110 -0
- snap-python/mcp_output/analysis.json +2104 -0
- snap-python/mcp_output/diff_report.md +133 -0
- snap-python/mcp_output/mcp_plugin/__init__.py +0 -0
- snap-python/mcp_output/mcp_plugin/adapter.py +383 -0
- snap-python/mcp_output/mcp_plugin/main.py +13 -0
- snap-python/mcp_output/mcp_plugin/mcp_service.py +271 -0
- snap-python/mcp_output/requirements.txt +5 -0
- snap-python/mcp_output/start_mcp.py +30 -0
- snap-python/mcp_output/workflow_summary.json +209 -0
- snap-python/source/.DS_Store +0 -0
- snap-python/source/CREDITS.txt +34 -0
- snap-python/source/LICENSE +24 -0
- snap-python/source/MANIFEST.in +1 -0
- snap-python/source/Makefile +26 -0
- snap-python/source/Makefile.config +174 -0
- snap-python/source/README.md +112 -0
- snap-python/source/RELEASE.txt +203 -0
- snap-python/source/__init__.py +4 -0
- snap-python/source/dev/__init__.py +1 -0
- snap-python/source/dev/examples/Makefile +14 -0
- snap-python/source/dev/examples/__init__.py +1 -0
- snap-python/source/dev/examples/benchmark.py +431 -0
- snap-python/source/dev/examples/convert.py +220 -0
- snap-python/source/dev/examples/data/p2p-Gnutella08.txt +0 -0
- snap-python/source/dev/examples/demo.graph.dat +3 -0
- snap-python/source/dev/examples/getstats.py +328 -0
- snap-python/source/dev/examples/load.py +11 -0
- snap-python/source/dev/examples/plot_results.py +194 -0
- snap-python/source/dev/examples/public_html/result_table.html +55 -0
- snap-python/source/dev/examples/public_html/result_table_0320-1403.html +47 -0
- snap-python/source/dev/examples/public_html/result_table_0320-1417.html +47 -0
- snap-python/source/dev/examples/public_html/result_table_0320-1420.html +17 -0
- snap-python/source/dev/examples/public_html/result_table_0320-1421.html +19 -0
- snap-python/source/dev/examples/public_html/result_table_0320-1423.html +19 -0
- snap-python/source/dev/examples/public_html/result_table_0321-2331.html +13 -0
- snap-python/source/dev/examples/public_html/result_table_0321-2332.html +61 -0
- snap-python/source/dev/examples/public_html/result_table_0321-2339.html +61 -0
- snap-python/source/dev/examples/public_html/result_table_0321-2340.html +61 -0
- snap-python/source/dev/examples/public_html/results_0320-1303.html +215 -0
- snap-python/source/dev/examples/result3.txt +5 -0
- snap-python/source/dev/examples/results-madmax/BFS_all.txt +300 -0
- snap-python/source/dev/examples/results-madmax/BFS_pref.txt +50 -0
.gitattributes
CHANGED
|
@@ -33,3 +33,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
| 33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
| 33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
| 36 |
+
snap-python/source/dev/examples/demo.graph.dat filter=lfs diff=lfs merge=lfs -text
|
Dockerfile
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
FROM python:3.10
|
| 2 |
+
|
| 3 |
+
RUN useradd -m -u 1000 user && python -m pip install --upgrade pip
|
| 4 |
+
USER user
|
| 5 |
+
ENV PATH="/home/user/.local/bin:$PATH"
|
| 6 |
+
|
| 7 |
+
WORKDIR /app
|
| 8 |
+
|
| 9 |
+
COPY --chown=user ./requirements.txt requirements.txt
|
| 10 |
+
RUN pip install --no-cache-dir --upgrade -r requirements.txt
|
| 11 |
+
|
| 12 |
+
COPY --chown=user . /app
|
| 13 |
+
ENV MCP_TRANSPORT=http
|
| 14 |
+
ENV MCP_PORT=7860
|
| 15 |
+
|
| 16 |
+
EXPOSE 7860
|
| 17 |
+
|
| 18 |
+
CMD ["python", "snap-python/mcp_output/start_mcp.py"]
|
app.py
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from fastapi import FastAPI
|
| 2 |
+
import os
|
| 3 |
+
import sys
|
| 4 |
+
|
| 5 |
+
mcp_plugin_path = os.path.join(os.path.dirname(__file__), "snap-python", "mcp_output", "mcp_plugin")
|
| 6 |
+
sys.path.insert(0, mcp_plugin_path)
|
| 7 |
+
|
| 8 |
+
app = FastAPI(
|
| 9 |
+
title="Snap-Python MCP Service",
|
| 10 |
+
description="Auto-generated MCP service for snap-python",
|
| 11 |
+
version="1.0.0"
|
| 12 |
+
)
|
| 13 |
+
|
| 14 |
+
@app.get("/")
|
| 15 |
+
def root():
|
| 16 |
+
return {
|
| 17 |
+
"service": "Snap-Python MCP Service",
|
| 18 |
+
"version": "1.0.0",
|
| 19 |
+
"status": "running",
|
| 20 |
+
"transport": os.environ.get("MCP_TRANSPORT", "http")
|
| 21 |
+
}
|
| 22 |
+
|
| 23 |
+
@app.get("/health")
|
| 24 |
+
def health_check():
|
| 25 |
+
return {"status": "healthy", "service": "snap-python MCP"}
|
| 26 |
+
|
| 27 |
+
@app.get("/tools")
|
| 28 |
+
def list_tools():
|
| 29 |
+
try:
|
| 30 |
+
from mcp_service import create_app
|
| 31 |
+
mcp_app = create_app()
|
| 32 |
+
tools = []
|
| 33 |
+
for tool_name, tool_func in mcp_app.tools.items():
|
| 34 |
+
tools.append({
|
| 35 |
+
"name": tool_name,
|
| 36 |
+
"description": tool_func.__doc__ or "No description available"
|
| 37 |
+
})
|
| 38 |
+
return {"tools": tools}
|
| 39 |
+
except Exception as e:
|
| 40 |
+
return {"error": f"Failed to load tools: {str(e)}"}
|
| 41 |
+
|
| 42 |
+
if __name__ == "__main__":
|
| 43 |
+
import uvicorn
|
| 44 |
+
port = int(os.environ.get("PORT", 7860))
|
| 45 |
+
uvicorn.run(app, host="0.0.0.0", port=port)
|
port.json
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"repo": "snap-python",
|
| 3 |
+
"port": 7916,
|
| 4 |
+
"timestamp": 1773243382
|
| 5 |
+
}
|
requirements.txt
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
fastmcp
|
| 2 |
+
fastapi
|
| 3 |
+
uvicorn[standard]
|
| 4 |
+
pydantic>=2.0.0
|
| 5 |
+
snapx package modules under source.snapx.snapx
|
run_docker.ps1
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
cd $PSScriptRoot
|
| 2 |
+
$ErrorActionPreference = "Stop"
|
| 3 |
+
$entryName = if ($env:MCP_ENTRY_NAME) { $env:MCP_ENTRY_NAME } else { "snap-python" }
|
| 4 |
+
$entryUrl = if ($env:MCP_ENTRY_URL) { $env:MCP_ENTRY_URL } else { "http://localhost:7916/mcp" }
|
| 5 |
+
$imageName = if ($env:MCP_IMAGE_NAME) { $env:MCP_IMAGE_NAME } else { "snap-python-mcp" }
|
| 6 |
+
$mcpDir = Join-Path $env:USERPROFILE ".cursor"
|
| 7 |
+
$mcpPath = Join-Path $mcpDir "mcp.json"
|
| 8 |
+
if (!(Test-Path $mcpDir)) { New-Item -ItemType Directory -Path $mcpDir | Out-Null }
|
| 9 |
+
$config = @{}
|
| 10 |
+
if (Test-Path $mcpPath) {
|
| 11 |
+
try { $config = Get-Content $mcpPath -Raw | ConvertFrom-Json } catch { $config = @{} }
|
| 12 |
+
}
|
| 13 |
+
$serversOrdered = [ordered]@{}
|
| 14 |
+
if ($config -and ($config.PSObject.Properties.Name -contains "mcpServers") -and $config.mcpServers) {
|
| 15 |
+
$existing = $config.mcpServers
|
| 16 |
+
if ($existing -is [pscustomobject]) {
|
| 17 |
+
foreach ($p in $existing.PSObject.Properties) { if ($p.Name -ne $entryName) { $serversOrdered[$p.Name] = $p.Value } }
|
| 18 |
+
} elseif ($existing -is [System.Collections.IDictionary]) {
|
| 19 |
+
foreach ($k in $existing.Keys) { if ($k -ne $entryName) { $serversOrdered[$k] = $existing[$k] } }
|
| 20 |
+
}
|
| 21 |
+
}
|
| 22 |
+
$serversOrdered[$entryName] = @{ url = $entryUrl }
|
| 23 |
+
$config = @{ mcpServers = $serversOrdered }
|
| 24 |
+
$config | ConvertTo-Json -Depth 10 | Set-Content -Path $mcpPath -Encoding UTF8
|
| 25 |
+
docker build -t $imageName .
|
| 26 |
+
docker run --rm -p 7916:7860 $imageName
|
run_docker.sh
ADDED
|
@@ -0,0 +1,75 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/usr/bin/env bash
|
| 2 |
+
set -euo pipefail
|
| 3 |
+
cd "$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd)"
|
| 4 |
+
mcp_entry_name="${MCP_ENTRY_NAME:-snap-python}"
|
| 5 |
+
mcp_entry_url="${MCP_ENTRY_URL:-http://localhost:7916/mcp}"
|
| 6 |
+
mcp_dir="${HOME}/.cursor"
|
| 7 |
+
mcp_path="${mcp_dir}/mcp.json"
|
| 8 |
+
mkdir -p "${mcp_dir}"
|
| 9 |
+
if command -v python3 >/dev/null 2>&1; then
|
| 10 |
+
python3 - "${mcp_path}" "${mcp_entry_name}" "${mcp_entry_url}" <<'PY'
|
| 11 |
+
import json, os, sys
|
| 12 |
+
path, name, url = sys.argv[1:4]
|
| 13 |
+
cfg = {"mcpServers": {}}
|
| 14 |
+
if os.path.exists(path):
|
| 15 |
+
try:
|
| 16 |
+
with open(path, "r", encoding="utf-8") as f:
|
| 17 |
+
cfg = json.load(f)
|
| 18 |
+
except Exception:
|
| 19 |
+
cfg = {"mcpServers": {}}
|
| 20 |
+
if not isinstance(cfg, dict):
|
| 21 |
+
cfg = {"mcpServers": {}}
|
| 22 |
+
servers = cfg.get("mcpServers")
|
| 23 |
+
if not isinstance(servers, dict):
|
| 24 |
+
servers = {}
|
| 25 |
+
ordered = {}
|
| 26 |
+
for k, v in servers.items():
|
| 27 |
+
if k != name:
|
| 28 |
+
ordered[k] = v
|
| 29 |
+
ordered[name] = {"url": url}
|
| 30 |
+
cfg = {"mcpServers": ordered}
|
| 31 |
+
with open(path, "w", encoding="utf-8") as f:
|
| 32 |
+
json.dump(cfg, f, indent=2, ensure_ascii=False)
|
| 33 |
+
PY
|
| 34 |
+
elif command -v python >/dev/null 2>&1; then
|
| 35 |
+
python - "${mcp_path}" "${mcp_entry_name}" "${mcp_entry_url}" <<'PY'
|
| 36 |
+
import json, os, sys
|
| 37 |
+
path, name, url = sys.argv[1:4]
|
| 38 |
+
cfg = {"mcpServers": {}}
|
| 39 |
+
if os.path.exists(path):
|
| 40 |
+
try:
|
| 41 |
+
with open(path, "r", encoding="utf-8") as f:
|
| 42 |
+
cfg = json.load(f)
|
| 43 |
+
except Exception:
|
| 44 |
+
cfg = {"mcpServers": {}}
|
| 45 |
+
if not isinstance(cfg, dict):
|
| 46 |
+
cfg = {"mcpServers": {}}
|
| 47 |
+
servers = cfg.get("mcpServers")
|
| 48 |
+
if not isinstance(servers, dict):
|
| 49 |
+
servers = {}
|
| 50 |
+
ordered = {}
|
| 51 |
+
for k, v in servers.items():
|
| 52 |
+
if k != name:
|
| 53 |
+
ordered[k] = v
|
| 54 |
+
ordered[name] = {"url": url}
|
| 55 |
+
cfg = {"mcpServers": ordered}
|
| 56 |
+
with open(path, "w", encoding="utf-8") as f:
|
| 57 |
+
json.dump(cfg, f, indent=2, ensure_ascii=False)
|
| 58 |
+
PY
|
| 59 |
+
elif command -v jq >/dev/null 2>&1; then
|
| 60 |
+
name="${mcp_entry_name}"; url="${mcp_entry_url}"
|
| 61 |
+
if [ -f "${mcp_path}" ]; then
|
| 62 |
+
tmp="$(mktemp)"
|
| 63 |
+
jq --arg name "$name" --arg url "$url" '
|
| 64 |
+
.mcpServers = (.mcpServers // {})
|
| 65 |
+
| .mcpServers as $s
|
| 66 |
+
| ($s | with_entries(select(.key != $name))) as $base
|
| 67 |
+
| .mcpServers = ($base + {($name): {"url": $url}})
|
| 68 |
+
' "${mcp_path}" > "${tmp}" && mv "${tmp}" "${mcp_path}"
|
| 69 |
+
else
|
| 70 |
+
printf '{ "mcpServers": { "%s": { "url": "%s" } } }
|
| 71 |
+
' "$name" "$url" > "${mcp_path}"
|
| 72 |
+
fi
|
| 73 |
+
fi
|
| 74 |
+
docker build -t snap-python-mcp .
|
| 75 |
+
docker run --rm -p 7916:7860 snap-python-mcp
|
snap-python/mcp_output/README_MCP.md
ADDED
|
@@ -0,0 +1,110 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# snap-python MCP (Model Context Protocol) Service README
|
| 2 |
+
|
| 3 |
+
## 1) Project Introduction
|
| 4 |
+
|
| 5 |
+
This MCP (Model Context Protocol) service exposes graph analytics capabilities built on top of the `snap-python` repository (Stanford SNAP bindings + `snapx` Pythonic API).
|
| 6 |
+
It is designed for developer workflows where an LLM or client app needs to:
|
| 7 |
+
|
| 8 |
+
- Create/load graphs
|
| 9 |
+
- Run shortest path and connectivity analysis
|
| 10 |
+
- Compute community/centrality metrics
|
| 11 |
+
- Convert between Python data structures and graph objects
|
| 12 |
+
|
| 13 |
+
Main usable layers:
|
| 14 |
+
|
| 15 |
+
- `swig.snap` (high-performance SNAP bindings, broad algorithm coverage)
|
| 16 |
+
- `snapx` (NetworkX-like API wrapping SNAP-style behavior)
|
| 17 |
+
|
| 18 |
+
---
|
| 19 |
+
|
| 20 |
+
## 2) Installation Method
|
| 21 |
+
|
| 22 |
+
### Requirements
|
| 23 |
+
|
| 24 |
+
- Python 3.x
|
| 25 |
+
- `pip`
|
| 26 |
+
- Build toolchain for native extension (C/C++ compiler, SWIG-compatible environment) for `swig.snap` usage
|
| 27 |
+
- Optional: `networkx`, `numpy`, `scipy` for interoperability or specific algorithm paths
|
| 28 |
+
|
| 29 |
+
### Install
|
| 30 |
+
|
| 31 |
+
- Install from repository root:
|
| 32 |
+
- `pip install .`
|
| 33 |
+
- Editable/dev install:
|
| 34 |
+
- `pip install -e .`
|
| 35 |
+
|
| 36 |
+
If native build fails, you can still use pure Python `snapx` portions where applicable, but full SNAP performance/features require successful extension build.
|
| 37 |
+
|
| 38 |
+
---
|
| 39 |
+
|
| 40 |
+
## 3) Quick Start
|
| 41 |
+
|
| 42 |
+
### Basic graph + shortest path (snapx-style)
|
| 43 |
+
|
| 44 |
+
- Create graph with `snapx.classes.graph.Graph` or generators (`snapx.generators.classic.path_graph`)
|
| 45 |
+
- Use unweighted/weighted shortest path modules:
|
| 46 |
+
- `snapx.algorithms.shortest_paths.unweighted.single_source_shortest_path`
|
| 47 |
+
- `snapx.algorithms.shortest_paths.weighted.dijkstra_path`
|
| 48 |
+
|
| 49 |
+
### Core analysis functions (SNAP SWIG layer)
|
| 50 |
+
|
| 51 |
+
Typical high-value functions available in `snap` include:
|
| 52 |
+
|
| 53 |
+
- Connectivity: `GetWccs`, `GetSccs`, `IsConnected`, `GetMxWcc`
|
| 54 |
+
- Path/BFS: `GetBfsTree`, `GetShortPath`, `GetBfsEffDiam`
|
| 55 |
+
- Centrality: `GetDegreeCentr`, `GetClosenessCentr`, `GetBetweennessCentr`
|
| 56 |
+
- Community: `CommunityCNM`, `CommunityGirvanNewman`
|
| 57 |
+
- Generation: `GenRndGnm`, `GenPrefAttach`, `GenSmallWorld`, `GenRMat`
|
| 58 |
+
|
| 59 |
+
---
|
| 60 |
+
|
| 61 |
+
## 4) Available Tools and Endpoints List
|
| 62 |
+
|
| 63 |
+
Recommended MCP (Model Context Protocol) service surface (developer-oriented grouping):
|
| 64 |
+
|
| 65 |
+
- `graph.create`
|
| 66 |
+
- Create empty/path/basic graphs (snapx generators, SNAP constructors)
|
| 67 |
+
- `graph.load`
|
| 68 |
+
- Load edge lists / persisted graphs (`LoadEdgeList`, `*_Load`)
|
| 69 |
+
- `graph.convert`
|
| 70 |
+
- Convert dict-of-dicts and Python structures (`to_snapx_graph`, `from_dict_of_dicts`)
|
| 71 |
+
- `analysis.connectivity`
|
| 72 |
+
- Components and connectedness (`connected_components`, `GetWccs`, `GetSccs`)
|
| 73 |
+
- `analysis.shortest_path`
|
| 74 |
+
- Unweighted + Dijkstra + all-pairs (`single_source_shortest_path`, `dijkstra_path`, `johnson`)
|
| 75 |
+
- `analysis.centrality`
|
| 76 |
+
- Degree/closeness/betweenness/eigenvector variants
|
| 77 |
+
- `analysis.community`
|
| 78 |
+
- CNM and Girvan-Newman community detection
|
| 79 |
+
- `analysis.stats`
|
| 80 |
+
- Degree distributions, triads, clustering, diameter/ANF estimates
|
| 81 |
+
- `graph.relabel`
|
| 82 |
+
- Node relabel operations (`relabel_nodes`, integer relabeling)
|
| 83 |
+
|
| 84 |
+
Note: Repository does not define a ready-made CLI endpoint set; expose these as MCP (Model Context Protocol) service methods in your host runtime.
|
| 85 |
+
|
| 86 |
+
---
|
| 87 |
+
|
| 88 |
+
## 5) Common Issues and Notes
|
| 89 |
+
|
| 90 |
+
- Native build friction:
|
| 91 |
+
- Most installation issues come from missing compiler/SWIG toolchain.
|
| 92 |
+
- Mixed API layers:
|
| 93 |
+
- `swig.snap` and `snapx` overlap conceptually; keep service contracts explicit about which backend each endpoint uses.
|
| 94 |
+
- Performance:
|
| 95 |
+
- Prefer SWIG SNAP functions for large graphs and heavy analytics.
|
| 96 |
+
- Compatibility:
|
| 97 |
+
- Some conversion paths may assume NetworkX-like inputs.
|
| 98 |
+
- Testing/examples:
|
| 99 |
+
- Use `test/` and `examples/` as validation references for endpoint behavior and expected outputs.
|
| 100 |
+
|
| 101 |
+
---
|
| 102 |
+
|
| 103 |
+
## 6) Reference Links / Documentation
|
| 104 |
+
|
| 105 |
+
- Repository: https://github.com/snap-stanford/snap-python
|
| 106 |
+
- Root docs: `README.md`, `troubleshooting.md`, `RELEASE.txt`
|
| 107 |
+
- SWIG notes: `swig/README.txt`
|
| 108 |
+
- Docker/environment help: `docker/README.md`
|
| 109 |
+
- Examples: `examples/`, `dev/examples/`
|
| 110 |
+
- Tests: `test/`, `dev/test/`
|
snap-python/mcp_output/analysis.json
ADDED
|
@@ -0,0 +1,2104 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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repository_url": "https://github.com/snap-stanford/snap-python",
|
| 4 |
+
"summary": "Imported via zip fallback, file count: 238",
|
| 5 |
+
"file_tree": {
|
| 6 |
+
"CREDITS.txt": {
|
| 7 |
+
"size": 1015
|
| 8 |
+
},
|
| 9 |
+
"README.md": {
|
| 10 |
+
"size": 4798
|
| 11 |
+
},
|
| 12 |
+
"RELEASE.txt": {
|
| 13 |
+
"size": 8899
|
| 14 |
+
},
|
| 15 |
+
"dev/examples/benchmark.py": {
|
| 16 |
+
"size": 13737
|
| 17 |
+
},
|
| 18 |
+
"dev/examples/convert.py": {
|
| 19 |
+
"size": 6243
|
| 20 |
+
},
|
| 21 |
+
"dev/examples/data/p2p-Gnutella08.txt": {
|
| 22 |
+
"size": 194493
|
| 23 |
+
},
|
| 24 |
+
"dev/examples/getstats.py": {
|
| 25 |
+
"size": 9553
|
| 26 |
+
},
|
| 27 |
+
"dev/examples/load.py": {
|
| 28 |
+
"size": 207
|
| 29 |
+
},
|
| 30 |
+
"dev/examples/plot_results.py": {
|
| 31 |
+
"size": 5349
|
| 32 |
+
},
|
| 33 |
+
"dev/examples/result3.txt": {
|
| 34 |
+
"size": 131
|
| 35 |
+
},
|
| 36 |
+
"dev/examples/results-madmax/BFS_all.txt": {
|
| 37 |
+
"size": 5183
|
| 38 |
+
},
|
| 39 |
+
"dev/examples/results-madmax/BFS_pref.txt": {
|
| 40 |
+
"size": 868
|
| 41 |
+
},
|
| 42 |
+
"dev/examples/results-madmax/BFS_prefdeg3.txt": {
|
| 43 |
+
"size": 866
|
| 44 |
+
},
|
| 45 |
+
"dev/examples/results-madmax/BFS_rmat.txt": {
|
| 46 |
+
"size": 864
|
| 47 |
+
},
|
| 48 |
+
"dev/examples/results-madmax/BFS_rmatdeg3.txt": {
|
| 49 |
+
"size": 861
|
| 50 |
+
},
|
| 51 |
+
"dev/examples/results-madmax/BFS_sw.txt": {
|
| 52 |
+
"size": 864
|
| 53 |
+
},
|
| 54 |
+
"dev/examples/results-madmax/BFS_swdeg3.txt": {
|
| 55 |
+
"size": 860
|
| 56 |
+
},
|
| 57 |
+
"dev/examples/results-madmax/triads_all.txt": {
|
| 58 |
+
"size": 5163
|
| 59 |
+
},
|
| 60 |
+
"dev/examples/results-madmax/triads_pref.txt": {
|
| 61 |
+
"size": 863
|
| 62 |
+
},
|
| 63 |
+
"dev/examples/results-madmax/triads_prefdeg3.txt": {
|
| 64 |
+
"size": 860
|
| 65 |
+
},
|
| 66 |
+
"dev/examples/results-madmax/triads_rmat.txt": {
|
| 67 |
+
"size": 862
|
| 68 |
+
},
|
| 69 |
+
"dev/examples/results-madmax/triads_rmatdeg3.txt": {
|
| 70 |
+
"size": 860
|
| 71 |
+
},
|
| 72 |
+
"dev/examples/results-madmax/triads_sw.txt": {
|
| 73 |
+
"size": 861
|
| 74 |
+
},
|
| 75 |
+
"dev/examples/results-madmax/triads_swdeg3.txt": {
|
| 76 |
+
"size": 857
|
| 77 |
+
},
|
| 78 |
+
"dev/examples/snapswig-check.py": {
|
| 79 |
+
"size": 1191
|
| 80 |
+
},
|
| 81 |
+
"dev/examples/tneanet-cpp.py": {
|
| 82 |
+
"size": 262
|
| 83 |
+
},
|
| 84 |
+
"dev/examples/tneanet.py": {
|
| 85 |
+
"size": 9117
|
| 86 |
+
},
|
| 87 |
+
"dev/examples/tnodei.py": {
|
| 88 |
+
"size": 76
|
| 89 |
+
},
|
| 90 |
+
"dev/examples/tungraph.py": {
|
| 91 |
+
"size": 2674
|
| 92 |
+
},
|
| 93 |
+
"dev/examples/vector_comp.py": {
|
| 94 |
+
"size": 1563
|
| 95 |
+
},
|
| 96 |
+
"dev/swig-r/snappy.py": {
|
| 97 |
+
"size": 1067
|
| 98 |
+
},
|
| 99 |
+
"dev/test/adjlist.py": {
|
| 100 |
+
"size": 2256
|
| 101 |
+
},
|
| 102 |
+
"dev/test/data/p2p-Gnutella08.txt": {
|
| 103 |
+
"size": 194493
|
| 104 |
+
},
|
| 105 |
+
"dev/test/genrnd.py": {
|
| 106 |
+
"size": 847
|
| 107 |
+
},
|
| 108 |
+
"dev/test/hash.py": {
|
| 109 |
+
"size": 2654
|
| 110 |
+
},
|
| 111 |
+
"dev/test/hkey.py": {
|
| 112 |
+
"size": 390
|
| 113 |
+
},
|
| 114 |
+
"dev/test/install-dir.py": {
|
| 115 |
+
"size": 542
|
| 116 |
+
},
|
| 117 |
+
"dev/test/memtest.py": {
|
| 118 |
+
"size": 471
|
| 119 |
+
},
|
| 120 |
+
"dev/test/printstat.py": {
|
| 121 |
+
"size": 472
|
| 122 |
+
},
|
| 123 |
+
"dev/test/readvec.py": {
|
| 124 |
+
"size": 428
|
| 125 |
+
},
|
| 126 |
+
"dev/test/results-sheridan/coeff.txt": {
|
| 127 |
+
"size": 24
|
| 128 |
+
},
|
| 129 |
+
"dev/test/results-sheridan/pref-CDD.txt": {
|
| 130 |
+
"size": 139
|
| 131 |
+
},
|
| 132 |
+
"dev/test/results-sheridan/pref-ClustCoef.txt": {
|
| 133 |
+
"size": 139
|
| 134 |
+
},
|
| 135 |
+
"dev/test/results-sheridan/pref-DD.txt": {
|
| 136 |
+
"size": 139
|
| 137 |
+
},
|
| 138 |
+
"dev/test/results-sheridan/pref-HOP.txt": {
|
| 139 |
+
"size": 139
|
| 140 |
+
},
|
| 141 |
+
"dev/test/results-sheridan/pref-SVal.txt": {
|
| 142 |
+
"size": 140
|
| 143 |
+
},
|
| 144 |
+
"dev/test/results-sheridan/pref-SVec.txt": {
|
| 145 |
+
"size": 139
|
| 146 |
+
},
|
| 147 |
+
"dev/test/results-sheridan/pref-Scc.txt": {
|
| 148 |
+
"size": 139
|
| 149 |
+
},
|
| 150 |
+
"dev/test/results-sheridan/pref-Wcc.txt": {
|
| 151 |
+
"size": 139
|
| 152 |
+
},
|
| 153 |
+
"dev/test/results-sheridan/pref-info.txt": {
|
| 154 |
+
"size": 139
|
| 155 |
+
},
|
| 156 |
+
"dev/test/results-sheridan/rmat-CDD.txt": {
|
| 157 |
+
"size": 140
|
| 158 |
+
},
|
| 159 |
+
"dev/test/results-sheridan/rmat-ClustCoef.txt": {
|
| 160 |
+
"size": 140
|
| 161 |
+
},
|
| 162 |
+
"dev/test/results-sheridan/rmat-DD.txt": {
|
| 163 |
+
"size": 140
|
| 164 |
+
},
|
| 165 |
+
"dev/test/results-sheridan/rmat-HOP.txt": {
|
| 166 |
+
"size": 140
|
| 167 |
+
},
|
| 168 |
+
"dev/test/results-sheridan/rmat-SVal.txt": {
|
| 169 |
+
"size": 140
|
| 170 |
+
},
|
| 171 |
+
"dev/test/results-sheridan/rmat-SVec.txt": {
|
| 172 |
+
"size": 140
|
| 173 |
+
},
|
| 174 |
+
"dev/test/results-sheridan/rmat-Scc.txt": {
|
| 175 |
+
"size": 140
|
| 176 |
+
},
|
| 177 |
+
"dev/test/results-sheridan/rmat-Wcc.txt": {
|
| 178 |
+
"size": 140
|
| 179 |
+
},
|
| 180 |
+
"dev/test/results-sheridan/rmat-info.txt": {
|
| 181 |
+
"size": 140
|
| 182 |
+
},
|
| 183 |
+
"dev/test/results-sheridan/sw-CDD.txt": {
|
| 184 |
+
"size": 208
|
| 185 |
+
},
|
| 186 |
+
"dev/test/results-sheridan/sw-ClustCoef.txt": {
|
| 187 |
+
"size": 208
|
| 188 |
+
},
|
| 189 |
+
"dev/test/results-sheridan/sw-DD.txt": {
|
| 190 |
+
"size": 208
|
| 191 |
+
},
|
| 192 |
+
"dev/test/results-sheridan/sw-HOP.txt": {
|
| 193 |
+
"size": 208
|
| 194 |
+
},
|
| 195 |
+
"dev/test/results-sheridan/sw-SVal.txt": {
|
| 196 |
+
"size": 187
|
| 197 |
+
},
|
| 198 |
+
"dev/test/results-sheridan/sw-SVec.txt": {
|
| 199 |
+
"size": 187
|
| 200 |
+
},
|
| 201 |
+
"dev/test/results-sheridan/sw-Scc.txt": {
|
| 202 |
+
"size": 208
|
| 203 |
+
},
|
| 204 |
+
"dev/test/results-sheridan/sw-Wcc.txt": {
|
| 205 |
+
"size": 208
|
| 206 |
+
},
|
| 207 |
+
"dev/test/results-sheridan/sw-info.txt": {
|
| 208 |
+
"size": 208
|
| 209 |
+
},
|
| 210 |
+
"dev/test/tungraph.py": {
|
| 211 |
+
"size": 2714
|
| 212 |
+
},
|
| 213 |
+
"dev/test/vec.py": {
|
| 214 |
+
"size": 1487
|
| 215 |
+
},
|
| 216 |
+
"doc/README-DOC.TXT": {
|
| 217 |
+
"size": 3253
|
| 218 |
+
},
|
| 219 |
+
"doc/guide.txt": {
|
| 220 |
+
"size": 653
|
| 221 |
+
},
|
| 222 |
+
"doc/source/conf.py": {
|
| 223 |
+
"size": 8055
|
| 224 |
+
},
|
| 225 |
+
"doc/todo.txt": {
|
| 226 |
+
"size": 567
|
| 227 |
+
},
|
| 228 |
+
"docker/README.md": {
|
| 229 |
+
"size": 11893
|
| 230 |
+
},
|
| 231 |
+
"docker/requirements.txt": {
|
| 232 |
+
"size": 138
|
| 233 |
+
},
|
| 234 |
+
"examples/benchmark.py": {
|
| 235 |
+
"size": 14022
|
| 236 |
+
},
|
| 237 |
+
"examples/data/p2p-Gnutella08.txt": {
|
| 238 |
+
"size": 194493
|
| 239 |
+
},
|
| 240 |
+
"examples/stackoverflow/doJoin.py": {
|
| 241 |
+
"size": 1516
|
| 242 |
+
},
|
| 243 |
+
"examples/stackoverflow/getAnswers.py": {
|
| 244 |
+
"size": 1438
|
| 245 |
+
},
|
| 246 |
+
"examples/stackoverflow/getQuestions.py": {
|
| 247 |
+
"size": 1675
|
| 248 |
+
},
|
| 249 |
+
"examples/stackoverflow/getStats.py": {
|
| 250 |
+
"size": 2111
|
| 251 |
+
},
|
| 252 |
+
"examples/stackoverflow/getTag.py": {
|
| 253 |
+
"size": 1599
|
| 254 |
+
},
|
| 255 |
+
"examples/tneanet.py": {
|
| 256 |
+
"size": 9115
|
| 257 |
+
},
|
| 258 |
+
"hellotest/setup.py": {
|
| 259 |
+
"size": 148
|
| 260 |
+
},
|
| 261 |
+
"setup.py": {
|
| 262 |
+
"size": 1596
|
| 263 |
+
},
|
| 264 |
+
"setup/setup.py": {
|
| 265 |
+
"size": 2613
|
| 266 |
+
},
|
| 267 |
+
"setup/snap.py": {
|
| 268 |
+
"size": 524313
|
| 269 |
+
},
|
| 270 |
+
"snapx/README.md": {
|
| 271 |
+
"size": 2732
|
| 272 |
+
},
|
| 273 |
+
"snapx/setup.py": {
|
| 274 |
+
"size": 293
|
| 275 |
+
},
|
| 276 |
+
"snapx/snapx/__init__.py": {
|
| 277 |
+
"size": 271
|
| 278 |
+
},
|
| 279 |
+
"snapx/snapx/algorithms/__init__.py": {
|
| 280 |
+
"size": 171
|
| 281 |
+
},
|
| 282 |
+
"snapx/snapx/algorithms/centrality/__init__.py": {
|
| 283 |
+
"size": 24
|
| 284 |
+
},
|
| 285 |
+
"snapx/snapx/algorithms/centrality/snap_cent.py": {
|
| 286 |
+
"size": 115
|
| 287 |
+
},
|
| 288 |
+
"snapx/snapx/algorithms/community/__init__.py": {
|
| 289 |
+
"size": 50
|
| 290 |
+
},
|
| 291 |
+
"snapx/snapx/algorithms/community/snap_cmty.py": {
|
| 292 |
+
"size": 368
|
| 293 |
+
},
|
| 294 |
+
"snapx/snapx/algorithms/components/__init__.py": {
|
| 295 |
+
"size": 26
|
| 296 |
+
},
|
| 297 |
+
"snapx/snapx/algorithms/components/components.py": {
|
| 298 |
+
"size": 3784
|
| 299 |
+
},
|
| 300 |
+
"snapx/snapx/algorithms/dag.py": {
|
| 301 |
+
"size": 28823
|
| 302 |
+
},
|
| 303 |
+
"snapx/snapx/algorithms/shortest_paths/__init__.py": {
|
| 304 |
+
"size": 112
|
| 305 |
+
},
|
| 306 |
+
"snapx/snapx/algorithms/shortest_paths/unweighted.py": {
|
| 307 |
+
"size": 14520
|
| 308 |
+
},
|
| 309 |
+
"snapx/snapx/algorithms/shortest_paths/weighted.py": {
|
| 310 |
+
"size": 72792
|
| 311 |
+
},
|
| 312 |
+
"snapx/snapx/classes/__init__.py": {
|
| 313 |
+
"size": 168
|
| 314 |
+
},
|
| 315 |
+
"snapx/snapx/classes/_nodeiter.py": {
|
| 316 |
+
"size": 2521
|
| 317 |
+
},
|
| 318 |
+
"snapx/snapx/classes/attrdict.py": {
|
| 319 |
+
"size": 7278
|
| 320 |
+
},
|
| 321 |
+
"snapx/snapx/classes/coreviews.py": {
|
| 322 |
+
"size": 7082
|
| 323 |
+
},
|
| 324 |
+
"snapx/snapx/classes/digraph.py": {
|
| 325 |
+
"size": 40018
|
| 326 |
+
},
|
| 327 |
+
"snapx/snapx/classes/filters.py": {
|
| 328 |
+
"size": 1756
|
| 329 |
+
},
|
| 330 |
+
"snapx/snapx/classes/function.py": {
|
| 331 |
+
"size": 9997
|
| 332 |
+
},
|
| 333 |
+
"snapx/snapx/classes/graph.py": {
|
| 334 |
+
"size": 51329
|
| 335 |
+
},
|
| 336 |
+
"snapx/snapx/classes/graphviews.py": {
|
| 337 |
+
"size": 4930
|
| 338 |
+
},
|
| 339 |
+
"snapx/snapx/classes/reportviews.py": {
|
| 340 |
+
"size": 7755
|
| 341 |
+
},
|
| 342 |
+
"snapx/snapx/classes/tests/__init__.py": {
|
| 343 |
+
"size": 12
|
| 344 |
+
},
|
| 345 |
+
"snapx/snapx/classes/tests/test_attrdict.py": {
|
| 346 |
+
"size": 3830
|
| 347 |
+
},
|
| 348 |
+
"snapx/snapx/classes/tests/test_coreviews.py": {
|
| 349 |
+
"size": 4165
|
| 350 |
+
},
|
| 351 |
+
"snapx/snapx/classes/tests/test_graph.py": {
|
| 352 |
+
"size": 26667
|
| 353 |
+
},
|
| 354 |
+
"snapx/snapx/classes/tests/test_reportviews.py": {
|
| 355 |
+
"size": 14382
|
| 356 |
+
},
|
| 357 |
+
"snapx/snapx/convert.py": {
|
| 358 |
+
"size": 8514
|
| 359 |
+
},
|
| 360 |
+
"snapx/snapx/exception.py": {
|
| 361 |
+
"size": 1082
|
| 362 |
+
},
|
| 363 |
+
"snapx/snapx/generators/__init__.py": {
|
| 364 |
+
"size": 74
|
| 365 |
+
},
|
| 366 |
+
"snapx/snapx/generators/classic.py": {
|
| 367 |
+
"size": 4037
|
| 368 |
+
},
|
| 369 |
+
"snapx/snapx/generators/ego.py": {
|
| 370 |
+
"size": 2150
|
| 371 |
+
},
|
| 372 |
+
"snapx/snapx/relabel.py": {
|
| 373 |
+
"size": 7699
|
| 374 |
+
},
|
| 375 |
+
"snapx/snapx/testing/__init__.py": {
|
| 376 |
+
"size": 35
|
| 377 |
+
},
|
| 378 |
+
"snapx/snapx/testing/utils.py": {
|
| 379 |
+
"size": 1780
|
| 380 |
+
},
|
| 381 |
+
"snapx/snapx/utils/__init__.py": {
|
| 382 |
+
"size": 68
|
| 383 |
+
},
|
| 384 |
+
"snapx/snapx/utils/decorator.py": {
|
| 385 |
+
"size": 17222
|
| 386 |
+
},
|
| 387 |
+
"snapx/snapx/utils/decorators.py": {
|
| 388 |
+
"size": 3454
|
| 389 |
+
},
|
| 390 |
+
"snapx/snapx/utils/misc.py": {
|
| 391 |
+
"size": 577
|
| 392 |
+
},
|
| 393 |
+
"swig/README.txt": {
|
| 394 |
+
"size": 3310
|
| 395 |
+
},
|
| 396 |
+
"swig/gen/NOTES.TXT": {
|
| 397 |
+
"size": 3315
|
| 398 |
+
},
|
| 399 |
+
"swig/gen/disp-custom.py": {
|
| 400 |
+
"size": 6928
|
| 401 |
+
},
|
| 402 |
+
"swig/gen/dispatch-pneanet.txt": {
|
| 403 |
+
"size": 2480
|
| 404 |
+
},
|
| 405 |
+
"swig/gen/dispatch-pngraph.txt": {
|
| 406 |
+
"size": 2480
|
| 407 |
+
},
|
| 408 |
+
"swig/gen/dispatch-pngraphmp.txt": {
|
| 409 |
+
"size": 2534
|
| 410 |
+
},
|
| 411 |
+
"swig/gen/dispatch-pungraph.txt": {
|
| 412 |
+
"size": 2599
|
| 413 |
+
},
|
| 414 |
+
"swig/gen/dispatch.txt": {
|
| 415 |
+
"size": 10093
|
| 416 |
+
},
|
| 417 |
+
"swig/gen/genClassFn/README.txt": {
|
| 418 |
+
"size": 1193
|
| 419 |
+
},
|
| 420 |
+
"swig/gen/genClassFn/archive/README.txt": {
|
| 421 |
+
"size": 698
|
| 422 |
+
},
|
| 423 |
+
"swig/gen/genClassFn/archive/classFn.txt": {
|
| 424 |
+
"size": 266
|
| 425 |
+
},
|
| 426 |
+
"swig/gen/genClassFn/archive/classFnDef.txt": {
|
| 427 |
+
"size": 2415
|
| 428 |
+
},
|
| 429 |
+
"swig/gen/genClassFn/archive/classFnExt.txt": {
|
| 430 |
+
"size": 7672
|
| 431 |
+
},
|
| 432 |
+
"swig/gen/genClassFn/archive/genClassFnExt.py": {
|
| 433 |
+
"size": 2702
|
| 434 |
+
},
|
| 435 |
+
"swig/gen/genClassFn/classFn.txt": {
|
| 436 |
+
"size": 1728
|
| 437 |
+
},
|
| 438 |
+
"swig/gen/genClassFn/genPyClassFn.py": {
|
| 439 |
+
"size": 589
|
| 440 |
+
},
|
| 441 |
+
"swig/gen/gendispatch.py": {
|
| 442 |
+
"size": 1874
|
| 443 |
+
},
|
| 444 |
+
"swig/gen/gentypes.py": {
|
| 445 |
+
"size": 823
|
| 446 |
+
},
|
| 447 |
+
"swig/gen/hashes.txt": {
|
| 448 |
+
"size": 616
|
| 449 |
+
},
|
| 450 |
+
"swig/gen/types.txt": {
|
| 451 |
+
"size": 2858
|
| 452 |
+
},
|
| 453 |
+
"swig/gen/vectors.txt": {
|
| 454 |
+
"size": 969
|
| 455 |
+
},
|
| 456 |
+
"swig/setup.py": {
|
| 457 |
+
"size": 2136
|
| 458 |
+
},
|
| 459 |
+
"swig/snap/__init__.py": {
|
| 460 |
+
"size": 509
|
| 461 |
+
},
|
| 462 |
+
"test/adjlist.py": {
|
| 463 |
+
"size": 2286
|
| 464 |
+
},
|
| 465 |
+
"test/attributes.py": {
|
| 466 |
+
"size": 1128
|
| 467 |
+
},
|
| 468 |
+
"test/attrtest.py": {
|
| 469 |
+
"size": 804
|
| 470 |
+
},
|
| 471 |
+
"test/bfs.py": {
|
| 472 |
+
"size": 1529
|
| 473 |
+
},
|
| 474 |
+
"test/bug-2015-130-GetRndNI.py": {
|
| 475 |
+
"size": 146
|
| 476 |
+
},
|
| 477 |
+
"test/bug-2015-18-attr.py": {
|
| 478 |
+
"size": 1074
|
| 479 |
+
},
|
| 480 |
+
"test/bug-20150706-pagerank.py": {
|
| 481 |
+
"size": 160
|
| 482 |
+
},
|
| 483 |
+
"test/bug-328-cnm.py": {
|
| 484 |
+
"size": 170
|
| 485 |
+
},
|
| 486 |
+
"test/bug-585-genrndpowerlaw.py": {
|
| 487 |
+
"size": 171
|
| 488 |
+
},
|
| 489 |
+
"test/bug-AddFltAttrN.py": {
|
| 490 |
+
"size": 492
|
| 491 |
+
},
|
| 492 |
+
"test/bug-attr-mem.py": {
|
| 493 |
+
"size": 3056
|
| 494 |
+
},
|
| 495 |
+
"test/cncom.py": {
|
| 496 |
+
"size": 1602
|
| 497 |
+
},
|
| 498 |
+
"test/cpm_communities.py": {
|
| 499 |
+
"size": 671
|
| 500 |
+
},
|
| 501 |
+
"test/data/cooccurrence.txt": {
|
| 502 |
+
"size": 222
|
| 503 |
+
},
|
| 504 |
+
"test/data/data-table.txt": {
|
| 505 |
+
"size": 89
|
| 506 |
+
},
|
| 507 |
+
"test/data/example-LoadConnListStr.txt": {
|
| 508 |
+
"size": 12
|
| 509 |
+
},
|
| 510 |
+
"test/data/final_sorted_edges.txt": {
|
| 511 |
+
"size": 524313
|
| 512 |
+
},
|
| 513 |
+
"test/data/p2p-Gnutella08.txt": {
|
| 514 |
+
"size": 194498
|
| 515 |
+
},
|
| 516 |
+
"test/data/test-509.txt": {
|
| 517 |
+
"size": 12
|
| 518 |
+
},
|
| 519 |
+
"test/delnode.py": {
|
| 520 |
+
"size": 1141
|
| 521 |
+
},
|
| 522 |
+
"test/demo-random.py": {
|
| 523 |
+
"size": 505
|
| 524 |
+
},
|
| 525 |
+
"test/except.py": {
|
| 526 |
+
"size": 497
|
| 527 |
+
},
|
| 528 |
+
"test/genrnd.py": {
|
| 529 |
+
"size": 863
|
| 530 |
+
},
|
| 531 |
+
"test/getidv.py": {
|
| 532 |
+
"size": 207
|
| 533 |
+
},
|
| 534 |
+
"test/gnuplot.py": {
|
| 535 |
+
"size": 139
|
| 536 |
+
},
|
| 537 |
+
"test/graphviz.py": {
|
| 538 |
+
"size": 315
|
| 539 |
+
},
|
| 540 |
+
"test/hash.py": {
|
| 541 |
+
"size": 2688
|
| 542 |
+
},
|
| 543 |
+
"test/hkey.py": {
|
| 544 |
+
"size": 407
|
| 545 |
+
},
|
| 546 |
+
"test/intro.py": {
|
| 547 |
+
"size": 3055
|
| 548 |
+
},
|
| 549 |
+
"test/make-graph.py": {
|
| 550 |
+
"size": 749
|
| 551 |
+
},
|
| 552 |
+
"test/make-tab.py": {
|
| 553 |
+
"size": 330
|
| 554 |
+
},
|
| 555 |
+
"test/net.py": {
|
| 556 |
+
"size": 9161
|
| 557 |
+
},
|
| 558 |
+
"test/ops.py": {
|
| 559 |
+
"size": 2989
|
| 560 |
+
},
|
| 561 |
+
"test/ops1.py": {
|
| 562 |
+
"size": 1078
|
| 563 |
+
},
|
| 564 |
+
"test/pagerank.py": {
|
| 565 |
+
"size": 490
|
| 566 |
+
},
|
| 567 |
+
"test/plotdeg.py": {
|
| 568 |
+
"size": 368
|
| 569 |
+
},
|
| 570 |
+
"test/printsnap.py": {
|
| 571 |
+
"size": 59
|
| 572 |
+
},
|
| 573 |
+
"test/printstat.py": {
|
| 574 |
+
"size": 511
|
| 575 |
+
},
|
| 576 |
+
"test/props.py": {
|
| 577 |
+
"size": 594
|
| 578 |
+
},
|
| 579 |
+
"test/quick_test.py": {
|
| 580 |
+
"size": 291
|
| 581 |
+
},
|
| 582 |
+
"test/readgraph.py": {
|
| 583 |
+
"size": 2682
|
| 584 |
+
},
|
| 585 |
+
"test/readvec.py": {
|
| 586 |
+
"size": 439
|
| 587 |
+
},
|
| 588 |
+
"test/rnd.py": {
|
| 589 |
+
"size": 330
|
| 590 |
+
},
|
| 591 |
+
"test/snap-test-pylayer.py": {
|
| 592 |
+
"size": 137859
|
| 593 |
+
},
|
| 594 |
+
"test/snap-test.py": {
|
| 595 |
+
"size": 138461
|
| 596 |
+
},
|
| 597 |
+
"test/table-test-avery.py": {
|
| 598 |
+
"size": 3128
|
| 599 |
+
},
|
| 600 |
+
"test/test-131-setiter.py": {
|
| 601 |
+
"size": 334
|
| 602 |
+
},
|
| 603 |
+
"test/test-2015-18a-attr.py": {
|
| 604 |
+
"size": 1365
|
| 605 |
+
},
|
| 606 |
+
"test/test-2015-298.py": {
|
| 607 |
+
"size": 576
|
| 608 |
+
},
|
| 609 |
+
"test/test-20160801-LoadConnListStr.py": {
|
| 610 |
+
"size": 407
|
| 611 |
+
},
|
| 612 |
+
"test/test-20180416-table.py": {
|
| 613 |
+
"size": 805
|
| 614 |
+
},
|
| 615 |
+
"test/test-346-getei.py": {
|
| 616 |
+
"size": 917
|
| 617 |
+
},
|
| 618 |
+
"test/test-356-getei.py": {
|
| 619 |
+
"size": 545
|
| 620 |
+
},
|
| 621 |
+
"test/test-374-addstrattrdate.py": {
|
| 622 |
+
"size": 330
|
| 623 |
+
},
|
| 624 |
+
"test/test-384-deledge.py": {
|
| 625 |
+
"size": 205
|
| 626 |
+
},
|
| 627 |
+
"test/test-509-load.py": {
|
| 628 |
+
"size": 390
|
| 629 |
+
},
|
| 630 |
+
"test/test-582-getnodewcc.py": {
|
| 631 |
+
"size": 209
|
| 632 |
+
},
|
| 633 |
+
"test/test-585-genrndpowerlaw.py": {
|
| 634 |
+
"size": 57
|
| 635 |
+
},
|
| 636 |
+
"test/test-613-getbfstree.py": {
|
| 637 |
+
"size": 453
|
| 638 |
+
},
|
| 639 |
+
"test/test-GetBetweennessCentr.py": {
|
| 640 |
+
"size": 1035
|
| 641 |
+
},
|
| 642 |
+
"test/test-GetClosenessCentr.py": {
|
| 643 |
+
"size": 614
|
| 644 |
+
},
|
| 645 |
+
"test/test-GetFarnessCentr.py": {
|
| 646 |
+
"size": 596
|
| 647 |
+
},
|
| 648 |
+
"test/test-THashKeyDatI.py": {
|
| 649 |
+
"size": 178
|
| 650 |
+
},
|
| 651 |
+
"test/test-emptystr.py": {
|
| 652 |
+
"size": 353
|
| 653 |
+
},
|
| 654 |
+
"test/test-girvan-newman.py": {
|
| 655 |
+
"size": 710
|
| 656 |
+
},
|
| 657 |
+
"test/test-gnuplot.py": {
|
| 658 |
+
"size": 121
|
| 659 |
+
},
|
| 660 |
+
"test/test-graphviz.py": {
|
| 661 |
+
"size": 109
|
| 662 |
+
},
|
| 663 |
+
"test/test-io.py": {
|
| 664 |
+
"size": 2464
|
| 665 |
+
},
|
| 666 |
+
"test/test-node2vec.py": {
|
| 667 |
+
"size": 224
|
| 668 |
+
},
|
| 669 |
+
"test/test-pajek.py": {
|
| 670 |
+
"size": 1466
|
| 671 |
+
},
|
| 672 |
+
"test/test-rewire.py": {
|
| 673 |
+
"size": 278
|
| 674 |
+
},
|
| 675 |
+
"test/test-table.py": {
|
| 676 |
+
"size": 1780
|
| 677 |
+
},
|
| 678 |
+
"test/test-tnodei.py": {
|
| 679 |
+
"size": 1866
|
| 680 |
+
},
|
| 681 |
+
"test/test-vec-ops.py": {
|
| 682 |
+
"size": 1235
|
| 683 |
+
},
|
| 684 |
+
"test/thash.py": {
|
| 685 |
+
"size": 923
|
| 686 |
+
},
|
| 687 |
+
"test/titer.py": {
|
| 688 |
+
"size": 6659
|
| 689 |
+
},
|
| 690 |
+
"test/tmany.py": {
|
| 691 |
+
"size": 4540
|
| 692 |
+
},
|
| 693 |
+
"test/tneanet.py": {
|
| 694 |
+
"size": 29824
|
| 695 |
+
},
|
| 696 |
+
"test/tnodei.py": {
|
| 697 |
+
"size": 955
|
| 698 |
+
},
|
| 699 |
+
"test/tpair.py": {
|
| 700 |
+
"size": 83
|
| 701 |
+
},
|
| 702 |
+
"test/tree.py": {
|
| 703 |
+
"size": 369
|
| 704 |
+
},
|
| 705 |
+
"test/tutorial.py": {
|
| 706 |
+
"size": 3825
|
| 707 |
+
},
|
| 708 |
+
"test/tvec.py": {
|
| 709 |
+
"size": 704
|
| 710 |
+
},
|
| 711 |
+
"test/vec.py": {
|
| 712 |
+
"size": 1511
|
| 713 |
+
},
|
| 714 |
+
"test/vector_comp.py": {
|
| 715 |
+
"size": 1568
|
| 716 |
+
},
|
| 717 |
+
"troubleshooting.md": {
|
| 718 |
+
"size": 1594
|
| 719 |
+
}
|
| 720 |
+
},
|
| 721 |
+
"processed_by": "zip_fallback",
|
| 722 |
+
"success": true
|
| 723 |
+
},
|
| 724 |
+
"structure": {
|
| 725 |
+
"packages": [
|
| 726 |
+
"source.snapx.snapx",
|
| 727 |
+
"source.swig.snap"
|
| 728 |
+
]
|
| 729 |
+
},
|
| 730 |
+
"dependencies": {
|
| 731 |
+
"has_environment_yml": false,
|
| 732 |
+
"has_requirements_txt": false,
|
| 733 |
+
"pyproject": false,
|
| 734 |
+
"setup_cfg": false,
|
| 735 |
+
"setup_py": true
|
| 736 |
+
},
|
| 737 |
+
"entry_points": {
|
| 738 |
+
"imports": [],
|
| 739 |
+
"cli": [],
|
| 740 |
+
"modules": []
|
| 741 |
+
},
|
| 742 |
+
"llm_analysis": {
|
| 743 |
+
"core_modules": [
|
| 744 |
+
{
|
| 745 |
+
"package": "setup",
|
| 746 |
+
"module": "setup",
|
| 747 |
+
"functions": [],
|
| 748 |
+
"classes": [
|
| 749 |
+
"SwigBuild",
|
| 750 |
+
"SwigExtension"
|
| 751 |
+
],
|
| 752 |
+
"function_signatures": {},
|
| 753 |
+
"description": "Discovered via AST scan"
|
| 754 |
+
},
|
| 755 |
+
{
|
| 756 |
+
"package": "swig",
|
| 757 |
+
"module": "setup",
|
| 758 |
+
"functions": [],
|
| 759 |
+
"classes": [
|
| 760 |
+
"PkgBuild",
|
| 761 |
+
"SwigExtension"
|
| 762 |
+
],
|
| 763 |
+
"function_signatures": {},
|
| 764 |
+
"description": "Discovered via AST scan"
|
| 765 |
+
},
|
| 766 |
+
{
|
| 767 |
+
"package": "swig.gen",
|
| 768 |
+
"module": "disp-custom",
|
| 769 |
+
"functions": [
|
| 770 |
+
"ConvertESubGraph",
|
| 771 |
+
"ConvertGraph",
|
| 772 |
+
"ConvertSubGraph",
|
| 773 |
+
"ToGraph",
|
| 774 |
+
"ToNetwork"
|
| 775 |
+
],
|
| 776 |
+
"classes": [],
|
| 777 |
+
"function_signatures": {
|
| 778 |
+
"ConvertGraph": [
|
| 779 |
+
"toutspec",
|
| 780 |
+
"tinspec"
|
| 781 |
+
],
|
| 782 |
+
"ConvertSubGraph": [
|
| 783 |
+
"toutspec",
|
| 784 |
+
"tinspec"
|
| 785 |
+
],
|
| 786 |
+
"ConvertESubGraph": [
|
| 787 |
+
"toutspec",
|
| 788 |
+
"tinspec"
|
| 789 |
+
],
|
| 790 |
+
"ToNetwork": [
|
| 791 |
+
"tspec"
|
| 792 |
+
],
|
| 793 |
+
"ToGraph": [
|
| 794 |
+
"tspec"
|
| 795 |
+
]
|
| 796 |
+
},
|
| 797 |
+
"description": "Discovered via AST scan"
|
| 798 |
+
},
|
| 799 |
+
{
|
| 800 |
+
"package": "swig.gen.genClassFn.archive",
|
| 801 |
+
"module": "genClassFnExt",
|
| 802 |
+
"functions": [
|
| 803 |
+
"genFuncCall",
|
| 804 |
+
"getFuncName",
|
| 805 |
+
"removeFirstParam",
|
| 806 |
+
"stripTypes"
|
| 807 |
+
],
|
| 808 |
+
"classes": [],
|
| 809 |
+
"function_signatures": {
|
| 810 |
+
"removeFirstParam": [
|
| 811 |
+
"funcDecl"
|
| 812 |
+
],
|
| 813 |
+
"stripTypes": [
|
| 814 |
+
"decl"
|
| 815 |
+
],
|
| 816 |
+
"genFuncCall": [
|
| 817 |
+
"funcDecl",
|
| 818 |
+
"funcName",
|
| 819 |
+
"graphType"
|
| 820 |
+
],
|
| 821 |
+
"getFuncName": [
|
| 822 |
+
"funcDecl"
|
| 823 |
+
]
|
| 824 |
+
},
|
| 825 |
+
"description": "Discovered via AST scan"
|
| 826 |
+
},
|
| 827 |
+
{
|
| 828 |
+
"package": "setup",
|
| 829 |
+
"module": "snap",
|
| 830 |
+
"functions": [
|
| 831 |
+
"CalcAvgDiamPdf",
|
| 832 |
+
"CalcEffDiam",
|
| 833 |
+
"CalcEffDiamPdf",
|
| 834 |
+
"CmtyGirvanNewmanStep",
|
| 835 |
+
"CntDegNodes",
|
| 836 |
+
"CntEdgesToSet",
|
| 837 |
+
"CntInDegNodes",
|
| 838 |
+
"CntNonZNodes",
|
| 839 |
+
"CntOutDegNodes",
|
| 840 |
+
"CntSelfEdges",
|
| 841 |
+
"CntUniqBiDirEdges",
|
| 842 |
+
"CntUniqDirEdges",
|
| 843 |
+
"CntUniqUndirEdges",
|
| 844 |
+
"CommunityCNM",
|
| 845 |
+
"CommunityGirvanNewman",
|
| 846 |
+
"DrawGViz",
|
| 847 |
+
"ErrNotify",
|
| 848 |
+
"ExeStop",
|
| 849 |
+
"GVizDoLayout",
|
| 850 |
+
"GVizGetLayoutStr",
|
| 851 |
+
"GenConfModel",
|
| 852 |
+
"GenCopyModel",
|
| 853 |
+
"GenDegSeq",
|
| 854 |
+
"GenForestFire",
|
| 855 |
+
"GenGeoPrefAttach",
|
| 856 |
+
"GenPrefAttach",
|
| 857 |
+
"GenRMat",
|
| 858 |
+
"GenRMatEpinions",
|
| 859 |
+
"GenRewire",
|
| 860 |
+
"GenRndBipart",
|
| 861 |
+
"GenRndDegK",
|
| 862 |
+
"GenRndGnm",
|
| 863 |
+
"GenRndPowerLaw",
|
| 864 |
+
"GenSmallWorld",
|
| 865 |
+
"Get1CnCom",
|
| 866 |
+
"Get1CnComSzCnt",
|
| 867 |
+
"GetAnf",
|
| 868 |
+
"GetAnfEffDiam",
|
| 869 |
+
"GetArtPoints",
|
| 870 |
+
"GetBetweennessCentr",
|
| 871 |
+
"GetBfsEffDiam",
|
| 872 |
+
"GetBfsFullDiam",
|
| 873 |
+
"GetBfsTree",
|
| 874 |
+
"GetBiCon",
|
| 875 |
+
"GetBiConSzCnt",
|
| 876 |
+
"GetClosenessCentr",
|
| 877 |
+
"GetClustCf",
|
| 878 |
+
"GetCmnNbrs",
|
| 879 |
+
"GetDegCnt",
|
| 880 |
+
"GetDegSeqV",
|
| 881 |
+
"GetDegreeCentr",
|
| 882 |
+
"GetEdgeBridges",
|
| 883 |
+
"GetEdgesInOut",
|
| 884 |
+
"GetEigVals",
|
| 885 |
+
"GetEigVec",
|
| 886 |
+
"GetEigenVectorCentr",
|
| 887 |
+
"GetFarnessCentr",
|
| 888 |
+
"GetInDegCnt",
|
| 889 |
+
"GetInvParticipRat",
|
| 890 |
+
"GetInvParticipRatEig",
|
| 891 |
+
"GetModularity",
|
| 892 |
+
"GetMxBiCon",
|
| 893 |
+
"GetMxDegNId",
|
| 894 |
+
"GetMxInDegNId",
|
| 895 |
+
"GetMxOutDegNId",
|
| 896 |
+
"GetMxScc",
|
| 897 |
+
"GetMxWcc",
|
| 898 |
+
"GetMxWccSz",
|
| 899 |
+
"GetNodeClustCf",
|
| 900 |
+
"GetNodeInDegV",
|
| 901 |
+
"GetNodeOutDegV",
|
| 902 |
+
"GetNodeWcc",
|
| 903 |
+
"GetNodesAtHop",
|
| 904 |
+
"GetNodesAtHops",
|
| 905 |
+
"GetOutDegCnt",
|
| 906 |
+
"GetSccSzCnt",
|
| 907 |
+
"GetSccs",
|
| 908 |
+
"GetShortPath",
|
| 909 |
+
"GetSngVals",
|
| 910 |
+
"GetSngVec",
|
| 911 |
+
"GetSubGraph",
|
| 912 |
+
"GetSubTreeSz",
|
| 913 |
+
"GetTriadEdges",
|
| 914 |
+
"GetTriadParticip",
|
| 915 |
+
"GetTriads",
|
| 916 |
+
"GetWccSzCnt",
|
| 917 |
+
"GetWccs",
|
| 918 |
+
"InfoNotify",
|
| 919 |
+
"IsConnected",
|
| 920 |
+
"IsWeaklyConn",
|
| 921 |
+
"LoadDyNet",
|
| 922 |
+
"LoadDyNetGraphV",
|
| 923 |
+
"LoadEdgeList",
|
| 924 |
+
"MxDegree",
|
| 925 |
+
"MxSccSz",
|
| 926 |
+
"MxWccSz",
|
| 927 |
+
"NodesGTEDegree",
|
| 928 |
+
"PNEANet_New",
|
| 929 |
+
"PercentDegree",
|
| 930 |
+
"PercentMxScc",
|
| 931 |
+
"PercentMxWcc",
|
| 932 |
+
"PrintGraphStatTable",
|
| 933 |
+
"PyTFltV",
|
| 934 |
+
"PyToTIntV",
|
| 935 |
+
"SaveToErrLog",
|
| 936 |
+
"StatNotify",
|
| 937 |
+
"TBPGraph_GetSmallGraph",
|
| 938 |
+
"TBPGraph_Load",
|
| 939 |
+
"TBPGraph_New",
|
| 940 |
+
"TBigStrPool_Load",
|
| 941 |
+
"TBigStrPool_New",
|
| 942 |
+
"TBool_Get01Str",
|
| 943 |
+
"TBool_GetRnd",
|
| 944 |
+
"TBool_GetValFromStr",
|
| 945 |
+
"TBool_GetYNStr",
|
| 946 |
+
"TBool_GetYesNoStr",
|
| 947 |
+
"TBool_IsValStr",
|
| 948 |
+
"TChAIn_New",
|
| 949 |
+
"TChA_LoadTxt",
|
| 950 |
+
"TCh_GetHex",
|
| 951 |
+
"TCh_GetHexCh",
|
| 952 |
+
"TCh_GetNum",
|
| 953 |
+
"TCh_GetUc",
|
| 954 |
+
"TCh_GetUsFromYuAscii",
|
| 955 |
+
"TCh_IsAlNum",
|
| 956 |
+
"TCh_IsAlpha",
|
| 957 |
+
"TCh_IsHex",
|
| 958 |
+
"TCh_IsNum",
|
| 959 |
+
"TCh_IsUc",
|
| 960 |
+
"TCh_IsWs",
|
| 961 |
+
"TCnCom_Dump",
|
| 962 |
+
"TCnCom_SaveTxt",
|
| 963 |
+
"TCs_GetCsFromBf",
|
| 964 |
+
"TFIn_New",
|
| 965 |
+
"TFOut_New",
|
| 966 |
+
"TFfGGen_GenFFGraphs",
|
| 967 |
+
"TFile_Del",
|
| 968 |
+
"TFile_DelWc",
|
| 969 |
+
"TFile_Exists",
|
| 970 |
+
"TFile_GetUniqueFNm",
|
| 971 |
+
"TFile_Rename",
|
| 972 |
+
"TFltRect_Intersection",
|
| 973 |
+
"TFlt_Abs",
|
| 974 |
+
"TFlt_Eq6",
|
| 975 |
+
"TFlt_GetGigaStr",
|
| 976 |
+
"TFlt_GetInRng",
|
| 977 |
+
"TFlt_GetKiloStr",
|
| 978 |
+
"TFlt_GetMegaStr",
|
| 979 |
+
"TFlt_GetMn",
|
| 980 |
+
"TFlt_GetMx",
|
| 981 |
+
"TFlt_GetPrcStr",
|
| 982 |
+
"TFlt_GetRnd",
|
| 983 |
+
"TFlt_Round",
|
| 984 |
+
"TFlt_Sign",
|
| 985 |
+
"TForestFire_GenGraph",
|
| 986 |
+
"TGUtil_GetCCdf",
|
| 987 |
+
"TGUtil_GetCdf",
|
| 988 |
+
"TGUtil_GetPdf",
|
| 989 |
+
"TGUtil_MakeExpBins",
|
| 990 |
+
"TGUtil_Normalize",
|
| 991 |
+
"TIntIntVV_GetV",
|
| 992 |
+
"TIntIntVV_SwapI",
|
| 993 |
+
"TIntVToPy",
|
| 994 |
+
"TIntV_GetV",
|
| 995 |
+
"TIntV_SwapI",
|
| 996 |
+
"TInt_Abs",
|
| 997 |
+
"TInt_GetHexStr",
|
| 998 |
+
"TInt_GetInRng",
|
| 999 |
+
"TInt_GetKiloStr",
|
| 1000 |
+
"TInt_GetMegaStr",
|
| 1001 |
+
"TInt_GetMn",
|
| 1002 |
+
"TInt_GetMx",
|
| 1003 |
+
"TInt_GetRnd",
|
| 1004 |
+
"TInt_IsEven",
|
| 1005 |
+
"TInt_IsOdd",
|
| 1006 |
+
"TInt_LoadFrugalInt",
|
| 1007 |
+
"TInt_LoadFrugalIntV",
|
| 1008 |
+
"TInt_SaveFrugalInt",
|
| 1009 |
+
"TInt_SaveFrugalIntV",
|
| 1010 |
+
"TInt_Sign",
|
| 1011 |
+
"TInt_Swap",
|
| 1012 |
+
"TInt_TestFrugalInt",
|
| 1013 |
+
"TMIn_New",
|
| 1014 |
+
"TMOut_New",
|
| 1015 |
+
"TMemIn_New",
|
| 1016 |
+
"TMemOut_New",
|
| 1017 |
+
"TMem_LoadMem",
|
| 1018 |
+
"TMem_New",
|
| 1019 |
+
"TNEANet_Load",
|
| 1020 |
+
"TNEANet_New",
|
| 1021 |
+
"TNEGraph_Load",
|
| 1022 |
+
"TNEGraph_New",
|
| 1023 |
+
"TNGraph_GetSmallGraph",
|
| 1024 |
+
"TNGraph_Load",
|
| 1025 |
+
"TNGraph_New",
|
| 1026 |
+
"TPairHashImpl1_GetHashCd",
|
| 1027 |
+
"TPairHashImpl2_GetHashCd",
|
| 1028 |
+
"TPrGraph",
|
| 1029 |
+
"TRStr_CmpI",
|
| 1030 |
+
"TRStr_GetNullRStr",
|
| 1031 |
+
"TRnd_GetExpDevStep",
|
| 1032 |
+
"TRnd_GetNrmDevStep",
|
| 1033 |
+
"TRnd_GetUniDevStep",
|
| 1034 |
+
"TRnd_LoadTxt",
|
| 1035 |
+
"TStdIn_New",
|
| 1036 |
+
"TStdOut_New",
|
| 1037 |
+
"TStrHashF_DJB_GetPrimHashCd",
|
| 1038 |
+
"TStrHashF_DJB_GetSecHashCd",
|
| 1039 |
+
"TStrHashF_Md5_GetPrimHashCd",
|
| 1040 |
+
"TStrHashF_Md5_GetSecHashCd",
|
| 1041 |
+
"TStrHashF_OldGLib_GetPrimHashCd",
|
| 1042 |
+
"TStrHashF_OldGLib_GetSecHashCd",
|
| 1043 |
+
"TStrIn_New",
|
| 1044 |
+
"TStrPool64_Load",
|
| 1045 |
+
"TStrPool64_New",
|
| 1046 |
+
"TStrPool_Load",
|
| 1047 |
+
"TStrPool_New",
|
| 1048 |
+
"TStrUtil_CountWords",
|
| 1049 |
+
"TStrUtil_GetAddWIdV",
|
| 1050 |
+
"TStrUtil_GetCleanStr",
|
| 1051 |
+
"TStrUtil_GetCleanWrdStr",
|
| 1052 |
+
"TStrUtil_GetDomNm",
|
| 1053 |
+
"TStrUtil_GetDomNm2",
|
| 1054 |
+
"TStrUtil_GetNormalizedUrl",
|
| 1055 |
+
"TStrUtil_GetShorStr",
|
| 1056 |
+
"TStrUtil_GetStdName",
|
| 1057 |
+
"TStrUtil_GetStdNameV",
|
| 1058 |
+
"TStrUtil_GetTmFromStr",
|
| 1059 |
+
"TStrUtil_GetWIdV",
|
| 1060 |
+
"TStrUtil_GetWebsiteNm",
|
| 1061 |
+
"TStrUtil_GetXmlTagNmVal",
|
| 1062 |
+
"TStrUtil_GetXmlTagNmVal2",
|
| 1063 |
+
"TStrUtil_GetXmlTagVal",
|
| 1064 |
+
"TStrUtil_IsLatinStr",
|
| 1065 |
+
"TStrUtil_RemoveHtmlTags",
|
| 1066 |
+
"TStrUtil_SplitLines",
|
| 1067 |
+
"TStrUtil_SplitOnCh",
|
| 1068 |
+
"TStrUtil_SplitSentences",
|
| 1069 |
+
"TStrUtil_SplitWords",
|
| 1070 |
+
"TStrUtil_StripEnd",
|
| 1071 |
+
"TStrV_GetV",
|
| 1072 |
+
"TStrV_SwapI",
|
| 1073 |
+
"TStr_AddToFMid",
|
| 1074 |
+
"TStr_Fmt",
|
| 1075 |
+
"TStr_GetChStr",
|
| 1076 |
+
"TStr_GetDChStr",
|
| 1077 |
+
"TStr_GetFNmStr",
|
| 1078 |
+
"TStr_GetNrAbsFPath",
|
| 1079 |
+
"TStr_GetNrFExt",
|
| 1080 |
+
"TStr_GetNrFMid",
|
| 1081 |
+
"TStr_GetNrFNm",
|
| 1082 |
+
"TStr_GetNrFPath",
|
| 1083 |
+
"TStr_GetNrNumFExt",
|
| 1084 |
+
"TStr_GetNullStr",
|
| 1085 |
+
"TStr_GetNumFNm",
|
| 1086 |
+
"TStr_GetSpaceStr",
|
| 1087 |
+
"TStr_IsAbsFPath",
|
| 1088 |
+
"TStr_LoadTxt",
|
| 1089 |
+
"TStr_MkClone",
|
| 1090 |
+
"TStr_PutFBase",
|
| 1091 |
+
"TStr_PutFBaseIfEmpty",
|
| 1092 |
+
"TStr_PutFExt",
|
| 1093 |
+
"TStr_PutFExtIfEmpty",
|
| 1094 |
+
"TUInt64_GetHexStr",
|
| 1095 |
+
"TUInt64_GetKiloStr",
|
| 1096 |
+
"TUInt64_GetMegaStr",
|
| 1097 |
+
"TUInt_GetKiloStr",
|
| 1098 |
+
"TUInt_GetMegaStr",
|
| 1099 |
+
"TUInt_GetRnd",
|
| 1100 |
+
"TUInt_GetStrFromIpUInt",
|
| 1101 |
+
"TUInt_GetUIntFromIpStr",
|
| 1102 |
+
"TUInt_IsIpStr",
|
| 1103 |
+
"TUInt_IsIpv6Str",
|
| 1104 |
+
"TUInt_JavaUIntToCppUInt",
|
| 1105 |
+
"TUNGraph_GetSmallGraph",
|
| 1106 |
+
"TUNGraph_Load",
|
| 1107 |
+
"TUNGraph_New",
|
| 1108 |
+
"WarnNotify",
|
| 1109 |
+
"WrNotify",
|
| 1110 |
+
"accept_array",
|
| 1111 |
+
"count",
|
| 1112 |
+
"print_array"
|
| 1113 |
+
],
|
| 1114 |
+
"classes": [
|
| 1115 |
+
"PNEANet",
|
| 1116 |
+
"TArtPointVisitor",
|
| 1117 |
+
"TAscFlt",
|
| 1118 |
+
"TBPGraph",
|
| 1119 |
+
"TBiConVisitor",
|
| 1120 |
+
"TBigStrPool",
|
| 1121 |
+
"TBool",
|
| 1122 |
+
"TCRef",
|
| 1123 |
+
"TCh",
|
| 1124 |
+
"TChA",
|
| 1125 |
+
"TChAIn",
|
| 1126 |
+
"TChRet",
|
| 1127 |
+
"TCnCom",
|
| 1128 |
+
"TConv_Pt64Ints32",
|
| 1129 |
+
"TCs",
|
| 1130 |
+
"TDbStr",
|
| 1131 |
+
"TFIn",
|
| 1132 |
+
"TFOut",
|
| 1133 |
+
"TFfGGen",
|
| 1134 |
+
"TFile",
|
| 1135 |
+
"TFlt",
|
| 1136 |
+
"TFltRect",
|
| 1137 |
+
"TForestFire",
|
| 1138 |
+
"TGUtil",
|
| 1139 |
+
"TInt",
|
| 1140 |
+
"TIntH",
|
| 1141 |
+
"TIntHI",
|
| 1142 |
+
"TIntIntVH",
|
| 1143 |
+
"TIntIntVV",
|
| 1144 |
+
"TIntV",
|
| 1145 |
+
"TLFlt",
|
| 1146 |
+
"TLnRet",
|
| 1147 |
+
"TMIn",
|
| 1148 |
+
"TMOut",
|
| 1149 |
+
"TMem",
|
| 1150 |
+
"TMemIn",
|
| 1151 |
+
"TMemOut",
|
| 1152 |
+
"TNEANet",
|
| 1153 |
+
"TNEANetAFltI",
|
| 1154 |
+
"TNEANetAIntI",
|
| 1155 |
+
"TNEANetAStrI",
|
| 1156 |
+
"TNEANetEdgeI",
|
| 1157 |
+
"TNEANetNodeI",
|
| 1158 |
+
"TNEGraph",
|
| 1159 |
+
"TNGraph",
|
| 1160 |
+
"TNGraphEdgeI",
|
| 1161 |
+
"TNGraphMtx",
|
| 1162 |
+
"TNGraphNodeI",
|
| 1163 |
+
"TPairHashImpl1",
|
| 1164 |
+
"TPairHashImpl2",
|
| 1165 |
+
"TRStr",
|
| 1166 |
+
"TRnd",
|
| 1167 |
+
"TSBase",
|
| 1168 |
+
"TSFlt",
|
| 1169 |
+
"TSIn",
|
| 1170 |
+
"TSInOut",
|
| 1171 |
+
"TSInt",
|
| 1172 |
+
"TSOut",
|
| 1173 |
+
"TSOutMnp",
|
| 1174 |
+
"TSStr",
|
| 1175 |
+
"TStdIn",
|
| 1176 |
+
"TStdOut",
|
| 1177 |
+
"TStr",
|
| 1178 |
+
"TStrHashF_DJB",
|
| 1179 |
+
"TStrHashF_Md5",
|
| 1180 |
+
"TStrHashF_OldGLib",
|
| 1181 |
+
"TStrIn",
|
| 1182 |
+
"TStrPool",
|
| 1183 |
+
"TStrPool64",
|
| 1184 |
+
"TStrUtil",
|
| 1185 |
+
"TStrV",
|
| 1186 |
+
"TUCh",
|
| 1187 |
+
"TUInt",
|
| 1188 |
+
"TUInt64",
|
| 1189 |
+
"TUNGraph",
|
| 1190 |
+
"TUNGraphEdgeI",
|
| 1191 |
+
"TUNGraphMtx",
|
| 1192 |
+
"TUNGraphNodeI",
|
| 1193 |
+
"TUndirFFire",
|
| 1194 |
+
"TVoid"
|
| 1195 |
+
],
|
| 1196 |
+
"function_signatures": {
|
| 1197 |
+
"CalcEffDiam": [],
|
| 1198 |
+
"CalcEffDiamPdf": [],
|
| 1199 |
+
"CalcAvgDiamPdf": [],
|
| 1200 |
+
"WrNotify": [],
|
| 1201 |
+
"SaveToErrLog": [],
|
| 1202 |
+
"InfoNotify": [],
|
| 1203 |
+
"WarnNotify": [],
|
| 1204 |
+
"ErrNotify": [],
|
| 1205 |
+
"StatNotify": [],
|
| 1206 |
+
"ExeStop": [],
|
| 1207 |
+
"TPairHashImpl1_GetHashCd": [],
|
| 1208 |
+
"TPairHashImpl2_GetHashCd": [],
|
| 1209 |
+
"GetDegreeCentr": [],
|
| 1210 |
+
"GetFarnessCentr": [],
|
| 1211 |
+
"GetClosenessCentr": [],
|
| 1212 |
+
"GetBetweennessCentr": [],
|
| 1213 |
+
"GetEigenVectorCentr": [],
|
| 1214 |
+
"CommunityGirvanNewman": [],
|
| 1215 |
+
"CommunityCNM": [],
|
| 1216 |
+
"CmtyGirvanNewmanStep": [],
|
| 1217 |
+
"GetBiConSzCnt": [],
|
| 1218 |
+
"GetBiCon": [],
|
| 1219 |
+
"GetArtPoints": [],
|
| 1220 |
+
"GetEdgeBridges": [],
|
| 1221 |
+
"Get1CnComSzCnt": [],
|
| 1222 |
+
"Get1CnCom": [],
|
| 1223 |
+
"TCnCom_Dump": [],
|
| 1224 |
+
"TCnCom_SaveTxt": [],
|
| 1225 |
+
"TForestFire_GenGraph": [],
|
| 1226 |
+
"TFfGGen_GenFFGraphs": [],
|
| 1227 |
+
"TCs_GetCsFromBf": [],
|
| 1228 |
+
"TStdIn_New": [],
|
| 1229 |
+
"TStdOut_New": [],
|
| 1230 |
+
"TFIn_New": [],
|
| 1231 |
+
"TFOut_New": [],
|
| 1232 |
+
"TMIn_New": [],
|
| 1233 |
+
"TMOut_New": [
|
| 1234 |
+
"MxBfL"
|
| 1235 |
+
],
|
| 1236 |
+
"TFile_Exists": [],
|
| 1237 |
+
"TFile_Del": [],
|
| 1238 |
+
"TFile_DelWc": [],
|
| 1239 |
+
"TFile_Rename": [],
|
| 1240 |
+
"TFile_GetUniqueFNm": [],
|
| 1241 |
+
"TUNGraph_New": [],
|
| 1242 |
+
"TUNGraph_Load": [],
|
| 1243 |
+
"TUNGraph_GetSmallGraph": [],
|
| 1244 |
+
"TNGraph_New": [],
|
| 1245 |
+
"TNGraph_Load": [],
|
| 1246 |
+
"TNGraph_GetSmallGraph": [],
|
| 1247 |
+
"TNEGraph_New": [],
|
| 1248 |
+
"TNEGraph_Load": [],
|
| 1249 |
+
"TBPGraph_New": [],
|
| 1250 |
+
"TBPGraph_Load": [],
|
| 1251 |
+
"TBPGraph_GetSmallGraph": [],
|
| 1252 |
+
"GetSngVals": [],
|
| 1253 |
+
"GetSngVec": [],
|
| 1254 |
+
"GetEigVals": [],
|
| 1255 |
+
"GetEigVec": [],
|
| 1256 |
+
"GetInvParticipRat": [],
|
| 1257 |
+
"GetInvParticipRatEig": [],
|
| 1258 |
+
"LoadDyNet": [],
|
| 1259 |
+
"LoadDyNetGraphV": [],
|
| 1260 |
+
"GVizDoLayout": [],
|
| 1261 |
+
"GVizGetLayoutStr": [],
|
| 1262 |
+
"TBigStrPool_New": [],
|
| 1263 |
+
"TBigStrPool_Load": [],
|
| 1264 |
+
"TStrHashF_OldGLib_GetPrimHashCd": [],
|
| 1265 |
+
"TStrHashF_OldGLib_GetSecHashCd": [],
|
| 1266 |
+
"TStrHashF_Md5_GetPrimHashCd": [],
|
| 1267 |
+
"TStrHashF_Md5_GetSecHashCd": [],
|
| 1268 |
+
"TStrHashF_DJB_GetPrimHashCd": [],
|
| 1269 |
+
"TStrHashF_DJB_GetSecHashCd": [],
|
| 1270 |
+
"GenRndBipart": [],
|
| 1271 |
+
"GenRndDegK": [],
|
| 1272 |
+
"GenRndPowerLaw": [],
|
| 1273 |
+
"GenDegSeq": [],
|
| 1274 |
+
"GenPrefAttach": [],
|
| 1275 |
+
"GenGeoPrefAttach": [],
|
| 1276 |
+
"GenSmallWorld": [],
|
| 1277 |
+
"GenForestFire": [],
|
| 1278 |
+
"GenCopyModel": [],
|
| 1279 |
+
"GenRMat": [],
|
| 1280 |
+
"GenRMatEpinions": [],
|
| 1281 |
+
"GenRewire": [],
|
| 1282 |
+
"GenConfModel": [],
|
| 1283 |
+
"GetSubGraph": [],
|
| 1284 |
+
"TGUtil_GetCdf": [],
|
| 1285 |
+
"TGUtil_GetCCdf": [],
|
| 1286 |
+
"TGUtil_GetPdf": [],
|
| 1287 |
+
"TGUtil_Normalize": [],
|
| 1288 |
+
"TGUtil_MakeExpBins": [],
|
| 1289 |
+
"TStrUtil_GetXmlTagVal": [],
|
| 1290 |
+
"TStrUtil_GetXmlTagNmVal": [],
|
| 1291 |
+
"TStrUtil_GetXmlTagNmVal2": [],
|
| 1292 |
+
"TStrUtil_GetDomNm": [],
|
| 1293 |
+
"TStrUtil_GetDomNm2": [],
|
| 1294 |
+
"TStrUtil_GetWebsiteNm": [],
|
| 1295 |
+
"TStrUtil_GetNormalizedUrl": [],
|
| 1296 |
+
"TStrUtil_StripEnd": [],
|
| 1297 |
+
"TStrUtil_GetShorStr": [],
|
| 1298 |
+
"TStrUtil_GetCleanStr": [],
|
| 1299 |
+
"TStrUtil_GetCleanWrdStr": [],
|
| 1300 |
+
"TStrUtil_CountWords": [],
|
| 1301 |
+
"TStrUtil_SplitWords": [],
|
| 1302 |
+
"TStrUtil_SplitOnCh": [],
|
| 1303 |
+
"TStrUtil_SplitLines": [],
|
| 1304 |
+
"TStrUtil_SplitSentences": [],
|
| 1305 |
+
"TStrUtil_RemoveHtmlTags": [],
|
| 1306 |
+
"TStrUtil_IsLatinStr": [],
|
| 1307 |
+
"TStrUtil_GetWIdV": [],
|
| 1308 |
+
"TStrUtil_GetAddWIdV": [],
|
| 1309 |
+
"TStrUtil_GetTmFromStr": [],
|
| 1310 |
+
"TStrUtil_GetStdName": [],
|
| 1311 |
+
"TStrUtil_GetStdNameV": [],
|
| 1312 |
+
"TRnd_GetUniDevStep": [],
|
| 1313 |
+
"TRnd_GetNrmDevStep": [],
|
| 1314 |
+
"TRnd_GetExpDevStep": [],
|
| 1315 |
+
"TRnd_LoadTxt": [],
|
| 1316 |
+
"TMem_New": [],
|
| 1317 |
+
"TMem_LoadMem": [],
|
| 1318 |
+
"TMemIn_New": [],
|
| 1319 |
+
"TMemOut_New": [],
|
| 1320 |
+
"TChA_LoadTxt": [],
|
| 1321 |
+
"TChAIn_New": [],
|
| 1322 |
+
"TRStr_CmpI": [],
|
| 1323 |
+
"TRStr_GetNullRStr": [],
|
| 1324 |
+
"TStr_GetNrFPath": [],
|
| 1325 |
+
"TStr_GetNrFMid": [],
|
| 1326 |
+
"TStr_GetNrFExt": [],
|
| 1327 |
+
"TStr_GetNrNumFExt": [],
|
| 1328 |
+
"TStr_GetNrFNm": [],
|
| 1329 |
+
"TStr_GetNrAbsFPath": [],
|
| 1330 |
+
"TStr_IsAbsFPath": [],
|
| 1331 |
+
"TStr_PutFExt": [],
|
| 1332 |
+
"TStr_PutFExtIfEmpty": [],
|
| 1333 |
+
"TStr_PutFBase": [],
|
| 1334 |
+
"TStr_PutFBaseIfEmpty": [],
|
| 1335 |
+
"TStr_AddToFMid": [],
|
| 1336 |
+
"TStr_GetNumFNm": [],
|
| 1337 |
+
"TStr_GetFNmStr": [],
|
| 1338 |
+
"TStr_LoadTxt": [],
|
| 1339 |
+
"TStr_GetChStr": [],
|
| 1340 |
+
"TStr_GetDChStr": [],
|
| 1341 |
+
"TStr_Fmt": [],
|
| 1342 |
+
"TStr_GetSpaceStr": [],
|
| 1343 |
+
"TStr_MkClone": [],
|
| 1344 |
+
"TStr_GetNullStr": [],
|
| 1345 |
+
"TStrIn_New": [],
|
| 1346 |
+
"TStrPool_New": [],
|
| 1347 |
+
"TStrPool_Load": [],
|
| 1348 |
+
"TStrPool64_New": [
|
| 1349 |
+
"MxBfL",
|
| 1350 |
+
"GrowBy"
|
| 1351 |
+
],
|
| 1352 |
+
"TStrPool64_Load": [],
|
| 1353 |
+
"TBool_GetRnd": [],
|
| 1354 |
+
"TBool_GetYNStr": [],
|
| 1355 |
+
"TBool_GetYesNoStr": [],
|
| 1356 |
+
"TBool_Get01Str": [],
|
| 1357 |
+
"TBool_IsValStr": [],
|
| 1358 |
+
"TBool_GetValFromStr": [],
|
| 1359 |
+
"TCh_IsWs": [],
|
| 1360 |
+
"TCh_IsAlpha": [],
|
| 1361 |
+
"TCh_IsNum": [],
|
| 1362 |
+
"TCh_IsAlNum": [],
|
| 1363 |
+
"TCh_GetNum": [],
|
| 1364 |
+
"TCh_IsHex": [],
|
| 1365 |
+
"TCh_GetHex": [],
|
| 1366 |
+
"TCh_GetHexCh": [],
|
| 1367 |
+
"TCh_IsUc": [],
|
| 1368 |
+
"TCh_GetUc": [],
|
| 1369 |
+
"TCh_GetUsFromYuAscii": [],
|
| 1370 |
+
"TInt_Abs": [],
|
| 1371 |
+
"TInt_Sign": [],
|
| 1372 |
+
"TInt_Swap": [],
|
| 1373 |
+
"TInt_GetRnd": [
|
| 1374 |
+
"Range"
|
| 1375 |
+
],
|
| 1376 |
+
"TInt_IsOdd": [],
|
| 1377 |
+
"TInt_IsEven": [],
|
| 1378 |
+
"TInt_GetMn": [],
|
| 1379 |
+
"TInt_GetMx": [],
|
| 1380 |
+
"TInt_GetInRng": [],
|
| 1381 |
+
"TInt_GetHexStr": [],
|
| 1382 |
+
"TInt_GetKiloStr": [],
|
| 1383 |
+
"TInt_GetMegaStr": [],
|
| 1384 |
+
"TInt_SaveFrugalInt": [],
|
| 1385 |
+
"TInt_LoadFrugalInt": [],
|
| 1386 |
+
"TInt_TestFrugalInt": [],
|
| 1387 |
+
"TInt_SaveFrugalIntV": [],
|
| 1388 |
+
"TInt_LoadFrugalIntV": [],
|
| 1389 |
+
"TUInt_GetRnd": [
|
| 1390 |
+
"Range"
|
| 1391 |
+
],
|
| 1392 |
+
"TUInt_GetKiloStr": [],
|
| 1393 |
+
"TUInt_GetMegaStr": [],
|
| 1394 |
+
"TUInt_JavaUIntToCppUInt": [],
|
| 1395 |
+
"TUInt_IsIpStr": [],
|
| 1396 |
+
"TUInt_GetUIntFromIpStr": [],
|
| 1397 |
+
"TUInt_GetStrFromIpUInt": [],
|
| 1398 |
+
"TUInt_IsIpv6Str": [],
|
| 1399 |
+
"TUInt64_GetHexStr": [],
|
| 1400 |
+
"TUInt64_GetKiloStr": [],
|
| 1401 |
+
"TUInt64_GetMegaStr": [],
|
| 1402 |
+
"TFlt_Abs": [],
|
| 1403 |
+
"TFlt_Sign": [],
|
| 1404 |
+
"TFlt_Round": [],
|
| 1405 |
+
"TFlt_GetRnd": [],
|
| 1406 |
+
"TFlt_Eq6": [],
|
| 1407 |
+
"TFlt_GetMn": [],
|
| 1408 |
+
"TFlt_GetMx": [],
|
| 1409 |
+
"TFlt_GetInRng": [],
|
| 1410 |
+
"TFlt_GetPrcStr": [],
|
| 1411 |
+
"TFlt_GetKiloStr": [],
|
| 1412 |
+
"TFlt_GetMegaStr": [],
|
| 1413 |
+
"TFlt_GetGigaStr": [],
|
| 1414 |
+
"TFltRect_Intersection": [],
|
| 1415 |
+
"TIntV_SwapI": [],
|
| 1416 |
+
"TIntV_GetV": [],
|
| 1417 |
+
"TIntIntVV_SwapI": [],
|
| 1418 |
+
"TIntIntVV_GetV": [],
|
| 1419 |
+
"TStrV_SwapI": [],
|
| 1420 |
+
"TStrV_GetV": [],
|
| 1421 |
+
"TPrGraph": [],
|
| 1422 |
+
"accept_array": [],
|
| 1423 |
+
"print_array": [],
|
| 1424 |
+
"PyTFltV": [],
|
| 1425 |
+
"PyToTIntV": [],
|
| 1426 |
+
"count": [],
|
| 1427 |
+
"TIntVToPy": [],
|
| 1428 |
+
"TNEANet_New": [],
|
| 1429 |
+
"TNEANet_Load": [],
|
| 1430 |
+
"PercentDegree": [],
|
| 1431 |
+
"PercentMxWcc": [],
|
| 1432 |
+
"PercentMxScc": [],
|
| 1433 |
+
"LoadEdgeList": [],
|
| 1434 |
+
"PrintGraphStatTable": [],
|
| 1435 |
+
"GenRndGnm": [],
|
| 1436 |
+
"NodesGTEDegree": [],
|
| 1437 |
+
"MxDegree": [],
|
| 1438 |
+
"MxSccSz": [],
|
| 1439 |
+
"MxWccSz": [],
|
| 1440 |
+
"PNEANet_New": [],
|
| 1441 |
+
"GetNodeWcc": [],
|
| 1442 |
+
"IsConnected": [],
|
| 1443 |
+
"IsWeaklyConn": [],
|
| 1444 |
+
"GetWccSzCnt": [],
|
| 1445 |
+
"GetWccs": [],
|
| 1446 |
+
"GetSccSzCnt": [],
|
| 1447 |
+
"GetSccs": [],
|
| 1448 |
+
"GetMxWccSz": [],
|
| 1449 |
+
"GetMxWcc": [],
|
| 1450 |
+
"GetMxScc": [],
|
| 1451 |
+
"GetMxBiCon": [],
|
| 1452 |
+
"CntInDegNodes": [],
|
| 1453 |
+
"CntOutDegNodes": [],
|
| 1454 |
+
"CntDegNodes": [],
|
| 1455 |
+
"CntNonZNodes": [],
|
| 1456 |
+
"CntEdgesToSet": [],
|
| 1457 |
+
"GetMxDegNId": [],
|
| 1458 |
+
"GetMxInDegNId": [],
|
| 1459 |
+
"GetMxOutDegNId": [],
|
| 1460 |
+
"GetInDegCnt": [],
|
| 1461 |
+
"GetOutDegCnt": [],
|
| 1462 |
+
"GetDegCnt": [],
|
| 1463 |
+
"GetDegSeqV": [],
|
| 1464 |
+
"GetNodeInDegV": [],
|
| 1465 |
+
"GetNodeOutDegV": [],
|
| 1466 |
+
"CntUniqUndirEdges": [],
|
| 1467 |
+
"CntUniqDirEdges": [],
|
| 1468 |
+
"CntUniqBiDirEdges": [],
|
| 1469 |
+
"CntSelfEdges": [],
|
| 1470 |
+
"GetBfsTree": [],
|
| 1471 |
+
"GetSubTreeSz": [],
|
| 1472 |
+
"GetNodesAtHop": [],
|
| 1473 |
+
"GetNodesAtHops": [],
|
| 1474 |
+
"GetShortPath": [],
|
| 1475 |
+
"GetBfsFullDiam": [],
|
| 1476 |
+
"GetBfsEffDiam": [],
|
| 1477 |
+
"DrawGViz": [],
|
| 1478 |
+
"GetClustCf": [],
|
| 1479 |
+
"GetNodeClustCf": [],
|
| 1480 |
+
"GetTriads": [],
|
| 1481 |
+
"GetTriadEdges": [],
|
| 1482 |
+
"GetTriadParticip": [],
|
| 1483 |
+
"GetCmnNbrs": [],
|
| 1484 |
+
"GetModularity": [],
|
| 1485 |
+
"GetEdgesInOut": [],
|
| 1486 |
+
"GetAnf": [],
|
| 1487 |
+
"GetAnfEffDiam": []
|
| 1488 |
+
},
|
| 1489 |
+
"description": "Discovered via AST scan"
|
| 1490 |
+
},
|
| 1491 |
+
{
|
| 1492 |
+
"package": "dev.examples",
|
| 1493 |
+
"module": "tneanet-cpp",
|
| 1494 |
+
"functions": [
|
| 1495 |
+
"main"
|
| 1496 |
+
],
|
| 1497 |
+
"classes": [],
|
| 1498 |
+
"function_signatures": {
|
| 1499 |
+
"main": []
|
| 1500 |
+
},
|
| 1501 |
+
"description": "Discovered via AST scan"
|
| 1502 |
+
},
|
| 1503 |
+
{
|
| 1504 |
+
"package": "dev.examples",
|
| 1505 |
+
"module": "snapswig-check",
|
| 1506 |
+
"functions": [
|
| 1507 |
+
"BfsDfsTest",
|
| 1508 |
+
"GVizTest",
|
| 1509 |
+
"main"
|
| 1510 |
+
],
|
| 1511 |
+
"classes": [
|
| 1512 |
+
"GVizTests"
|
| 1513 |
+
],
|
| 1514 |
+
"function_signatures": {
|
| 1515 |
+
"GVizTest": [
|
| 1516 |
+
"NNodes",
|
| 1517 |
+
"NEdges"
|
| 1518 |
+
],
|
| 1519 |
+
"BfsDfsTest": [
|
| 1520 |
+
"NNodes",
|
| 1521 |
+
"NEdges"
|
| 1522 |
+
],
|
| 1523 |
+
"main": []
|
| 1524 |
+
},
|
| 1525 |
+
"description": "Discovered via AST scan"
|
| 1526 |
+
},
|
| 1527 |
+
{
|
| 1528 |
+
"package": "snapx.snapx",
|
| 1529 |
+
"module": "exception",
|
| 1530 |
+
"functions": [],
|
| 1531 |
+
"classes": [
|
| 1532 |
+
"NodeNotFound",
|
| 1533 |
+
"SnapXAlgorithmError",
|
| 1534 |
+
"SnapXError",
|
| 1535 |
+
"SnapXException",
|
| 1536 |
+
"SnapXKeyError",
|
| 1537 |
+
"SnapXNoPath",
|
| 1538 |
+
"SnapXTypeError",
|
| 1539 |
+
"SnapXUnfeasible"
|
| 1540 |
+
],
|
| 1541 |
+
"function_signatures": {},
|
| 1542 |
+
"description": "Discovered via AST scan"
|
| 1543 |
+
},
|
| 1544 |
+
{
|
| 1545 |
+
"package": "snapx.snapx",
|
| 1546 |
+
"module": "relabel",
|
| 1547 |
+
"functions": [
|
| 1548 |
+
"convert_node_labels_to_integers",
|
| 1549 |
+
"relabel_nodes"
|
| 1550 |
+
],
|
| 1551 |
+
"classes": [],
|
| 1552 |
+
"function_signatures": {
|
| 1553 |
+
"relabel_nodes": [
|
| 1554 |
+
"G",
|
| 1555 |
+
"mapping",
|
| 1556 |
+
"copy"
|
| 1557 |
+
],
|
| 1558 |
+
"convert_node_labels_to_integers": [
|
| 1559 |
+
"G",
|
| 1560 |
+
"first_label",
|
| 1561 |
+
"ordering",
|
| 1562 |
+
"label_attribute"
|
| 1563 |
+
]
|
| 1564 |
+
},
|
| 1565 |
+
"description": "Discovered via AST scan"
|
| 1566 |
+
},
|
| 1567 |
+
{
|
| 1568 |
+
"package": "snapx.snapx",
|
| 1569 |
+
"module": "convert",
|
| 1570 |
+
"functions": [
|
| 1571 |
+
"from_dict_of_dicts",
|
| 1572 |
+
"to_snapx_graph"
|
| 1573 |
+
],
|
| 1574 |
+
"classes": [],
|
| 1575 |
+
"function_signatures": {
|
| 1576 |
+
"to_snapx_graph": [
|
| 1577 |
+
"data",
|
| 1578 |
+
"create_using",
|
| 1579 |
+
"multigraph_input"
|
| 1580 |
+
],
|
| 1581 |
+
"from_dict_of_dicts": [
|
| 1582 |
+
"d",
|
| 1583 |
+
"create_using",
|
| 1584 |
+
"multigraph_input"
|
| 1585 |
+
]
|
| 1586 |
+
},
|
| 1587 |
+
"description": "Discovered via AST scan"
|
| 1588 |
+
},
|
| 1589 |
+
{
|
| 1590 |
+
"package": "snapx.snapx.classes",
|
| 1591 |
+
"module": "coreviews",
|
| 1592 |
+
"functions": [],
|
| 1593 |
+
"classes": [
|
| 1594 |
+
"AdjacencyView",
|
| 1595 |
+
"AtlasView",
|
| 1596 |
+
"FilterAdjacency",
|
| 1597 |
+
"FilterAtlas",
|
| 1598 |
+
"FilterMultiAdjacency"
|
| 1599 |
+
],
|
| 1600 |
+
"function_signatures": {},
|
| 1601 |
+
"description": "Discovered via AST scan"
|
| 1602 |
+
},
|
| 1603 |
+
{
|
| 1604 |
+
"package": "snapx.snapx.classes",
|
| 1605 |
+
"module": "graph",
|
| 1606 |
+
"functions": [],
|
| 1607 |
+
"classes": [
|
| 1608 |
+
"Graph"
|
| 1609 |
+
],
|
| 1610 |
+
"function_signatures": {},
|
| 1611 |
+
"description": "Discovered via AST scan"
|
| 1612 |
+
},
|
| 1613 |
+
{
|
| 1614 |
+
"package": "snapx.snapx.classes",
|
| 1615 |
+
"module": "attrdict",
|
| 1616 |
+
"functions": [],
|
| 1617 |
+
"classes": [
|
| 1618 |
+
"AttributeDict"
|
| 1619 |
+
],
|
| 1620 |
+
"function_signatures": {},
|
| 1621 |
+
"description": "Discovered via AST scan"
|
| 1622 |
+
},
|
| 1623 |
+
{
|
| 1624 |
+
"package": "snapx.snapx.classes",
|
| 1625 |
+
"module": "reportviews",
|
| 1626 |
+
"functions": [],
|
| 1627 |
+
"classes": [
|
| 1628 |
+
"EdgeDataView",
|
| 1629 |
+
"EdgeView",
|
| 1630 |
+
"NodeDataView",
|
| 1631 |
+
"NodeView",
|
| 1632 |
+
"OutEdgeDataView",
|
| 1633 |
+
"OutEdgeView"
|
| 1634 |
+
],
|
| 1635 |
+
"function_signatures": {},
|
| 1636 |
+
"description": "Discovered via AST scan"
|
| 1637 |
+
},
|
| 1638 |
+
{
|
| 1639 |
+
"package": "snapx.snapx.classes",
|
| 1640 |
+
"module": "digraph",
|
| 1641 |
+
"functions": [],
|
| 1642 |
+
"classes": [
|
| 1643 |
+
"DiGraph"
|
| 1644 |
+
],
|
| 1645 |
+
"function_signatures": {},
|
| 1646 |
+
"description": "Discovered via AST scan"
|
| 1647 |
+
},
|
| 1648 |
+
{
|
| 1649 |
+
"package": "snapx.snapx.classes",
|
| 1650 |
+
"module": "filters",
|
| 1651 |
+
"functions": [
|
| 1652 |
+
"hide_diedges",
|
| 1653 |
+
"hide_edges",
|
| 1654 |
+
"hide_multidiedges",
|
| 1655 |
+
"hide_multiedges",
|
| 1656 |
+
"hide_nodes",
|
| 1657 |
+
"no_filter",
|
| 1658 |
+
"show_diedges",
|
| 1659 |
+
"show_edges",
|
| 1660 |
+
"show_multidiedges",
|
| 1661 |
+
"show_multiedges"
|
| 1662 |
+
],
|
| 1663 |
+
"classes": [
|
| 1664 |
+
"show_nodes"
|
| 1665 |
+
],
|
| 1666 |
+
"function_signatures": {
|
| 1667 |
+
"no_filter": [],
|
| 1668 |
+
"hide_nodes": [
|
| 1669 |
+
"nodes"
|
| 1670 |
+
],
|
| 1671 |
+
"hide_diedges": [
|
| 1672 |
+
"edges"
|
| 1673 |
+
],
|
| 1674 |
+
"hide_edges": [
|
| 1675 |
+
"edges"
|
| 1676 |
+
],
|
| 1677 |
+
"hide_multidiedges": [
|
| 1678 |
+
"edges"
|
| 1679 |
+
],
|
| 1680 |
+
"hide_multiedges": [
|
| 1681 |
+
"edges"
|
| 1682 |
+
],
|
| 1683 |
+
"show_diedges": [
|
| 1684 |
+
"edges"
|
| 1685 |
+
],
|
| 1686 |
+
"show_edges": [
|
| 1687 |
+
"edges"
|
| 1688 |
+
],
|
| 1689 |
+
"show_multidiedges": [
|
| 1690 |
+
"edges"
|
| 1691 |
+
],
|
| 1692 |
+
"show_multiedges": [
|
| 1693 |
+
"edges"
|
| 1694 |
+
]
|
| 1695 |
+
},
|
| 1696 |
+
"description": "Discovered via AST scan"
|
| 1697 |
+
},
|
| 1698 |
+
{
|
| 1699 |
+
"package": "snapx.snapx.classes",
|
| 1700 |
+
"module": "function",
|
| 1701 |
+
"functions": [
|
| 1702 |
+
"freeze",
|
| 1703 |
+
"frozen",
|
| 1704 |
+
"set_edge_attributes",
|
| 1705 |
+
"set_node_attributes"
|
| 1706 |
+
],
|
| 1707 |
+
"classes": [],
|
| 1708 |
+
"function_signatures": {
|
| 1709 |
+
"set_node_attributes": [
|
| 1710 |
+
"G",
|
| 1711 |
+
"values",
|
| 1712 |
+
"name"
|
| 1713 |
+
],
|
| 1714 |
+
"set_edge_attributes": [
|
| 1715 |
+
"G",
|
| 1716 |
+
"values",
|
| 1717 |
+
"name"
|
| 1718 |
+
],
|
| 1719 |
+
"frozen": [],
|
| 1720 |
+
"freeze": [
|
| 1721 |
+
"G"
|
| 1722 |
+
]
|
| 1723 |
+
},
|
| 1724 |
+
"description": "Discovered via AST scan"
|
| 1725 |
+
},
|
| 1726 |
+
{
|
| 1727 |
+
"package": "snapx.snapx.classes",
|
| 1728 |
+
"module": "graphviews",
|
| 1729 |
+
"functions": [
|
| 1730 |
+
"subgraph_view"
|
| 1731 |
+
],
|
| 1732 |
+
"classes": [],
|
| 1733 |
+
"function_signatures": {
|
| 1734 |
+
"subgraph_view": [
|
| 1735 |
+
"G",
|
| 1736 |
+
"filter_node",
|
| 1737 |
+
"filter_edge"
|
| 1738 |
+
]
|
| 1739 |
+
},
|
| 1740 |
+
"description": "Discovered via AST scan"
|
| 1741 |
+
},
|
| 1742 |
+
{
|
| 1743 |
+
"package": "snapx.snapx.algorithms",
|
| 1744 |
+
"module": "dag",
|
| 1745 |
+
"functions": [
|
| 1746 |
+
"topological_sort"
|
| 1747 |
+
],
|
| 1748 |
+
"classes": [],
|
| 1749 |
+
"function_signatures": {
|
| 1750 |
+
"topological_sort": [
|
| 1751 |
+
"G"
|
| 1752 |
+
]
|
| 1753 |
+
},
|
| 1754 |
+
"description": "Discovered via AST scan"
|
| 1755 |
+
},
|
| 1756 |
+
{
|
| 1757 |
+
"package": "snapx.snapx.algorithms.centrality",
|
| 1758 |
+
"module": "snap_cent",
|
| 1759 |
+
"functions": [
|
| 1760 |
+
"get_degree_centr"
|
| 1761 |
+
],
|
| 1762 |
+
"classes": [],
|
| 1763 |
+
"function_signatures": {
|
| 1764 |
+
"get_degree_centr": [
|
| 1765 |
+
"graph",
|
| 1766 |
+
"nid"
|
| 1767 |
+
]
|
| 1768 |
+
},
|
| 1769 |
+
"description": "Discovered via AST scan"
|
| 1770 |
+
},
|
| 1771 |
+
{
|
| 1772 |
+
"package": "snapx.snapx.algorithms.components",
|
| 1773 |
+
"module": "components",
|
| 1774 |
+
"functions": [
|
| 1775 |
+
"connected_components",
|
| 1776 |
+
"max_connected_component"
|
| 1777 |
+
],
|
| 1778 |
+
"classes": [],
|
| 1779 |
+
"function_signatures": {
|
| 1780 |
+
"connected_components": [
|
| 1781 |
+
"G"
|
| 1782 |
+
],
|
| 1783 |
+
"max_connected_component": [
|
| 1784 |
+
"G"
|
| 1785 |
+
]
|
| 1786 |
+
},
|
| 1787 |
+
"description": "Discovered via AST scan"
|
| 1788 |
+
},
|
| 1789 |
+
{
|
| 1790 |
+
"package": "snapx.snapx.algorithms.shortest_paths",
|
| 1791 |
+
"module": "weighted",
|
| 1792 |
+
"functions": [
|
| 1793 |
+
"all_pairs_dijkstra",
|
| 1794 |
+
"all_pairs_dijkstra_path",
|
| 1795 |
+
"all_pairs_dijkstra_path_length",
|
| 1796 |
+
"bidirectional_dijkstra",
|
| 1797 |
+
"dijkstra_path",
|
| 1798 |
+
"dijkstra_path_length",
|
| 1799 |
+
"dijkstra_predecessor_and_distance",
|
| 1800 |
+
"johnson",
|
| 1801 |
+
"multi_source_dijkstra",
|
| 1802 |
+
"multi_source_dijkstra_path",
|
| 1803 |
+
"multi_source_dijkstra_path_length",
|
| 1804 |
+
"single_source_dijkstra",
|
| 1805 |
+
"single_source_dijkstra_path",
|
| 1806 |
+
"single_source_dijkstra_path_length"
|
| 1807 |
+
],
|
| 1808 |
+
"classes": [],
|
| 1809 |
+
"function_signatures": {
|
| 1810 |
+
"dijkstra_path": [
|
| 1811 |
+
"G",
|
| 1812 |
+
"source",
|
| 1813 |
+
"target",
|
| 1814 |
+
"weight"
|
| 1815 |
+
],
|
| 1816 |
+
"dijkstra_path_length": [
|
| 1817 |
+
"G",
|
| 1818 |
+
"source",
|
| 1819 |
+
"target",
|
| 1820 |
+
"weight"
|
| 1821 |
+
],
|
| 1822 |
+
"single_source_dijkstra_path": [
|
| 1823 |
+
"G",
|
| 1824 |
+
"source",
|
| 1825 |
+
"cutoff",
|
| 1826 |
+
"weight"
|
| 1827 |
+
],
|
| 1828 |
+
"single_source_dijkstra_path_length": [
|
| 1829 |
+
"G",
|
| 1830 |
+
"source",
|
| 1831 |
+
"cutoff",
|
| 1832 |
+
"weight"
|
| 1833 |
+
],
|
| 1834 |
+
"single_source_dijkstra": [
|
| 1835 |
+
"G",
|
| 1836 |
+
"source",
|
| 1837 |
+
"target",
|
| 1838 |
+
"cutoff",
|
| 1839 |
+
"weight"
|
| 1840 |
+
],
|
| 1841 |
+
"multi_source_dijkstra_path": [
|
| 1842 |
+
"G",
|
| 1843 |
+
"sources",
|
| 1844 |
+
"cutoff",
|
| 1845 |
+
"weight"
|
| 1846 |
+
],
|
| 1847 |
+
"multi_source_dijkstra_path_length": [
|
| 1848 |
+
"G",
|
| 1849 |
+
"sources",
|
| 1850 |
+
"cutoff",
|
| 1851 |
+
"weight"
|
| 1852 |
+
],
|
| 1853 |
+
"multi_source_dijkstra": [
|
| 1854 |
+
"G",
|
| 1855 |
+
"sources",
|
| 1856 |
+
"target",
|
| 1857 |
+
"cutoff",
|
| 1858 |
+
"weight"
|
| 1859 |
+
],
|
| 1860 |
+
"dijkstra_predecessor_and_distance": [
|
| 1861 |
+
"G",
|
| 1862 |
+
"source",
|
| 1863 |
+
"cutoff",
|
| 1864 |
+
"weight"
|
| 1865 |
+
],
|
| 1866 |
+
"all_pairs_dijkstra": [
|
| 1867 |
+
"G",
|
| 1868 |
+
"cutoff",
|
| 1869 |
+
"weight"
|
| 1870 |
+
],
|
| 1871 |
+
"all_pairs_dijkstra_path_length": [
|
| 1872 |
+
"G",
|
| 1873 |
+
"cutoff",
|
| 1874 |
+
"weight"
|
| 1875 |
+
],
|
| 1876 |
+
"all_pairs_dijkstra_path": [
|
| 1877 |
+
"G",
|
| 1878 |
+
"cutoff",
|
| 1879 |
+
"weight"
|
| 1880 |
+
],
|
| 1881 |
+
"bidirectional_dijkstra": [
|
| 1882 |
+
"G",
|
| 1883 |
+
"source",
|
| 1884 |
+
"target",
|
| 1885 |
+
"weight"
|
| 1886 |
+
],
|
| 1887 |
+
"johnson": [
|
| 1888 |
+
"G",
|
| 1889 |
+
"weight"
|
| 1890 |
+
]
|
| 1891 |
+
},
|
| 1892 |
+
"description": "Discovered via AST scan"
|
| 1893 |
+
},
|
| 1894 |
+
{
|
| 1895 |
+
"package": "snapx.snapx.algorithms.shortest_paths",
|
| 1896 |
+
"module": "unweighted",
|
| 1897 |
+
"functions": [
|
| 1898 |
+
"all_pairs_shortest_path_length",
|
| 1899 |
+
"bidirectional_shortest_path",
|
| 1900 |
+
"single_source_shortest_path",
|
| 1901 |
+
"single_source_shortest_path_length",
|
| 1902 |
+
"single_target_shortest_path",
|
| 1903 |
+
"single_target_shortest_path_length"
|
| 1904 |
+
],
|
| 1905 |
+
"classes": [],
|
| 1906 |
+
"function_signatures": {
|
| 1907 |
+
"single_source_shortest_path_length": [
|
| 1908 |
+
"G",
|
| 1909 |
+
"source",
|
| 1910 |
+
"cutoff"
|
| 1911 |
+
],
|
| 1912 |
+
"single_target_shortest_path_length": [
|
| 1913 |
+
"G",
|
| 1914 |
+
"target",
|
| 1915 |
+
"cutoff"
|
| 1916 |
+
],
|
| 1917 |
+
"all_pairs_shortest_path_length": [
|
| 1918 |
+
"G",
|
| 1919 |
+
"cutoff"
|
| 1920 |
+
],
|
| 1921 |
+
"bidirectional_shortest_path": [
|
| 1922 |
+
"G",
|
| 1923 |
+
"source",
|
| 1924 |
+
"target"
|
| 1925 |
+
],
|
| 1926 |
+
"single_source_shortest_path": [
|
| 1927 |
+
"G",
|
| 1928 |
+
"source",
|
| 1929 |
+
"cutoff"
|
| 1930 |
+
],
|
| 1931 |
+
"single_target_shortest_path": [
|
| 1932 |
+
"G",
|
| 1933 |
+
"target",
|
| 1934 |
+
"cutoff"
|
| 1935 |
+
]
|
| 1936 |
+
},
|
| 1937 |
+
"description": "Discovered via AST scan"
|
| 1938 |
+
},
|
| 1939 |
+
{
|
| 1940 |
+
"package": "snapx.snapx.algorithms.community",
|
| 1941 |
+
"module": "snap_cmty",
|
| 1942 |
+
"functions": [
|
| 1943 |
+
"community_CNM",
|
| 1944 |
+
"community_girvan_newman"
|
| 1945 |
+
],
|
| 1946 |
+
"classes": [],
|
| 1947 |
+
"function_signatures": {
|
| 1948 |
+
"community_CNM": [
|
| 1949 |
+
"graph"
|
| 1950 |
+
],
|
| 1951 |
+
"community_girvan_newman": [
|
| 1952 |
+
"graph"
|
| 1953 |
+
]
|
| 1954 |
+
},
|
| 1955 |
+
"description": "Discovered via AST scan"
|
| 1956 |
+
},
|
| 1957 |
+
{
|
| 1958 |
+
"package": "snapx.snapx.utils",
|
| 1959 |
+
"module": "misc",
|
| 1960 |
+
"functions": [
|
| 1961 |
+
"pairwise"
|
| 1962 |
+
],
|
| 1963 |
+
"classes": [],
|
| 1964 |
+
"function_signatures": {
|
| 1965 |
+
"pairwise": [
|
| 1966 |
+
"iterable",
|
| 1967 |
+
"cyclic"
|
| 1968 |
+
]
|
| 1969 |
+
},
|
| 1970 |
+
"description": "Discovered via AST scan"
|
| 1971 |
+
},
|
| 1972 |
+
{
|
| 1973 |
+
"package": "snapx.snapx.utils",
|
| 1974 |
+
"module": "decorator",
|
| 1975 |
+
"functions": [
|
| 1976 |
+
"append",
|
| 1977 |
+
"contextmanager",
|
| 1978 |
+
"decorate",
|
| 1979 |
+
"decorator",
|
| 1980 |
+
"dispatch_on"
|
| 1981 |
+
],
|
| 1982 |
+
"classes": [
|
| 1983 |
+
"ContextManager",
|
| 1984 |
+
"FunctionMaker"
|
| 1985 |
+
],
|
| 1986 |
+
"function_signatures": {
|
| 1987 |
+
"decorate": [
|
| 1988 |
+
"func",
|
| 1989 |
+
"caller",
|
| 1990 |
+
"extras"
|
| 1991 |
+
],
|
| 1992 |
+
"decorator": [
|
| 1993 |
+
"caller",
|
| 1994 |
+
"_func"
|
| 1995 |
+
],
|
| 1996 |
+
"contextmanager": [
|
| 1997 |
+
"func"
|
| 1998 |
+
],
|
| 1999 |
+
"append": [
|
| 2000 |
+
"a",
|
| 2001 |
+
"vancestors"
|
| 2002 |
+
],
|
| 2003 |
+
"dispatch_on": []
|
| 2004 |
+
},
|
| 2005 |
+
"description": "Discovered via AST scan"
|
| 2006 |
+
},
|
| 2007 |
+
{
|
| 2008 |
+
"package": "snapx.snapx.utils",
|
| 2009 |
+
"module": "decorators",
|
| 2010 |
+
"functions": [
|
| 2011 |
+
"nodes_or_number",
|
| 2012 |
+
"not_implemented_for"
|
| 2013 |
+
],
|
| 2014 |
+
"classes": [],
|
| 2015 |
+
"function_signatures": {
|
| 2016 |
+
"nodes_or_number": [
|
| 2017 |
+
"which_args"
|
| 2018 |
+
],
|
| 2019 |
+
"not_implemented_for": []
|
| 2020 |
+
},
|
| 2021 |
+
"description": "Discovered via AST scan"
|
| 2022 |
+
},
|
| 2023 |
+
{
|
| 2024 |
+
"package": "snapx.snapx.generators",
|
| 2025 |
+
"module": "classic",
|
| 2026 |
+
"functions": [
|
| 2027 |
+
"empty_graph",
|
| 2028 |
+
"path_graph"
|
| 2029 |
+
],
|
| 2030 |
+
"classes": [],
|
| 2031 |
+
"function_signatures": {
|
| 2032 |
+
"empty_graph": [
|
| 2033 |
+
"n",
|
| 2034 |
+
"create_using",
|
| 2035 |
+
"default"
|
| 2036 |
+
],
|
| 2037 |
+
"path_graph": [
|
| 2038 |
+
"n",
|
| 2039 |
+
"create_using"
|
| 2040 |
+
]
|
| 2041 |
+
},
|
| 2042 |
+
"description": "Discovered via AST scan"
|
| 2043 |
+
},
|
| 2044 |
+
{
|
| 2045 |
+
"package": "snapx.snapx.generators",
|
| 2046 |
+
"module": "ego",
|
| 2047 |
+
"functions": [
|
| 2048 |
+
"ego_graph"
|
| 2049 |
+
],
|
| 2050 |
+
"classes": [],
|
| 2051 |
+
"function_signatures": {
|
| 2052 |
+
"ego_graph": [
|
| 2053 |
+
"G",
|
| 2054 |
+
"n",
|
| 2055 |
+
"radius",
|
| 2056 |
+
"sample",
|
| 2057 |
+
"traversal",
|
| 2058 |
+
"copy_attr"
|
| 2059 |
+
]
|
| 2060 |
+
},
|
| 2061 |
+
"description": "Discovered via AST scan"
|
| 2062 |
+
}
|
| 2063 |
+
],
|
| 2064 |
+
"cli_commands": [],
|
| 2065 |
+
"import_strategy": {
|
| 2066 |
+
"primary": "import",
|
| 2067 |
+
"fallback": "blackbox",
|
| 2068 |
+
"confidence": 0.9
|
| 2069 |
+
},
|
| 2070 |
+
"dependencies": {
|
| 2071 |
+
"required": [
|
| 2072 |
+
"python (runtime)",
|
| 2073 |
+
"snapx package modules under source.snapx.snapx"
|
| 2074 |
+
],
|
| 2075 |
+
"optional": [
|
| 2076 |
+
"networkx (for interoperability paths in convert layer, if used)",
|
| 2077 |
+
"compiled SNAP/SWIG extension for source.swig.snap usage",
|
| 2078 |
+
"numpy/scipy (only if specific algorithm paths request them indirectly)"
|
| 2079 |
+
]
|
| 2080 |
+
},
|
| 2081 |
+
"risk_assessment": {
|
| 2082 |
+
"import_feasibility": 0.82,
|
| 2083 |
+
"intrusiveness_risk": "low",
|
| 2084 |
+
"complexity": "medium"
|
| 2085 |
+
}
|
| 2086 |
+
},
|
| 2087 |
+
"deepwiki_analysis": {
|
| 2088 |
+
"repo_url": "https://github.com/snap-stanford/snap-python",
|
| 2089 |
+
"repo_name": "snap-python",
|
| 2090 |
+
"error": "DeepWiki analysis failed",
|
| 2091 |
+
"model": "gpt-5.3-codex",
|
| 2092 |
+
"source": "llm_direct_analysis",
|
| 2093 |
+
"success": false
|
| 2094 |
+
},
|
| 2095 |
+
"deepwiki_options": {
|
| 2096 |
+
"enabled": true,
|
| 2097 |
+
"model": "gpt-5.3-codex"
|
| 2098 |
+
},
|
| 2099 |
+
"risk": {
|
| 2100 |
+
"import_feasibility": 0.82,
|
| 2101 |
+
"intrusiveness_risk": "low",
|
| 2102 |
+
"complexity": "medium"
|
| 2103 |
+
}
|
| 2104 |
+
}
|
snap-python/mcp_output/diff_report.md
ADDED
|
@@ -0,0 +1,133 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Difference Report — `snap-python`
|
| 2 |
+
|
| 3 |
+
**Generated:** 2026-03-11 23:35:38
|
| 4 |
+
**Repository:** `snap-python`
|
| 5 |
+
**Project Type:** Python library
|
| 6 |
+
**Scope:** Basic functionality
|
| 7 |
+
**Change Intrusiveness:** None
|
| 8 |
+
**Workflow Status:** ✅ Success
|
| 9 |
+
**Test Status:** ❌ Failed
|
| 10 |
+
|
| 11 |
+
---
|
| 12 |
+
|
| 13 |
+
## 1) Project Overview
|
| 14 |
+
|
| 15 |
+
This change set introduces **8 new files** with **no modifications** to existing files.
|
| 16 |
+
The update appears to be an additive baseline increment for core/library scaffolding or initial feature enablement, with no direct refactors to current code paths.
|
| 17 |
+
|
| 18 |
+
---
|
| 19 |
+
|
| 20 |
+
## 2) Change Summary
|
| 21 |
+
|
| 22 |
+
| Metric | Value |
|
| 23 |
+
|---|---|
|
| 24 |
+
| New files | 8 |
|
| 25 |
+
| Modified files | 0 |
|
| 26 |
+
| Deleted files | 0 (not reported) |
|
| 27 |
+
| Intrusive changes | None |
|
| 28 |
+
| CI/Workflow | Success |
|
| 29 |
+
| Tests | Failed |
|
| 30 |
+
|
| 31 |
+
### Interpretation
|
| 32 |
+
- The delivery is structurally low-risk in terms of regressions to existing files.
|
| 33 |
+
- However, **failed tests** indicate integration, environment, or quality-gate issues that currently block confidence in release readiness.
|
| 34 |
+
|
| 35 |
+
---
|
| 36 |
+
|
| 37 |
+
## 3) Difference Analysis
|
| 38 |
+
|
| 39 |
+
## 3.1 Functional Delta
|
| 40 |
+
- Since only new files were added, this likely introduces:
|
| 41 |
+
- new module(s), utility code, or packaging/config artifacts,
|
| 42 |
+
- potential test assets and/or docs scaffolding.
|
| 43 |
+
- No existing behavior is explicitly rewritten, but runtime behavior can still change if imports, entry points, or package discovery now include new modules.
|
| 44 |
+
|
| 45 |
+
## 3.2 Risk Profile
|
| 46 |
+
- **Code churn risk:** Low (no modified files).
|
| 47 |
+
- **Integration risk:** Medium (new files can alter dependency graph, import order, packaging metadata, or test discovery).
|
| 48 |
+
- **Release risk:** Medium–High due to failed tests.
|
| 49 |
+
|
| 50 |
+
---
|
| 51 |
+
|
| 52 |
+
## 4) Technical Analysis
|
| 53 |
+
|
| 54 |
+
## 4.1 CI vs Test Signal
|
| 55 |
+
- **Workflow success + test failure** commonly means:
|
| 56 |
+
1. Pipeline execution succeeded technically (jobs ran to completion),
|
| 57 |
+
2. but quality gate failed at the test stage.
|
| 58 |
+
|
| 59 |
+
## 4.2 Likely Failure Categories (for additive-only changes)
|
| 60 |
+
- Missing/incorrect test fixtures for new modules.
|
| 61 |
+
- Import path or package init issues (`__init__.py`, relative imports, namespace package behavior).
|
| 62 |
+
- Dependency/version mismatch introduced by new files or metadata.
|
| 63 |
+
- Pytest discovery picking up incomplete tests or placeholders.
|
| 64 |
+
- Type/runtime assumptions not met in CI environment.
|
| 65 |
+
|
| 66 |
+
## 4.3 Maintainability Impact
|
| 67 |
+
- Additive changes improve extensibility if structured cleanly.
|
| 68 |
+
- Without passing tests, maintainability confidence is reduced (uncertain behavior contract).
|
| 69 |
+
|
| 70 |
+
---
|
| 71 |
+
|
| 72 |
+
## 5) Recommendations & Improvements
|
| 73 |
+
|
| 74 |
+
## 5.1 Immediate (Blocker Resolution)
|
| 75 |
+
1. **Triage failing tests first**
|
| 76 |
+
- Identify exact failing test cases and stack traces.
|
| 77 |
+
- Classify as: test defect vs implementation defect vs environment defect.
|
| 78 |
+
2. **Run focused local reproduction**
|
| 79 |
+
- Re-run with verbose output (`-vv`) and isolated target modules.
|
| 80 |
+
3. **Validate packaging/import topology**
|
| 81 |
+
- Confirm module discovery and path correctness for all 8 new files.
|
| 82 |
+
4. **Stabilize CI matrix**
|
| 83 |
+
- Verify Python version compatibility and dependency lock consistency.
|
| 84 |
+
|
| 85 |
+
## 5.2 Quality Hardening
|
| 86 |
+
- Add/expand unit tests for each new file’s primary behavior.
|
| 87 |
+
- Include smoke tests for package import and minimal public API usage.
|
| 88 |
+
- Enforce lint/type checks (if not already gated): `ruff/flake8`, `mypy/pyright`.
|
| 89 |
+
- Add coverage threshold for newly introduced modules.
|
| 90 |
+
|
| 91 |
+
## 5.3 Process Improvements
|
| 92 |
+
- Require “tests pass” as mandatory merge gate.
|
| 93 |
+
- Include a brief architectural note for newly added modules (purpose, ownership, API boundary).
|
| 94 |
+
- Add changelog entry describing user-visible impact (if any).
|
| 95 |
+
|
| 96 |
+
---
|
| 97 |
+
|
| 98 |
+
## 6) Deployment Information
|
| 99 |
+
|
| 100 |
+
**Deployment Readiness:** ❌ **Not ready for production release** (due to failed tests)
|
| 101 |
+
|
| 102 |
+
### Pre-deployment checklist
|
| 103 |
+
- [ ] All test suites pass in CI
|
| 104 |
+
- [ ] New files validated for packaging/distribution inclusion
|
| 105 |
+
- [ ] Dependency graph unchanged or reviewed
|
| 106 |
+
- [ ] Versioning/changelog updated
|
| 107 |
+
- [ ] Rollback strategy documented (if release proceeds)
|
| 108 |
+
|
| 109 |
+
---
|
| 110 |
+
|
| 111 |
+
## 7) Future Planning
|
| 112 |
+
|
| 113 |
+
## 7.1 Short-term (next iteration)
|
| 114 |
+
- Resolve current failures and re-run full CI.
|
| 115 |
+
- Add regression tests specifically tied to new modules/files.
|
| 116 |
+
- Confirm backward compatibility of public APIs.
|
| 117 |
+
|
| 118 |
+
## 7.2 Mid-term
|
| 119 |
+
- Establish module-level ownership and code health KPIs.
|
| 120 |
+
- Introduce automated release notes based on file-level changes.
|
| 121 |
+
- Add contract tests for library consumers (import + basic call flows).
|
| 122 |
+
|
| 123 |
+
## 7.3 Long-term
|
| 124 |
+
- Maintain a stable compatibility matrix across Python versions.
|
| 125 |
+
- Implement semantic versioning discipline tied to API impact.
|
| 126 |
+
- Improve observability of test failures (flaky test detection, trend dashboards).
|
| 127 |
+
|
| 128 |
+
---
|
| 129 |
+
|
| 130 |
+
## 8) Executive Conclusion
|
| 131 |
+
|
| 132 |
+
The current diff is **additive and non-intrusive** (8 new files, 0 modified), which is favorable for controlled evolution of the library.
|
| 133 |
+
However, **failed tests are a hard release blocker**. Priority should be given to failure triage, import/packaging verification, and targeted test stabilization before deployment.
|
snap-python/mcp_output/mcp_plugin/__init__.py
ADDED
|
File without changes
|
snap-python/mcp_output/mcp_plugin/adapter.py
ADDED
|
@@ -0,0 +1,383 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import os
|
| 2 |
+
import sys
|
| 3 |
+
import importlib
|
| 4 |
+
import importlib.util
|
| 5 |
+
from typing import Any, Dict, Optional, Tuple
|
| 6 |
+
|
| 7 |
+
source_path = os.path.join(
|
| 8 |
+
os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))),
|
| 9 |
+
"source",
|
| 10 |
+
)
|
| 11 |
+
sys.path.insert(0, source_path)
|
| 12 |
+
|
| 13 |
+
|
| 14 |
+
class Adapter:
|
| 15 |
+
"""
|
| 16 |
+
Import-mode adapter for snap-python repository integration.
|
| 17 |
+
|
| 18 |
+
This adapter attempts to import repository-local modules discovered by analysis and
|
| 19 |
+
exposes callable wrappers with unified response dictionaries.
|
| 20 |
+
|
| 21 |
+
All public methods return:
|
| 22 |
+
{
|
| 23 |
+
"status": "success" | "error" | "fallback",
|
| 24 |
+
"mode": "import" | "fallback",
|
| 25 |
+
...
|
| 26 |
+
}
|
| 27 |
+
"""
|
| 28 |
+
|
| 29 |
+
# -------------------------------------------------------------------------
|
| 30 |
+
# Lifecycle and module management
|
| 31 |
+
# -------------------------------------------------------------------------
|
| 32 |
+
def __init__(self) -> None:
|
| 33 |
+
"""
|
| 34 |
+
Initialize adapter in import mode and attempt best-effort module loading.
|
| 35 |
+
"""
|
| 36 |
+
self.mode = "import"
|
| 37 |
+
self._modules: Dict[str, Any] = {}
|
| 38 |
+
self._import_errors: Dict[str, str] = {}
|
| 39 |
+
self._load_modules()
|
| 40 |
+
|
| 41 |
+
def _result(self, status: str, **kwargs: Any) -> Dict[str, Any]:
|
| 42 |
+
data = {"status": status, "mode": self.mode}
|
| 43 |
+
data.update(kwargs)
|
| 44 |
+
return data
|
| 45 |
+
|
| 46 |
+
def _safe_import(self, key: str, module_path: str) -> None:
|
| 47 |
+
try:
|
| 48 |
+
self._modules[key] = importlib.import_module(module_path)
|
| 49 |
+
except Exception as e:
|
| 50 |
+
self._modules[key] = None
|
| 51 |
+
self._import_errors[key] = (
|
| 52 |
+
f"Failed to import '{module_path}'. "
|
| 53 |
+
f"Ensure repository source is available under '{source_path}' and dependencies are installed. "
|
| 54 |
+
f"Details: {e}"
|
| 55 |
+
)
|
| 56 |
+
|
| 57 |
+
def _load_hyphen_module(self, key: str, relative_path: str) -> None:
|
| 58 |
+
abs_path = os.path.join(source_path, relative_path)
|
| 59 |
+
try:
|
| 60 |
+
if not os.path.exists(abs_path):
|
| 61 |
+
raise FileNotFoundError(
|
| 62 |
+
f"Module file not found at '{abs_path}'. Check repository extraction path."
|
| 63 |
+
)
|
| 64 |
+
spec = importlib.util.spec_from_file_location(key, abs_path)
|
| 65 |
+
if spec is None or spec.loader is None:
|
| 66 |
+
raise ImportError(
|
| 67 |
+
f"Could not create import spec for '{abs_path}'."
|
| 68 |
+
)
|
| 69 |
+
module = importlib.util.module_from_spec(spec)
|
| 70 |
+
spec.loader.exec_module(module)
|
| 71 |
+
self._modules[key] = module
|
| 72 |
+
except Exception as e:
|
| 73 |
+
self._modules[key] = None
|
| 74 |
+
self._import_errors[key] = (
|
| 75 |
+
f"Failed to load module from '{abs_path}'. "
|
| 76 |
+
f"Verify file presence and Python compatibility. Details: {e}"
|
| 77 |
+
)
|
| 78 |
+
|
| 79 |
+
def _load_modules(self) -> None:
|
| 80 |
+
"""
|
| 81 |
+
Load all discovered modules/classes/functions from analysis.
|
| 82 |
+
"""
|
| 83 |
+
# Classes in setup modules
|
| 84 |
+
self._safe_import("setup_setup", "setup")
|
| 85 |
+
self._safe_import("swig_setup", "swig.setup")
|
| 86 |
+
|
| 87 |
+
# Functions in standard importable module
|
| 88 |
+
self._safe_import("genClassFnExt", "swig.gen.genClassFn.archive.genClassFnExt")
|
| 89 |
+
|
| 90 |
+
# Functions in modules with hyphenated filenames (manual load)
|
| 91 |
+
self._load_hyphen_module("disp_custom", os.path.join("swig", "gen", "disp-custom.py"))
|
| 92 |
+
self._load_hyphen_module("tneanet_cpp", os.path.join("dev", "examples", "tneanet-cpp.py"))
|
| 93 |
+
self._load_hyphen_module("snapswig_check", os.path.join("dev", "examples", "snapswig-check.py"))
|
| 94 |
+
|
| 95 |
+
if self._import_errors:
|
| 96 |
+
self.mode = "fallback"
|
| 97 |
+
|
| 98 |
+
def health_check(self) -> Dict[str, Any]:
|
| 99 |
+
"""
|
| 100 |
+
Return adapter/module import status.
|
| 101 |
+
|
| 102 |
+
Returns:
|
| 103 |
+
dict: Unified status payload with loaded module keys and import errors.
|
| 104 |
+
"""
|
| 105 |
+
loaded = [k for k, v in self._modules.items() if v is not None]
|
| 106 |
+
return self._result(
|
| 107 |
+
"success" if not self._import_errors else "fallback",
|
| 108 |
+
loaded_modules=loaded,
|
| 109 |
+
import_errors=self._import_errors,
|
| 110 |
+
guidance=(
|
| 111 |
+
"If imports failed, ensure the repository is present under the configured source path, "
|
| 112 |
+
"and install optional build/runtime dependencies for SWIG-based modules."
|
| 113 |
+
),
|
| 114 |
+
)
|
| 115 |
+
|
| 116 |
+
# -------------------------------------------------------------------------
|
| 117 |
+
# Class instance creators
|
| 118 |
+
# -------------------------------------------------------------------------
|
| 119 |
+
def create_setup_swigbuild(self, *args: Any, **kwargs: Any) -> Dict[str, Any]:
|
| 120 |
+
"""
|
| 121 |
+
Create instance of setup.SwigBuild.
|
| 122 |
+
|
| 123 |
+
Parameters:
|
| 124 |
+
*args: Positional arguments forwarded to setup.SwigBuild constructor.
|
| 125 |
+
**kwargs: Keyword arguments forwarded to setup.SwigBuild constructor.
|
| 126 |
+
|
| 127 |
+
Returns:
|
| 128 |
+
dict: status and created instance or actionable error.
|
| 129 |
+
"""
|
| 130 |
+
module = self._modules.get("setup_setup")
|
| 131 |
+
if module is None or not hasattr(module, "SwigBuild"):
|
| 132 |
+
return self._result(
|
| 133 |
+
"fallback",
|
| 134 |
+
error="Class 'SwigBuild' in module 'setup' is unavailable.",
|
| 135 |
+
guidance="Ensure 'setup.py' is importable and supports runtime class instantiation.",
|
| 136 |
+
)
|
| 137 |
+
try:
|
| 138 |
+
instance = module.SwigBuild(*args, **kwargs)
|
| 139 |
+
return self._result("success", class_name="SwigBuild", instance=instance)
|
| 140 |
+
except Exception as e:
|
| 141 |
+
return self._result(
|
| 142 |
+
"error",
|
| 143 |
+
error=f"Failed to instantiate setup.SwigBuild: {e}",
|
| 144 |
+
guidance="Check constructor arguments required by distutils/setuptools command classes.",
|
| 145 |
+
)
|
| 146 |
+
|
| 147 |
+
def create_setup_swigextension(self, *args: Any, **kwargs: Any) -> Dict[str, Any]:
|
| 148 |
+
"""
|
| 149 |
+
Create instance of setup.SwigExtension.
|
| 150 |
+
"""
|
| 151 |
+
module = self._modules.get("setup_setup")
|
| 152 |
+
if module is None or not hasattr(module, "SwigExtension"):
|
| 153 |
+
return self._result(
|
| 154 |
+
"fallback",
|
| 155 |
+
error="Class 'SwigExtension' in module 'setup' is unavailable.",
|
| 156 |
+
guidance="Ensure setup module loads successfully.",
|
| 157 |
+
)
|
| 158 |
+
try:
|
| 159 |
+
instance = module.SwigExtension(*args, **kwargs)
|
| 160 |
+
return self._result("success", class_name="SwigExtension", instance=instance)
|
| 161 |
+
except Exception as e:
|
| 162 |
+
return self._result(
|
| 163 |
+
"error",
|
| 164 |
+
error=f"Failed to instantiate setup.SwigExtension: {e}",
|
| 165 |
+
guidance="Provide valid extension constructor parameters (name, sources, and config).",
|
| 166 |
+
)
|
| 167 |
+
|
| 168 |
+
def create_swig_setup_pkgbuild(self, *args: Any, **kwargs: Any) -> Dict[str, Any]:
|
| 169 |
+
"""
|
| 170 |
+
Create instance of swig.setup.PkgBuild.
|
| 171 |
+
"""
|
| 172 |
+
module = self._modules.get("swig_setup")
|
| 173 |
+
if module is None or not hasattr(module, "PkgBuild"):
|
| 174 |
+
return self._result(
|
| 175 |
+
"fallback",
|
| 176 |
+
error="Class 'PkgBuild' in module 'swig.setup' is unavailable.",
|
| 177 |
+
guidance="Ensure swig setup module is present and importable.",
|
| 178 |
+
)
|
| 179 |
+
try:
|
| 180 |
+
instance = module.PkgBuild(*args, **kwargs)
|
| 181 |
+
return self._result("success", class_name="PkgBuild", instance=instance)
|
| 182 |
+
except Exception as e:
|
| 183 |
+
return self._result(
|
| 184 |
+
"error",
|
| 185 |
+
error=f"Failed to instantiate swig.setup.PkgBuild: {e}",
|
| 186 |
+
guidance="Verify arguments expected by build command classes.",
|
| 187 |
+
)
|
| 188 |
+
|
| 189 |
+
def create_swig_setup_swigextension(self, *args: Any, **kwargs: Any) -> Dict[str, Any]:
|
| 190 |
+
"""
|
| 191 |
+
Create instance of swig.setup.SwigExtension.
|
| 192 |
+
"""
|
| 193 |
+
module = self._modules.get("swig_setup")
|
| 194 |
+
if module is None or not hasattr(module, "SwigExtension"):
|
| 195 |
+
return self._result(
|
| 196 |
+
"fallback",
|
| 197 |
+
error="Class 'SwigExtension' in module 'swig.setup' is unavailable.",
|
| 198 |
+
guidance="Ensure swig setup module import succeeds.",
|
| 199 |
+
)
|
| 200 |
+
try:
|
| 201 |
+
instance = module.SwigExtension(*args, **kwargs)
|
| 202 |
+
return self._result("success", class_name="SwigExtension", instance=instance)
|
| 203 |
+
except Exception as e:
|
| 204 |
+
return self._result(
|
| 205 |
+
"error",
|
| 206 |
+
error=f"Failed to instantiate swig.setup.SwigExtension: {e}",
|
| 207 |
+
guidance="Pass valid extension initialization arguments.",
|
| 208 |
+
)
|
| 209 |
+
|
| 210 |
+
# -------------------------------------------------------------------------
|
| 211 |
+
# Function call wrappers
|
| 212 |
+
# -------------------------------------------------------------------------
|
| 213 |
+
def call_convert_esubgraph(self, *args: Any, **kwargs: Any) -> Dict[str, Any]:
|
| 214 |
+
"""
|
| 215 |
+
Call swig.gen.disp-custom.ConvertESubGraph.
|
| 216 |
+
|
| 217 |
+
Parameters:
|
| 218 |
+
*args: Forwarded to ConvertESubGraph.
|
| 219 |
+
**kwargs: Forwarded to ConvertESubGraph.
|
| 220 |
+
"""
|
| 221 |
+
module = self._modules.get("disp_custom")
|
| 222 |
+
if module is None or not hasattr(module, "ConvertESubGraph"):
|
| 223 |
+
return self._result(
|
| 224 |
+
"fallback",
|
| 225 |
+
error="Function 'ConvertESubGraph' is unavailable.",
|
| 226 |
+
guidance="Check swig/gen/disp-custom.py availability and compatibility.",
|
| 227 |
+
)
|
| 228 |
+
try:
|
| 229 |
+
result = module.ConvertESubGraph(*args, **kwargs)
|
| 230 |
+
return self._result("success", function="ConvertESubGraph", result=result)
|
| 231 |
+
except Exception as e:
|
| 232 |
+
return self._result(
|
| 233 |
+
"error",
|
| 234 |
+
error=f"ConvertESubGraph execution failed: {e}",
|
| 235 |
+
guidance="Validate argument types and graph object compatibility.",
|
| 236 |
+
)
|
| 237 |
+
|
| 238 |
+
def call_convert_graph(self, *args: Any, **kwargs: Any) -> Dict[str, Any]:
|
| 239 |
+
"""
|
| 240 |
+
Call swig.gen.disp-custom.ConvertGraph.
|
| 241 |
+
"""
|
| 242 |
+
module = self._modules.get("disp_custom")
|
| 243 |
+
if module is None or not hasattr(module, "ConvertGraph"):
|
| 244 |
+
return self._result(
|
| 245 |
+
"fallback",
|
| 246 |
+
error="Function 'ConvertGraph' is unavailable.",
|
| 247 |
+
guidance="Check swig/gen/disp-custom.py load status.",
|
| 248 |
+
)
|
| 249 |
+
try:
|
| 250 |
+
result = module.ConvertGraph(*args, **kwargs)
|
| 251 |
+
return self._result("success", function="ConvertGraph", result=result)
|
| 252 |
+
except Exception as e:
|
| 253 |
+
return self._result(
|
| 254 |
+
"error",
|
| 255 |
+
error=f"ConvertGraph execution failed: {e}",
|
| 256 |
+
guidance="Ensure provided graph parameters match expected SNAP/SWIG types.",
|
| 257 |
+
)
|
| 258 |
+
|
| 259 |
+
def call_convert_subgraph(self, *args: Any, **kwargs: Any) -> Dict[str, Any]:
|
| 260 |
+
"""
|
| 261 |
+
Call swig.gen.disp-custom.ConvertSubGraph.
|
| 262 |
+
"""
|
| 263 |
+
module = self._modules.get("disp_custom")
|
| 264 |
+
if module is None or not hasattr(module, "ConvertSubGraph"):
|
| 265 |
+
return self._result(
|
| 266 |
+
"fallback",
|
| 267 |
+
error="Function 'ConvertSubGraph' is unavailable.",
|
| 268 |
+
guidance="Check swig/gen/disp-custom.py and repository source path.",
|
| 269 |
+
)
|
| 270 |
+
try:
|
| 271 |
+
result = module.ConvertSubGraph(*args, **kwargs)
|
| 272 |
+
return self._result("success", function="ConvertSubGraph", result=result)
|
| 273 |
+
except Exception as e:
|
| 274 |
+
return self._result(
|
| 275 |
+
"error",
|
| 276 |
+
error=f"ConvertSubGraph execution failed: {e}",
|
| 277 |
+
guidance="Review node/edge subset arguments and graph input types.",
|
| 278 |
+
)
|
| 279 |
+
|
| 280 |
+
def call_gen_func_call(self, *args: Any, **kwargs: Any) -> Dict[str, Any]:
|
| 281 |
+
"""
|
| 282 |
+
Call swig.gen.genClassFn.archive.genClassFnExt.genFuncCall.
|
| 283 |
+
"""
|
| 284 |
+
module = self._modules.get("genClassFnExt")
|
| 285 |
+
if module is None or not hasattr(module, "genFuncCall"):
|
| 286 |
+
return self._result(
|
| 287 |
+
"fallback",
|
| 288 |
+
error="Function 'genFuncCall' is unavailable.",
|
| 289 |
+
guidance="Ensure module swig.gen.genClassFn.archive.genClassFnExt imports correctly.",
|
| 290 |
+
)
|
| 291 |
+
try:
|
| 292 |
+
result = module.genFuncCall(*args, **kwargs)
|
| 293 |
+
return self._result("success", function="genFuncCall", result=result)
|
| 294 |
+
except Exception as e:
|
| 295 |
+
return self._result(
|
| 296 |
+
"error",
|
| 297 |
+
error=f"genFuncCall execution failed: {e}",
|
| 298 |
+
guidance="Verify expected inputs for class/function generation utility.",
|
| 299 |
+
)
|
| 300 |
+
|
| 301 |
+
def call_get_func_name(self, *args: Any, **kwargs: Any) -> Dict[str, Any]:
|
| 302 |
+
"""
|
| 303 |
+
Call swig.gen.genClassFn.archive.genClassFnExt.getFuncName.
|
| 304 |
+
"""
|
| 305 |
+
module = self._modules.get("genClassFnExt")
|
| 306 |
+
if module is None or not hasattr(module, "getFuncName"):
|
| 307 |
+
return self._result(
|
| 308 |
+
"fallback",
|
| 309 |
+
error="Function 'getFuncName' is unavailable.",
|
| 310 |
+
guidance="Check import status for swig.gen.genClassFn.archive.genClassFnExt.",
|
| 311 |
+
)
|
| 312 |
+
try:
|
| 313 |
+
result = module.getFuncName(*args, **kwargs)
|
| 314 |
+
return self._result("success", function="getFuncName", result=result)
|
| 315 |
+
except Exception as e:
|
| 316 |
+
return self._result(
|
| 317 |
+
"error",
|
| 318 |
+
error=f"getFuncName execution failed: {e}",
|
| 319 |
+
guidance="Provide input matching expected parser/line format.",
|
| 320 |
+
)
|
| 321 |
+
|
| 322 |
+
def call_remove_first_param(self, *args: Any, **kwargs: Any) -> Dict[str, Any]:
|
| 323 |
+
"""
|
| 324 |
+
Call swig.gen.genClassFn.archive.genClassFnExt.removeFirstParam.
|
| 325 |
+
"""
|
| 326 |
+
module = self._modules.get("genClassFnExt")
|
| 327 |
+
if module is None or not hasattr(module, "removeFirstParam"):
|
| 328 |
+
return self._result(
|
| 329 |
+
"fallback",
|
| 330 |
+
error="Function 'removeFirstParam' is unavailable.",
|
| 331 |
+
guidance="Ensure genClassFnExt module loaded without syntax/runtime issues.",
|
| 332 |
+
)
|
| 333 |
+
try:
|
| 334 |
+
result = module.removeFirstParam(*args, **kwargs)
|
| 335 |
+
return self._result("success", function="removeFirstParam", result=result)
|
| 336 |
+
except Exception as e:
|
| 337 |
+
return self._result(
|
| 338 |
+
"error",
|
| 339 |
+
error=f"removeFirstParam execution failed: {e}",
|
| 340 |
+
guidance="Check parameter string structure before invoking this utility.",
|
| 341 |
+
)
|
| 342 |
+
|
| 343 |
+
def call_tneanet_cpp_main(self, *args: Any, **kwargs: Any) -> Dict[str, Any]:
|
| 344 |
+
"""
|
| 345 |
+
Call dev.examples.tneanet-cpp.main.
|
| 346 |
+
"""
|
| 347 |
+
module = self._modules.get("tneanet_cpp")
|
| 348 |
+
if module is None or not hasattr(module, "main"):
|
| 349 |
+
return self._result(
|
| 350 |
+
"fallback",
|
| 351 |
+
error="Function 'main' in tneanet-cpp is unavailable.",
|
| 352 |
+
guidance="Check file dev/examples/tneanet-cpp.py exists and is valid.",
|
| 353 |
+
)
|
| 354 |
+
try:
|
| 355 |
+
result = module.main(*args, **kwargs)
|
| 356 |
+
return self._result("success", function="tneanet_cpp.main", result=result)
|
| 357 |
+
except Exception as e:
|
| 358 |
+
return self._result(
|
| 359 |
+
"error",
|
| 360 |
+
error=f"tneanet_cpp.main execution failed: {e}",
|
| 361 |
+
guidance="Confirm runtime prerequisites for example script are met.",
|
| 362 |
+
)
|
| 363 |
+
|
| 364 |
+
def call_snapswig_check_main(self, *args: Any, **kwargs: Any) -> Dict[str, Any]:
|
| 365 |
+
"""
|
| 366 |
+
Call dev.examples.snapswig-check.main.
|
| 367 |
+
"""
|
| 368 |
+
module = self._modules.get("snapswig_check")
|
| 369 |
+
if module is None or not hasattr(module, "main"):
|
| 370 |
+
return self._result(
|
| 371 |
+
"fallback",
|
| 372 |
+
error="Function 'main' in snapswig-check is unavailable.",
|
| 373 |
+
guidance="Check file dev/examples/snapswig-check.py exists and imports succeed.",
|
| 374 |
+
)
|
| 375 |
+
try:
|
| 376 |
+
result = module.main(*args, **kwargs)
|
| 377 |
+
return self._result("success", function="snapswig_check.main", result=result)
|
| 378 |
+
except Exception as e:
|
| 379 |
+
return self._result(
|
| 380 |
+
"error",
|
| 381 |
+
error=f"snapswig_check.main execution failed: {e}",
|
| 382 |
+
guidance="Ensure SWIG SNAP extension is built and importable before running checks.",
|
| 383 |
+
)
|
snap-python/mcp_output/mcp_plugin/main.py
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""
|
| 2 |
+
MCP Service Auto-Wrapper - Auto-generated
|
| 3 |
+
"""
|
| 4 |
+
from mcp_service import create_app
|
| 5 |
+
|
| 6 |
+
def main():
|
| 7 |
+
"""Main entry point"""
|
| 8 |
+
app = create_app()
|
| 9 |
+
return app
|
| 10 |
+
|
| 11 |
+
if __name__ == "__main__":
|
| 12 |
+
app = main()
|
| 13 |
+
app.run()
|
snap-python/mcp_output/mcp_plugin/mcp_service.py
ADDED
|
@@ -0,0 +1,271 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import os
|
| 2 |
+
import sys
|
| 3 |
+
|
| 4 |
+
source_path = os.path.join(os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))), "source")
|
| 5 |
+
if source_path not in sys.path:
|
| 6 |
+
sys.path.insert(0, source_path)
|
| 7 |
+
|
| 8 |
+
from fastmcp import FastMCP
|
| 9 |
+
|
| 10 |
+
from setup import SwigExtension, SwigBuild
|
| 11 |
+
from swig.setup import SwigExtension, PkgBuild
|
| 12 |
+
from swig.gen.disp-custom import ConvertGraph, ConvertSubGraph, ConvertESubGraph
|
| 13 |
+
from swig.gen.genClassFn.archive.genClassFnExt import removeFirstParam, genFuncCall, getFuncName
|
| 14 |
+
from dev.examples.tneanet-cpp import main
|
| 15 |
+
from dev.examples.snapswig-check import main
|
| 16 |
+
|
| 17 |
+
mcp = FastMCP("unknown_service")
|
| 18 |
+
|
| 19 |
+
|
| 20 |
+
@mcp.tool(name="swigbuild", description="SwigBuild class")
|
| 21 |
+
def swigbuild(*args, **kwargs):
|
| 22 |
+
"""SwigBuild class"""
|
| 23 |
+
try:
|
| 24 |
+
if SwigBuild is None:
|
| 25 |
+
return {"success": False, "result": None, "error": "Class SwigBuild is not available, path may need adjustment"}
|
| 26 |
+
|
| 27 |
+
# MCP parameter type conversion
|
| 28 |
+
converted_args = []
|
| 29 |
+
converted_kwargs = kwargs.copy()
|
| 30 |
+
|
| 31 |
+
# Handle position argument type conversion
|
| 32 |
+
for arg in args:
|
| 33 |
+
if isinstance(arg, str):
|
| 34 |
+
# Try to convert to numeric type
|
| 35 |
+
try:
|
| 36 |
+
if '.' in arg:
|
| 37 |
+
converted_args.append(float(arg))
|
| 38 |
+
else:
|
| 39 |
+
converted_args.append(int(arg))
|
| 40 |
+
except ValueError:
|
| 41 |
+
converted_args.append(arg)
|
| 42 |
+
else:
|
| 43 |
+
converted_args.append(arg)
|
| 44 |
+
|
| 45 |
+
# Handle keyword argument type conversion
|
| 46 |
+
for key, value in converted_kwargs.items():
|
| 47 |
+
if isinstance(value, str):
|
| 48 |
+
try:
|
| 49 |
+
if '.' in value:
|
| 50 |
+
converted_kwargs[key] = float(value)
|
| 51 |
+
else:
|
| 52 |
+
converted_kwargs[key] = int(value)
|
| 53 |
+
except ValueError:
|
| 54 |
+
pass
|
| 55 |
+
|
| 56 |
+
instance = SwigBuild(*converted_args, **converted_kwargs)
|
| 57 |
+
return {"success": True, "result": str(instance), "error": None}
|
| 58 |
+
except Exception as e:
|
| 59 |
+
return {"success": False, "result": None, "error": str(e)}
|
| 60 |
+
|
| 61 |
+
@mcp.tool(name="swigextension", description="SwigExtension class")
|
| 62 |
+
def swigextension(*args, **kwargs):
|
| 63 |
+
"""SwigExtension class"""
|
| 64 |
+
try:
|
| 65 |
+
if SwigExtension is None:
|
| 66 |
+
return {"success": False, "result": None, "error": "Class SwigExtension is not available, path may need adjustment"}
|
| 67 |
+
|
| 68 |
+
# MCP parameter type conversion
|
| 69 |
+
converted_args = []
|
| 70 |
+
converted_kwargs = kwargs.copy()
|
| 71 |
+
|
| 72 |
+
# Handle position argument type conversion
|
| 73 |
+
for arg in args:
|
| 74 |
+
if isinstance(arg, str):
|
| 75 |
+
# Try to convert to numeric type
|
| 76 |
+
try:
|
| 77 |
+
if '.' in arg:
|
| 78 |
+
converted_args.append(float(arg))
|
| 79 |
+
else:
|
| 80 |
+
converted_args.append(int(arg))
|
| 81 |
+
except ValueError:
|
| 82 |
+
converted_args.append(arg)
|
| 83 |
+
else:
|
| 84 |
+
converted_args.append(arg)
|
| 85 |
+
|
| 86 |
+
# Handle keyword argument type conversion
|
| 87 |
+
for key, value in converted_kwargs.items():
|
| 88 |
+
if isinstance(value, str):
|
| 89 |
+
try:
|
| 90 |
+
if '.' in value:
|
| 91 |
+
converted_kwargs[key] = float(value)
|
| 92 |
+
else:
|
| 93 |
+
converted_kwargs[key] = int(value)
|
| 94 |
+
except ValueError:
|
| 95 |
+
pass
|
| 96 |
+
|
| 97 |
+
instance = SwigExtension(*converted_args, **converted_kwargs)
|
| 98 |
+
return {"success": True, "result": str(instance), "error": None}
|
| 99 |
+
except Exception as e:
|
| 100 |
+
return {"success": False, "result": None, "error": str(e)}
|
| 101 |
+
|
| 102 |
+
@mcp.tool(name="pkgbuild", description="PkgBuild class")
|
| 103 |
+
def pkgbuild(*args, **kwargs):
|
| 104 |
+
"""PkgBuild class"""
|
| 105 |
+
try:
|
| 106 |
+
if PkgBuild is None:
|
| 107 |
+
return {"success": False, "result": None, "error": "Class PkgBuild is not available, path may need adjustment"}
|
| 108 |
+
|
| 109 |
+
# MCP parameter type conversion
|
| 110 |
+
converted_args = []
|
| 111 |
+
converted_kwargs = kwargs.copy()
|
| 112 |
+
|
| 113 |
+
# Handle position argument type conversion
|
| 114 |
+
for arg in args:
|
| 115 |
+
if isinstance(arg, str):
|
| 116 |
+
# Try to convert to numeric type
|
| 117 |
+
try:
|
| 118 |
+
if '.' in arg:
|
| 119 |
+
converted_args.append(float(arg))
|
| 120 |
+
else:
|
| 121 |
+
converted_args.append(int(arg))
|
| 122 |
+
except ValueError:
|
| 123 |
+
converted_args.append(arg)
|
| 124 |
+
else:
|
| 125 |
+
converted_args.append(arg)
|
| 126 |
+
|
| 127 |
+
# Handle keyword argument type conversion
|
| 128 |
+
for key, value in converted_kwargs.items():
|
| 129 |
+
if isinstance(value, str):
|
| 130 |
+
try:
|
| 131 |
+
if '.' in value:
|
| 132 |
+
converted_kwargs[key] = float(value)
|
| 133 |
+
else:
|
| 134 |
+
converted_kwargs[key] = int(value)
|
| 135 |
+
except ValueError:
|
| 136 |
+
pass
|
| 137 |
+
|
| 138 |
+
instance = PkgBuild(*converted_args, **converted_kwargs)
|
| 139 |
+
return {"success": True, "result": str(instance), "error": None}
|
| 140 |
+
except Exception as e:
|
| 141 |
+
return {"success": False, "result": None, "error": str(e)}
|
| 142 |
+
|
| 143 |
+
@mcp.tool(name="swigextension", description="SwigExtension class")
|
| 144 |
+
def swigextension(*args, **kwargs):
|
| 145 |
+
"""SwigExtension class"""
|
| 146 |
+
try:
|
| 147 |
+
if SwigExtension is None:
|
| 148 |
+
return {"success": False, "result": None, "error": "Class SwigExtension is not available, path may need adjustment"}
|
| 149 |
+
|
| 150 |
+
# MCP parameter type conversion
|
| 151 |
+
converted_args = []
|
| 152 |
+
converted_kwargs = kwargs.copy()
|
| 153 |
+
|
| 154 |
+
# Handle position argument type conversion
|
| 155 |
+
for arg in args:
|
| 156 |
+
if isinstance(arg, str):
|
| 157 |
+
# Try to convert to numeric type
|
| 158 |
+
try:
|
| 159 |
+
if '.' in arg:
|
| 160 |
+
converted_args.append(float(arg))
|
| 161 |
+
else:
|
| 162 |
+
converted_args.append(int(arg))
|
| 163 |
+
except ValueError:
|
| 164 |
+
converted_args.append(arg)
|
| 165 |
+
else:
|
| 166 |
+
converted_args.append(arg)
|
| 167 |
+
|
| 168 |
+
# Handle keyword argument type conversion
|
| 169 |
+
for key, value in converted_kwargs.items():
|
| 170 |
+
if isinstance(value, str):
|
| 171 |
+
try:
|
| 172 |
+
if '.' in value:
|
| 173 |
+
converted_kwargs[key] = float(value)
|
| 174 |
+
else:
|
| 175 |
+
converted_kwargs[key] = int(value)
|
| 176 |
+
except ValueError:
|
| 177 |
+
pass
|
| 178 |
+
|
| 179 |
+
instance = SwigExtension(*converted_args, **converted_kwargs)
|
| 180 |
+
return {"success": True, "result": str(instance), "error": None}
|
| 181 |
+
except Exception as e:
|
| 182 |
+
return {"success": False, "result": None, "error": str(e)}
|
| 183 |
+
|
| 184 |
+
@mcp.tool(name="ConvertESubGraph", description="Auto-wrapped function ConvertESubGraph")
|
| 185 |
+
def ConvertESubGraph(payload: dict):
|
| 186 |
+
try:
|
| 187 |
+
if ConvertESubGraph is None:
|
| 188 |
+
return {"success": False, "result": None, "error": "Function ConvertESubGraph is not available"}
|
| 189 |
+
result = ConvertESubGraph(**payload)
|
| 190 |
+
return {"success": True, "result": result, "error": None}
|
| 191 |
+
except Exception as e:
|
| 192 |
+
return {"success": False, "result": None, "error": str(e)}
|
| 193 |
+
|
| 194 |
+
@mcp.tool(name="ConvertGraph", description="Auto-wrapped function ConvertGraph")
|
| 195 |
+
def ConvertGraph(payload: dict):
|
| 196 |
+
try:
|
| 197 |
+
if ConvertGraph is None:
|
| 198 |
+
return {"success": False, "result": None, "error": "Function ConvertGraph is not available"}
|
| 199 |
+
result = ConvertGraph(**payload)
|
| 200 |
+
return {"success": True, "result": result, "error": None}
|
| 201 |
+
except Exception as e:
|
| 202 |
+
return {"success": False, "result": None, "error": str(e)}
|
| 203 |
+
|
| 204 |
+
@mcp.tool(name="ConvertSubGraph", description="Auto-wrapped function ConvertSubGraph")
|
| 205 |
+
def ConvertSubGraph(payload: dict):
|
| 206 |
+
try:
|
| 207 |
+
if ConvertSubGraph is None:
|
| 208 |
+
return {"success": False, "result": None, "error": "Function ConvertSubGraph is not available"}
|
| 209 |
+
result = ConvertSubGraph(**payload)
|
| 210 |
+
return {"success": True, "result": result, "error": None}
|
| 211 |
+
except Exception as e:
|
| 212 |
+
return {"success": False, "result": None, "error": str(e)}
|
| 213 |
+
|
| 214 |
+
@mcp.tool(name="genFuncCall", description="Auto-wrapped function genFuncCall")
|
| 215 |
+
def genFuncCall(payload: dict):
|
| 216 |
+
try:
|
| 217 |
+
if genFuncCall is None:
|
| 218 |
+
return {"success": False, "result": None, "error": "Function genFuncCall is not available"}
|
| 219 |
+
result = genFuncCall(**payload)
|
| 220 |
+
return {"success": True, "result": result, "error": None}
|
| 221 |
+
except Exception as e:
|
| 222 |
+
return {"success": False, "result": None, "error": str(e)}
|
| 223 |
+
|
| 224 |
+
@mcp.tool(name="getFuncName", description="Auto-wrapped function getFuncName")
|
| 225 |
+
def getFuncName(payload: dict):
|
| 226 |
+
try:
|
| 227 |
+
if getFuncName is None:
|
| 228 |
+
return {"success": False, "result": None, "error": "Function getFuncName is not available"}
|
| 229 |
+
result = getFuncName(**payload)
|
| 230 |
+
return {"success": True, "result": result, "error": None}
|
| 231 |
+
except Exception as e:
|
| 232 |
+
return {"success": False, "result": None, "error": str(e)}
|
| 233 |
+
|
| 234 |
+
@mcp.tool(name="removeFirstParam", description="Auto-wrapped function removeFirstParam")
|
| 235 |
+
def removeFirstParam(payload: dict):
|
| 236 |
+
try:
|
| 237 |
+
if removeFirstParam is None:
|
| 238 |
+
return {"success": False, "result": None, "error": "Function removeFirstParam is not available"}
|
| 239 |
+
result = removeFirstParam(**payload)
|
| 240 |
+
return {"success": True, "result": result, "error": None}
|
| 241 |
+
except Exception as e:
|
| 242 |
+
return {"success": False, "result": None, "error": str(e)}
|
| 243 |
+
|
| 244 |
+
@mcp.tool(name="main", description="Auto-wrapped function main")
|
| 245 |
+
def main(payload: dict):
|
| 246 |
+
try:
|
| 247 |
+
if main is None:
|
| 248 |
+
return {"success": False, "result": None, "error": "Function main is not available"}
|
| 249 |
+
result = main(**payload)
|
| 250 |
+
return {"success": True, "result": result, "error": None}
|
| 251 |
+
except Exception as e:
|
| 252 |
+
return {"success": False, "result": None, "error": str(e)}
|
| 253 |
+
|
| 254 |
+
@mcp.tool(name="main", description="Auto-wrapped function main")
|
| 255 |
+
def main(payload: dict):
|
| 256 |
+
try:
|
| 257 |
+
if main is None:
|
| 258 |
+
return {"success": False, "result": None, "error": "Function main is not available"}
|
| 259 |
+
result = main(**payload)
|
| 260 |
+
return {"success": True, "result": result, "error": None}
|
| 261 |
+
except Exception as e:
|
| 262 |
+
return {"success": False, "result": None, "error": str(e)}
|
| 263 |
+
|
| 264 |
+
|
| 265 |
+
|
| 266 |
+
def create_app():
|
| 267 |
+
"""Create and return FastMCP application instance"""
|
| 268 |
+
return mcp
|
| 269 |
+
|
| 270 |
+
if __name__ == "__main__":
|
| 271 |
+
mcp.run(transport="http", host="0.0.0.0", port=8000)
|
snap-python/mcp_output/requirements.txt
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
fastmcp
|
| 2 |
+
fastapi
|
| 3 |
+
uvicorn[standard]
|
| 4 |
+
pydantic>=2.0.0
|
| 5 |
+
snapx package modules under source.snapx.snapx
|
snap-python/mcp_output/start_mcp.py
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
|
| 2 |
+
"""
|
| 3 |
+
MCP Service Startup Entry
|
| 4 |
+
"""
|
| 5 |
+
import sys
|
| 6 |
+
import os
|
| 7 |
+
|
| 8 |
+
project_root = os.path.dirname(os.path.abspath(__file__))
|
| 9 |
+
mcp_plugin_dir = os.path.join(project_root, "mcp_plugin")
|
| 10 |
+
if mcp_plugin_dir not in sys.path:
|
| 11 |
+
sys.path.insert(0, mcp_plugin_dir)
|
| 12 |
+
|
| 13 |
+
from mcp_service import create_app
|
| 14 |
+
|
| 15 |
+
def main():
|
| 16 |
+
"""Start FastMCP service"""
|
| 17 |
+
app = create_app()
|
| 18 |
+
# Use environment variable to configure port, default 8000
|
| 19 |
+
port = int(os.environ.get("MCP_PORT", "8000"))
|
| 20 |
+
|
| 21 |
+
# Choose transport mode based on environment variable
|
| 22 |
+
transport = os.environ.get("MCP_TRANSPORT", "stdio")
|
| 23 |
+
if transport == "http":
|
| 24 |
+
app.run(transport="http", host="0.0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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"repository": {
|
| 3 |
+
"name": "snap-python",
|
| 4 |
+
"url": "https://github.com/snap-stanford/snap-python",
|
| 5 |
+
"local_path": "/Users/ghh/Documents/Code/Code2MCP-private/workspace/snap-python",
|
| 6 |
+
"description": "Python library",
|
| 7 |
+
"features": "Basic functionality",
|
| 8 |
+
"tech_stack": "Python",
|
| 9 |
+
"stars": 0,
|
| 10 |
+
"forks": 0,
|
| 11 |
+
"language": "Python",
|
| 12 |
+
"last_updated": "",
|
| 13 |
+
"complexity": "medium",
|
| 14 |
+
"intrusiveness_risk": "low"
|
| 15 |
+
},
|
| 16 |
+
"execution": {
|
| 17 |
+
"start_time": 1773242722.183267,
|
| 18 |
+
"end_time": 1773243206.42227,
|
| 19 |
+
"duration": 484.23900389671326,
|
| 20 |
+
"status": "success",
|
| 21 |
+
"workflow_status": "success",
|
| 22 |
+
"nodes_executed": [
|
| 23 |
+
"download",
|
| 24 |
+
"analysis",
|
| 25 |
+
"env",
|
| 26 |
+
"generate",
|
| 27 |
+
"run",
|
| 28 |
+
"review",
|
| 29 |
+
"finalize"
|
| 30 |
+
],
|
| 31 |
+
"total_files_processed": 2,
|
| 32 |
+
"environment_type": "unknown",
|
| 33 |
+
"llm_calls": 0,
|
| 34 |
+
"deepwiki_calls": 0
|
| 35 |
+
},
|
| 36 |
+
"tests": {
|
| 37 |
+
"original_project": {
|
| 38 |
+
"passed": false,
|
| 39 |
+
"details": {},
|
| 40 |
+
"test_coverage": "100%",
|
| 41 |
+
"execution_time": 0,
|
| 42 |
+
"test_files": []
|
| 43 |
+
},
|
| 44 |
+
"mcp_plugin": {
|
| 45 |
+
"passed": true,
|
| 46 |
+
"details": {},
|
| 47 |
+
"service_health": "healthy",
|
| 48 |
+
"startup_time": 0,
|
| 49 |
+
"transport_mode": "stdio",
|
| 50 |
+
"fastmcp_version": "unknown",
|
| 51 |
+
"mcp_version": "unknown"
|
| 52 |
+
}
|
| 53 |
+
},
|
| 54 |
+
"analysis": {
|
| 55 |
+
"structure": {
|
| 56 |
+
"packages": [
|
| 57 |
+
"source.snapx.snapx",
|
| 58 |
+
"source.swig.snap"
|
| 59 |
+
]
|
| 60 |
+
},
|
| 61 |
+
"dependencies": {
|
| 62 |
+
"has_environment_yml": false,
|
| 63 |
+
"has_requirements_txt": false,
|
| 64 |
+
"pyproject": false,
|
| 65 |
+
"setup_cfg": false,
|
| 66 |
+
"setup_py": true
|
| 67 |
+
},
|
| 68 |
+
"entry_points": {
|
| 69 |
+
"imports": [],
|
| 70 |
+
"cli": [],
|
| 71 |
+
"modules": []
|
| 72 |
+
},
|
| 73 |
+
"risk_assessment": {
|
| 74 |
+
"import_feasibility": 0.82,
|
| 75 |
+
"intrusiveness_risk": "low",
|
| 76 |
+
"complexity": "medium"
|
| 77 |
+
},
|
| 78 |
+
"deepwiki_analysis": {
|
| 79 |
+
"repo_url": "https://github.com/snap-stanford/snap-python",
|
| 80 |
+
"repo_name": "snap-python",
|
| 81 |
+
"error": "DeepWiki analysis failed",
|
| 82 |
+
"model": "gpt-5.3-codex",
|
| 83 |
+
"source": "llm_direct_analysis",
|
| 84 |
+
"success": false
|
| 85 |
+
},
|
| 86 |
+
"code_complexity": {
|
| 87 |
+
"cyclomatic_complexity": "medium",
|
| 88 |
+
"cognitive_complexity": "medium",
|
| 89 |
+
"maintainability_index": 75
|
| 90 |
+
},
|
| 91 |
+
"security_analysis": {
|
| 92 |
+
"vulnerabilities_found": 0,
|
| 93 |
+
"security_score": 85,
|
| 94 |
+
"recommendations": []
|
| 95 |
+
}
|
| 96 |
+
},
|
| 97 |
+
"plugin_generation": {
|
| 98 |
+
"files_created": [
|
| 99 |
+
"mcp_output/start_mcp.py",
|
| 100 |
+
"mcp_output/mcp_plugin/__init__.py",
|
| 101 |
+
"mcp_output/mcp_plugin/mcp_service.py",
|
| 102 |
+
"mcp_output/mcp_plugin/adapter.py",
|
| 103 |
+
"mcp_output/mcp_plugin/main.py",
|
| 104 |
+
"mcp_output/requirements.txt",
|
| 105 |
+
"mcp_output/README_MCP.md"
|
| 106 |
+
],
|
| 107 |
+
"main_entry": "start_mcp.py",
|
| 108 |
+
"requirements": [
|
| 109 |
+
"fastmcp>=0.1.0",
|
| 110 |
+
"pydantic>=2.0.0"
|
| 111 |
+
],
|
| 112 |
+
"readme_path": "/Users/ghh/Documents/Code/Code2MCP-private/workspace/snap-python/mcp_output/README_MCP.md",
|
| 113 |
+
"adapter_mode": "import",
|
| 114 |
+
"total_lines_of_code": 0,
|
| 115 |
+
"generated_files_size": 0,
|
| 116 |
+
"tool_endpoints": 0,
|
| 117 |
+
"supported_features": [
|
| 118 |
+
"Basic functionality"
|
| 119 |
+
],
|
| 120 |
+
"generated_tools": [
|
| 121 |
+
"Basic tools",
|
| 122 |
+
"Health check tools",
|
| 123 |
+
"Version info tools"
|
| 124 |
+
]
|
| 125 |
+
},
|
| 126 |
+
"code_review": {},
|
| 127 |
+
"errors": [],
|
| 128 |
+
"warnings": [],
|
| 129 |
+
"recommendations": [
|
| 130 |
+
"add a minimal CI pipeline (GitHub Actions) to build/install the SWIG extension and run both `test/` and `snapx/snapx/classes/tests/`",
|
| 131 |
+
"consolidate packaging into a single modern `pyproject.toml` (keep one `setup.py` path only) and define optional extras (e.g. `dev`",
|
| 132 |
+
"`docs`",
|
| 133 |
+
"`interop`)",
|
| 134 |
+
"add a top-level `requirements.txt` or lockfile for reproducible local/dev installs",
|
| 135 |
+
"deduplicate legacy `dev/` vs main `examples/` and `test/` trees to reduce maintenance drift",
|
| 136 |
+
"split the huge generated `setup/snap.py` into generated+checked artifacts with clear regeneration scripts and version pinning",
|
| 137 |
+
"standardize naming/style (many legacy test filenames and mixed conventions) and enforce with `ruff`/`black`/`isort`",
|
| 138 |
+
"introduce test markers for slow/integration/SWIG-dependent tests and publish baseline coverage",
|
| 139 |
+
"add smoke tests for key MCP endpoints and auto-generate endpoint docs from adapter metadata",
|
| 140 |
+
"improve README with a clear “pure Python snapx vs compiled SNAP/SWIG” architecture/install matrix",
|
| 141 |
+
"add typed public APIs for `snapx` (at least core graph/algorithms) and run `mypy` in CI",
|
| 142 |
+
"add benchmark automation comparing key algorithms across representative graph sizes and track regressions",
|
| 143 |
+
"add dependency/security scanning (Dependabot + pip-audit) and binary build checks across Python versions/platforms",
|
| 144 |
+
"add contributor docs for build toolchain prerequisites (SWIG/compiler) and a troubleshooting decision tree",
|
| 145 |
+
"remove or gate large test/example data files from source distribution where possible and fetch on demand",
|
| 146 |
+
"create a release checklist that validates wheel/sdist contents and MCP plugin compatibility before tagging"
|
| 147 |
+
],
|
| 148 |
+
"performance_metrics": {
|
| 149 |
+
"memory_usage_mb": 0,
|
| 150 |
+
"cpu_usage_percent": 0,
|
| 151 |
+
"response_time_ms": 0,
|
| 152 |
+
"throughput_requests_per_second": 0
|
| 153 |
+
},
|
| 154 |
+
"deployment_info": {
|
| 155 |
+
"supported_platforms": [
|
| 156 |
+
"Linux",
|
| 157 |
+
"Windows",
|
| 158 |
+
"macOS"
|
| 159 |
+
],
|
| 160 |
+
"python_versions": [
|
| 161 |
+
"3.8",
|
| 162 |
+
"3.9",
|
| 163 |
+
"3.10",
|
| 164 |
+
"3.11",
|
| 165 |
+
"3.12"
|
| 166 |
+
],
|
| 167 |
+
"deployment_methods": [
|
| 168 |
+
"Docker",
|
| 169 |
+
"pip",
|
| 170 |
+
"conda"
|
| 171 |
+
],
|
| 172 |
+
"monitoring_support": true,
|
| 173 |
+
"logging_configuration": "structured"
|
| 174 |
+
},
|
| 175 |
+
"execution_analysis": {
|
| 176 |
+
"success_factors": [
|
| 177 |
+
"Workflow completed end-to-end with status=success across all planned nodes (download, analysis, env, generate, run, review, finalize).",
|
| 178 |
+
"Import-based adapter strategy was feasible (import_feasibility=0.82), enabling plugin startup without invasive code changes.",
|
| 179 |
+
"MCP plugin runtime checks passed (service_health=healthy, transport=stdio), confirming baseline service operability.",
|
| 180 |
+
"Low assessed intrusiveness risk reduced integration friction with legacy mixed codebase (snapx + SWIG layers)."
|
| 181 |
+
],
|
| 182 |
+
"failure_reasons": [
|
| 183 |
+
"No hard workflow failure occurred.",
|
| 184 |
+
"Quality signal gap: original project tests were not executed successfully (passed=false with empty details), so behavioral equivalence is unverified.",
|
| 185 |
+
"DeepWiki enrichment failed, reducing external architectural/context confidence.",
|
| 186 |
+
"Telemetry incompleteness (0/unknown metrics for LOC, file size, CPU, memory, response time) limits objective performance validation."
|
| 187 |
+
],
|
| 188 |
+
"overall_assessment": "good",
|
| 189 |
+
"node_performance": {
|
| 190 |
+
"download_time": "Repository ingest succeeded via zip fallback; effective for reliability, but likely slower/less metadata-rich than native clone.",
|
| 191 |
+
"analysis_time": "AST/module discovery covered a large surface (hundreds of functions/classes), indicating substantial analysis effort and likely primary time contributor.",
|
| 192 |
+
"generation_time": "Generation completed quickly enough to produce full plugin scaffold (entrypoint, adapter, service, docs, requirements) with no generation errors.",
|
| 193 |
+
"test_time": "MCP smoke/health checks passed, but project-level test execution was effectively absent; test stage is functionally incomplete for regression assurance."
|
| 194 |
+
},
|
| 195 |
+
"resource_usage": {
|
| 196 |
+
"memory_efficiency": "Unknown due to missing metrics; no OOM/failure signs, so operationally acceptable but not measurable.",
|
| 197 |
+
"cpu_efficiency": "Unknown due to missing CPU telemetry; long total runtime (~484s) suggests analysis/reflection overhead on large API surface.",
|
| 198 |
+
"disk_usage": "Generated artifact size reported as 0 (likely instrumentation issue); repository includes large files, so packaging/disk controls should be tightened."
|
| 199 |
+
}
|
| 200 |
+
},
|
| 201 |
+
"technical_quality": {
|
| 202 |
+
"code_quality_score": 74,
|
| 203 |
+
"architecture_score": 78,
|
| 204 |
+
"performance_score": 62,
|
| 205 |
+
"maintainability_score": 68,
|
| 206 |
+
"security_score": 85,
|
| 207 |
+
"scalability_score": 70
|
| 208 |
+
}
|
| 209 |
+
}
|
snap-python/source/.DS_Store
ADDED
|
Binary file (6.15 kB). View file
|
|
|
snap-python/source/CREDITS.txt
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Snap.py is a Python interface for SNAP. SNAP is a general purpose, high
|
| 2 |
+
performance system for analysis and manipulation of large networks. SNAP
|
| 3 |
+
is written in C++ and optimized for maximum performance and compact graph
|
| 4 |
+
representation. It easily scales to massive networks with hundreds of
|
| 5 |
+
millions of nodes, and billions of edges.
|
| 6 |
+
|
| 7 |
+
Snap.py provides performance benefits of SNAP, combined with flexibility
|
| 8 |
+
of Python. Most of the SNAP functionality is available via Snap.py in Python.
|
| 9 |
+
|
| 10 |
+
The following people contributed to the development of Snap.py (in
|
| 11 |
+
alphabetical order):
|
| 12 |
+
Ruth-Ann Armstrong
|
| 13 |
+
Roger Chen
|
| 14 |
+
Benoît Coste
|
| 15 |
+
Carlos Hernandez
|
| 16 |
+
Jihun Hong
|
| 17 |
+
Farzaan Kaiyom
|
| 18 |
+
Viswesh Krishna
|
| 19 |
+
Daiki Kumazawa
|
| 20 |
+
Jure Leskovec
|
| 21 |
+
Stephen Macke
|
| 22 |
+
Ben Pastel
|
| 23 |
+
Karthik Ramachandran
|
| 24 |
+
Sheila Ramaswamy
|
| 25 |
+
Avery Rogers
|
| 26 |
+
Nicholas Shelly
|
| 27 |
+
Rok Sosic
|
| 28 |
+
Ming Han Teh
|
| 29 |
+
Cameron Tew
|
| 30 |
+
Albert Zheng
|
| 31 |
+
|
| 32 |
+
Special thanks go to the students in the 2013 class of CS224W at Stanford
|
| 33 |
+
University, who helped with the initial version of the manuals and the beta
|
| 34 |
+
releases of Snap.py.
|
snap-python/source/LICENSE
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
* Copyright (c) 2007-2019, Jure Leskovec
|
| 2 |
+
* All rights reserved.
|
| 3 |
+
*
|
| 4 |
+
* Redistribution and use in source and binary forms, with or without
|
| 5 |
+
* modification, are permitted provided that the following conditions are met:
|
| 6 |
+
* * Redistributions of source code must retain the above copyright
|
| 7 |
+
* notice, this list of conditions and the following disclaimer.
|
| 8 |
+
* * Redistributions in binary form must reproduce the above copyright
|
| 9 |
+
* notice, this list of conditions and the following disclaimer in the
|
| 10 |
+
* documentation and/or other materials provided with the distribution.
|
| 11 |
+
* * Neither the name of Stanford University nor the names of its contributors
|
| 12 |
+
* may be used to endorse or promote products derived from this software
|
| 13 |
+
* without specific prior written permission.
|
| 14 |
+
*
|
| 15 |
+
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY
|
| 16 |
+
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
| 17 |
+
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
| 18 |
+
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
| 19 |
+
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
| 20 |
+
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
| 21 |
+
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
| 22 |
+
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
| 23 |
+
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
| 24 |
+
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
snap-python/source/MANIFEST.in
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
include snap/__init__.py
|
snap-python/source/Makefile
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#
|
| 2 |
+
# Top level Python SNAP Makefile
|
| 3 |
+
#
|
| 4 |
+
|
| 5 |
+
.PHONY: swig test examples
|
| 6 |
+
|
| 7 |
+
build: swig
|
| 8 |
+
|
| 9 |
+
#all: swig-r swig-sw test examples
|
| 10 |
+
all: swig test examples
|
| 11 |
+
|
| 12 |
+
# run SWIG and create Python interface code
|
| 13 |
+
swig:
|
| 14 |
+
make -C swig
|
| 15 |
+
|
| 16 |
+
# run tests
|
| 17 |
+
test:
|
| 18 |
+
make -C test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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#
|
| 2 |
+
# compilation parameters for SNAP Python
|
| 3 |
+
#
|
| 4 |
+
|
| 5 |
+
UNAME := $(shell uname)
|
| 6 |
+
SETUP = setup.py
|
| 7 |
+
|
| 8 |
+
ifeq ($(UNAME), Linux)
|
| 9 |
+
# Linux flags
|
| 10 |
+
SWIGFLAGS += -D_CMPWARN -D__stdcall -DSW_SNAPPY -D_OPENMP -DNONUMPY -DUSE_OPENMP -DGCC_ATOMIC
|
| 11 |
+
CXXFLAGS += -fPIC -D__STDC_LIMIT_MACROS -DSW_SNAPPY -fopenmp
|
| 12 |
+
MANIFEST = MANIFEST.nx
|
| 13 |
+
MANIFEST_IN = MANIFEST.in.nx
|
| 14 |
+
PYTHON = python
|
| 15 |
+
PYTHON3 = python3
|
| 16 |
+
# SNAP_PY is set externally for the manylinux1 environment
|
| 17 |
+
ifeq ($(SNAP_PY), 3.9)
|
| 18 |
+
IFLAGS3 = -I/opt/python/cp39-cp39/include/python3.9
|
| 19 |
+
LDFLAGS3 += -shared -fopenmp
|
| 20 |
+
PYTHON3 = /opt/python/cp39-cp39/bin/python3
|
| 21 |
+
else ifeq ($(SNAP_PY), 3.8)
|
| 22 |
+
IFLAGS3 = -I/opt/python/cp38-cp38/include/python3.8
|
| 23 |
+
LDFLAGS3 += -shared -fopenmp
|
| 24 |
+
PYTHON3 = /opt/python/cp38-cp38/bin/python3
|
| 25 |
+
else ifeq ($(SNAP_PY), 3.7)
|
| 26 |
+
IFLAGS3 = -I/opt/python/cp37-cp37m/include/python3.7m
|
| 27 |
+
LDFLAGS3 += -shared -fopenmp
|
| 28 |
+
PYTHON3 = /opt/python/cp37-cp37m/bin/python3
|
| 29 |
+
else ifeq ($(SNAP_PY), 3.6)
|
| 30 |
+
IFLAGS3 = -I/opt/python/cp36-cp36m/include/python3.6m
|
| 31 |
+
LDFLAGS3 += -shared -fopenmp
|
| 32 |
+
PYTHON3 = /opt/python/cp36-cp36m/bin/python3
|
| 33 |
+
else ifeq ($(SNAP_PY), 3.5)
|
| 34 |
+
IFLAGS3 = -I/opt/python/cp35-cp35m/include/python3.5m
|
| 35 |
+
LDFLAGS3 += -shared -fopenmp
|
| 36 |
+
PYTHON3 = /opt/python/cp35-cp35m/bin/python3
|
| 37 |
+
else ifeq ($(SNAP_PY), 2.7m)
|
| 38 |
+
IFLAGS = -I/opt/python/cp27-cp27m/include/python2.7
|
| 39 |
+
LDFLAGS += -shared -fopenmp
|
| 40 |
+
PYTHON = /opt/python/cp27-cp27m/bin/python2
|
| 41 |
+
else ifeq ($(SNAP_PY), 2.7mu)
|
| 42 |
+
IFLAGS = -I/opt/python/cp27-cp27mu/include/python2.7
|
| 43 |
+
LDFLAGS += -shared -fopenmp
|
| 44 |
+
PYTHON = /opt/python/cp27-cp27mu/bin/python2
|
| 45 |
+
else
|
| 46 |
+
IFLAGS ?= -I/usr/include/python2.6 -I/usr/include/python2.7 -I/usr/lib/python2.7/dist-packages/numpy/core/include
|
| 47 |
+
IFLAGS3 ?= -I/usr/local/include/python3.7m -I/usr/include/python3.7m
|
| 48 |
+
IFLAGS3 += -I/usr/local/include/python3.6m -I/usr/include/python3.6m
|
| 49 |
+
IFLAGS3 += -I/usr/local/include/python3.5m -I/usr/include/python3.5m
|
| 50 |
+
LDFLAGS += -shared -fopenmp
|
| 51 |
+
LDFLAGS3 += -shared -fopenmp
|
| 52 |
+
endif
|
| 53 |
+
else ifeq ($(UNAME), Darwin)
|
| 54 |
+
# OS X flags
|
| 55 |
+
CC = g++
|
| 56 |
+
SWIGFLAGS += -D_CMPWARN -D__stdcall -DSW_SNAPPY -DNONUMPY
|
| 57 |
+
CXXFLAGS = -std=c++98 -fwrapv -Wall -Wno-unknown-pragmas -O3 -DNDEBUG -DNOMP -DSW_SNAPPY
|
| 58 |
+
CXXFLAGS += -DSW_SNAPPY
|
| 59 |
+
|
| 60 |
+
MANIFEST = MANIFEST.mac
|
| 61 |
+
MANIFEST_IN = MANIFEST.in.nx
|
| 62 |
+
PYTHON = python
|
| 63 |
+
PYTHON3 = python3
|
| 64 |
+
IFLAGS = -I/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include
|
| 65 |
+
IFLAGS3 = $(IFLAGS)
|
| 66 |
+
LDFLAGS = -bundle -undefined dynamic_lookup
|
| 67 |
+
LDFLAGS += -L/usr/local/opt/readline/lib -L/usr/local/opt/openssl@1.1/lib
|
| 68 |
+
LDFLAGS3 = $(LDFLAGS)
|
| 69 |
+
# SNAP_PY is set externally for the python build environment
|
| 70 |
+
ifeq ($(SNAP_PY), 2.7)
|
| 71 |
+
PYPATH = /Users/rok/.pyenv/versions/2.7.18
|
| 72 |
+
CXXFLAGS += -fno-strict-aliasing
|
| 73 |
+
IFLAGS += -I$(PYPATH)/include/python2.7
|
| 74 |
+
LDFLAGS += -L$(PYPATH)/lib
|
| 75 |
+
else ifeq ($(SNAP_PY), 3.5)
|
| 76 |
+
PYPATH = /Users/rok/.pyenv/versions/3.5.10
|
| 77 |
+
IFLAGS3 += -I$(PYPATH)/include/python3.5m
|
| 78 |
+
LDFLAGS3 += -L$(PYPATH)/lib
|
| 79 |
+
else ifeq ($(SNAP_PY), 3.6)
|
| 80 |
+
PYPATH = /Users/rok/.pyenv/versions/3.6.12
|
| 81 |
+
IFLAGS3 += -I$(PYPATH)/include/python3.6m
|
| 82 |
+
LDFLAGS3 += -L$(PYPATH)/lib
|
| 83 |
+
else ifeq ($(SNAP_PY), 3.7)
|
| 84 |
+
PYPATH = /Users/rok/.pyenv/versions/3.7.9
|
| 85 |
+
IFLAGS3 += -I$(PYPATH)/include/python3.7m
|
| 86 |
+
LDFLAGS3 += -L$(PYPATH)/lib
|
| 87 |
+
else ifeq ($(SNAP_PY), 3.8)
|
| 88 |
+
PYPATH = /Users/rok/.pyenv/versions/3.8.6
|
| 89 |
+
IFLAGS3 += -I$(PYPATH)/include/python3.8
|
| 90 |
+
LDFLAGS3 += -L$(PYPATH)/lib
|
| 91 |
+
else ifeq ($(SNAP_PY), 3.9)
|
| 92 |
+
PYPATH = /Users/rok/.pyenv/versions/3.9.0
|
| 93 |
+
IFLAGS3 += -I$(PYPATH)/include/python3.9
|
| 94 |
+
LDFLAGS3 += -L$(PYPATH)/lib
|
| 95 |
+
else
|
| 96 |
+
|
| 97 |
+
# the build environment is not specified, try to figure out the parameters
|
| 98 |
+
PY_CONDA3 := $(shell which python3 | grep conda3)
|
| 99 |
+
PY_BREW := $(shell which python3 | grep local)
|
| 100 |
+
|
| 101 |
+
IFLAGS := $(shell python-config --includes)
|
| 102 |
+
IFLAGS3 := $(shell python3-config --includes)
|
| 103 |
+
LDFLAGS := $(shell python-config --ldflags) -dynamiclib -headerpad_max_install_names
|
| 104 |
+
LDFLAGS3 := $(shell python3-config --ldflags) -dynamiclib -headerpad_max_install_names
|
| 105 |
+
CLANG := $(shell g++ -v 2>&1 | grep clang | cut -d " " -f 2)
|
| 106 |
+
ifeq ($(CLANG), LLVM)
|
| 107 |
+
CXXFLAGS += -DNOMP
|
| 108 |
+
CXXOPENMP =
|
| 109 |
+
else ifeq ($(CLANG), clang)
|
| 110 |
+
CXXFLAGS += -DNOMP
|
| 111 |
+
CXXOPENMP =
|
| 112 |
+
else
|
| 113 |
+
#SWIGFLAGS += -DGCC_ATOMIC
|
| 114 |
+
CXXFLAGS += -fopenmp
|
| 115 |
+
LDFLAGS += -fopenmp
|
| 116 |
+
#CXXOPENMP += -fopenmp
|
| 117 |
+
endif
|
| 118 |
+
ifneq ($(PY_CONDA3), )
|
| 119 |
+
CC = x86_64-apple-darwin13.4.0-clang
|
| 120 |
+
CXXFLAGS = -std=c++98 -Wall -Wno-unknown-pragmas -O3
|
| 121 |
+
CXXFLAGS += -fPIC -flto -mmacosx-version-min=10.9
|
| 122 |
+
CXXFLAGS += -DNDEBUG -DSW_SNAPPY -DNOMP
|
| 123 |
+
CXXFLAGS += -isystem $(CONDA_PREFIX)/include
|
| 124 |
+
IFLAGS3 = -I$(CONDA_PREFIX)/include/python3.7m
|
| 125 |
+
LDFLAGS3 = -bundle -undefined dynamic_lookup -flto -arch x86_64 -mmacosx-version-min=10.9
|
| 126 |
+
LDFLAGS3 += -isystem $(CONDA_PREFIX)/include
|
| 127 |
+
LDFLAGS3 += -L$(CONDA_PREFIX)/lib
|
| 128 |
+
LIBS =
|
| 129 |
+
endif
|
| 130 |
+
|
| 131 |
+
ifneq ($(PY_BREW), )
|
| 132 |
+
CC = clang
|
| 133 |
+
CXXFLAGS = -std=c++98 -Wall -Wno-unknown-pragmas -O3
|
| 134 |
+
CXXFLAGS += -dynamic
|
| 135 |
+
CXXFLAGS += -DNDEBUG -DSW_SNAPPY -DNOMP
|
| 136 |
+
CXXFLAGS += -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk
|
| 137 |
+
IFLAGS3 = -I/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include
|
| 138 |
+
IFLAGS3 += -I/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Tk.framework/Versions/8.5/Headers
|
| 139 |
+
IFLAGS3 += -I/usr/local/include
|
| 140 |
+
IFLAGS3 += -I/usr/local/Cellar/python/3.7.7/Frameworks/Python.framework/Versions/3.7/include/python3.7m
|
| 141 |
+
LDFLAGS3 = -bundle -undefined dynamic_lookup -flto
|
| 142 |
+
LDFLAGS3 += -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk
|
| 143 |
+
LDFLAGS3 += -L/usr/local/lib
|
| 144 |
+
LIBS =
|
| 145 |
+
endif
|
| 146 |
+
endif
|
| 147 |
+
|
| 148 |
+
else ifeq ($(shell uname -o), Cygwin)
|
| 149 |
+
# Cygwin flags
|
| 150 |
+
SWIGFLAGS += -D_CMPWARN -D__stdcall -DSW_SNAPPY -DNONUMPY
|
| 151 |
+
CXXFLAGS += -shared -D__STDC_LIMIT_MACROS -DSW_SNAPPY
|
| 152 |
+
LIBS += -lpython2.6
|
| 153 |
+
MANIFEST = MANIFEST.win
|
| 154 |
+
MANIFEST_IN = MANIFEST.in.win
|
| 155 |
+
|
| 156 |
+
ifeq ($(SNAP_PY), 2.7)
|
| 157 |
+
PYTHON = /cygdrive/c/Python27/python
|
| 158 |
+
else ifeq ($(SNAP_PY), 3.5)
|
| 159 |
+
PYTHON = /cygdrive/c/Program\ Files/Python35/python
|
| 160 |
+
else ifeq ($(SNAP_PY), 3.6)
|
| 161 |
+
PYTHON = /cygdrive/c/Program\ Files/Python36/python
|
| 162 |
+
else ifeq ($(SNAP_PY), 3.7)
|
| 163 |
+
PYTHON = /cygdrive/c/Program\ Files/Python37/python
|
| 164 |
+
else ifeq ($(SNAP_PY), 3.8)
|
| 165 |
+
PYTHON = /cygdrive/c/Program\ Files/Python38/python
|
| 166 |
+
else ifeq ($(SNAP_PY), 3.9)
|
| 167 |
+
PYTHON = /cygdrive/c/Program\ Files/Python39/python
|
| 168 |
+
endif
|
| 169 |
+
else
|
| 170 |
+
PYTHON = "/cygdrive/c/Program\ Files/Python37/python"
|
| 171 |
+
endif
|
| 172 |
+
|
| 173 |
+
SWIGFLAGS3 += $(SWIGFLAGS)
|
| 174 |
+
|
snap-python/source/README.md
ADDED
|
@@ -0,0 +1,112 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
snap-python
|
| 2 |
+
===========
|
| 3 |
+
|
| 4 |
+
1. Install SWIG for your platform (see below). Swig should be able to run from the command-line.
|
| 5 |
+
|
| 6 |
+
2. Checkout the snap-python repository as well as the SNAP C++ repository.
|
| 7 |
+
|
| 8 |
+
git clone git@github.com:snap-stanford/snap-python.git
|
| 9 |
+
git clone git@github.com:snap-stanford/snap.git
|
| 10 |
+
|
| 11 |
+
2. Then, run `make` from the top-level of `snap-python`. This will make the SNAP code into a Python module, using SWIG. Finally, it will run some Python tests in the `test` directory.
|
| 12 |
+
|
| 13 |
+
cd snap-python
|
| 14 |
+
make
|
| 15 |
+
|
| 16 |
+
From a Python interpreter, you should be able to import `snap` module:
|
| 17 |
+
|
| 18 |
+
$ python
|
| 19 |
+
>>> import sys
|
| 20 |
+
>>> sys.path.append("swig")
|
| 21 |
+
>>> import snap
|
| 22 |
+
|
| 23 |
+
3. There are some examples in the `examples` directory. For example, to run benchmarks:
|
| 24 |
+
|
| 25 |
+
$ cd examples
|
| 26 |
+
$ python benchmark.py -h
|
| 27 |
+
usage: benchmark.py [-h] [-v] [-r RANGE] [-e EDGES_DEG] [-d] [-t GRAPH_TYPES]
|
| 28 |
+
[-n NUM_ITERATIONS] [-o OUTPUT_FILE] [-g] [-w]
|
| 29 |
+
|
| 30 |
+
optional arguments:
|
| 31 |
+
-h, --help show this help message and exit
|
| 32 |
+
-v, --verbose increase output verbosity
|
| 33 |
+
-r RANGE, --range RANGE
|
| 34 |
+
range (4-6) (10^4 to 10^6 nodes)
|
| 35 |
+
-e EDGES_DEG, --edges_deg EDGES_DEG
|
| 36 |
+
range of degrees (e.g "2-3" => (10^1 to 10^3 edges per
|
| 37 |
+
node)
|
| 38 |
+
-d, --deterministic deterministic benchmark
|
| 39 |
+
-t GRAPH_TYPES, --graph_types GRAPH_TYPES
|
| 40 |
+
Graph types, comma separated. Available: rand_ungraph,
|
| 41 |
+
rand_ngraph, rmat, pref, sw
|
| 42 |
+
-n NUM_ITERATIONS, --num_iterations NUM_ITERATIONS
|
| 43 |
+
number of iterations
|
| 44 |
+
-o OUTPUT_FILE, --output_file OUTPUT_FILE
|
| 45 |
+
file to output results
|
| 46 |
+
-g, --generate generate new graphs
|
| 47 |
+
-w, --write_graph save graph
|
| 48 |
+
$ python benchmark.py -v -g -r 4-6 # needs about 4.3GB RAM and 4 min to run
|
| 49 |
+
|
| 50 |
+
|
| 51 |
+
SWIG Installation
|
| 52 |
+
-----------------
|
| 53 |
+
|
| 54 |
+
### Linux
|
| 55 |
+
|
| 56 |
+
Follow the instructions from SWIG's website: download, configure and make, [SWIG files](http://www.swig.org/download.html). Or, use your built-in installer (a CentOS example):
|
| 57 |
+
|
| 58 |
+
sudo yum install swig
|
| 59 |
+
|
| 60 |
+
### Mac OS X
|
| 61 |
+
|
| 62 |
+
swig-1.3.12 and later support OS-X/Darwin.
|
| 63 |
+
|
| 64 |
+
0. If you have ``homebrew``, simply hit ``brew install swig`` in terminal and ignore the rest of the instructions. Otherwise, download the Unix sources, configure, and build from the command terminal. This has been tested on 10.8.2. The following is adopted from [ColourBlomb](http://blog.colourbomb.net/?p=49).
|
| 65 |
+
|
| 66 |
+
1. Download the Unix source from http://swig.org/download.html
|
| 67 |
+
|
| 68 |
+
2. Moving to the terminal, extract the files from the tarball and move to the root directory of the SWIG install:
|
| 69 |
+
|
| 70 |
+
cd /Developer/SWIG
|
| 71 |
+
tar -xf swig-2.0.4.tar.gz
|
| 72 |
+
cd swig-2.0.4
|
| 73 |
+
|
| 74 |
+
3. Run `./configure`. This will produce an error if you don't have the PCRE (Perl Compatible Regular Expressions) library package installed.
|
| 75 |
+
This dependency is needed for configure to complete. Either:
|
| 76 |
+
- Install the PCRE developer package on your system (preferred approach).
|
| 77 |
+
- Download the PCRE source tarball, build and install on your system
|
| 78 |
+
as you would for any package built from source distribution.
|
| 79 |
+
- Use the `Tools/pcre-build.sh` script to build PCRE just for SWIG to statically
|
| 80 |
+
link against. Run `Tools/pcre-build.sh -help` for instructions.
|
| 81 |
+
(quite easy and does not require privileges to install PCRE on your system)
|
| 82 |
+
- Configure using the `-without-pcre` option to disable regular expressions support in SWIG
|
| 83 |
+
(not recommended).
|
| 84 |
+
See `config.log` for more details.
|
| 85 |
+
|
| 86 |
+
make
|
| 87 |
+
sudo make install
|
| 88 |
+
|
| 89 |
+
4. PCRE should now have successfully installed so move to the swig install directory and try `./configure` again:
|
| 90 |
+
|
| 91 |
+
cd ../swig-2.0.4
|
| 92 |
+
./configure
|
| 93 |
+
|
| 94 |
+
This time no errors are thrown so try and install:
|
| 95 |
+
|
| 96 |
+
make
|
| 97 |
+
sudo make install
|
| 98 |
+
|
| 99 |
+
5. Once this has completed test that SWIG has installed correctly, type `swig` into the terminal and hopefully you'll get the response:
|
| 100 |
+
Must specify an input file. Use `-help` for available options.
|
| 101 |
+
|
| 102 |
+
SWIG Benchmarks
|
| 103 |
+
-----------------
|
| 104 |
+
Example SWIG programs using the SNAP Ringo for multi-attribute edges are in the `examples` directory. The benchmark program `benchmark.py` performs a series of functions on the graph data, including node/edge iteration, degree checks, clustering coefficients, largest weakly and strongest components, etc. For R-MAT graphs with 1 million nodes and 10 million edges, this takes on average:
|
| 105 |
+
|
| 106 |
+
- On CentOS 6.3 with 2.66 GHz processor, 19.71 sec to generate a new graph and and 17.49 sec to run the tests.
|
| 107 |
+
- On Mac OSX 10.8 with 2.6 GHz processor, 13.95 sec to generate and 15.06 sec to run the tests.
|
| 108 |
+
|
| 109 |
+
To run a benchmark test you can run the following command:
|
| 110 |
+
|
| 111 |
+
python benchmark.py --verbose -n 5 --range 4-7 --type rmat --generate
|
| 112 |
+
|
snap-python/source/RELEASE.txt
ADDED
|
@@ -0,0 +1,203 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Snap.py 6.0 Release Notes
|
| 2 |
+
December 2020
|
| 3 |
+
|
| 4 |
+
Snap.py is a Python interface for SNAP (Stanford Network Analysis Platform).
|
| 5 |
+
SNAP is a general purpose, high performance system for analysis and
|
| 6 |
+
manipulation of large networks. SNAP is written in C++ and optimized
|
| 7 |
+
for maximum performance and compact graph representation. It easily scales
|
| 8 |
+
to massive networks with hundreds of millions of nodes, and billions of edges.
|
| 9 |
+
Snap.py provides performance benefits of SNAP, combined with flexibility
|
| 10 |
+
of Python. Most of the SNAP functionality is available via Snap.py in Python.
|
| 11 |
+
|
| 12 |
+
Snap.py 6.0 is a major release with a large number of new features, most
|
| 13 |
+
notably a significantly improved way to call Snap.py functions in Python, a
|
| 14 |
+
NetworkX compatibility layer, standard Python functions to handle SNAP vector
|
| 15 |
+
and hash types, new functions for egonets and graph union, and a completely
|
| 16 |
+
revised package building infrastructure with a better support for various
|
| 17 |
+
versions of Python. These enhancements are backward compatible, so existing
|
| 18 |
+
Snap.py based programs should continue to work.
|
| 19 |
+
|
| 20 |
+
A high-level description of changes in Snap.py releases is provided below.
|
| 21 |
+
|
| 22 |
+
Release 6.0.0, Dec 28, 2020
|
| 23 |
+
|
| 24 |
+
- implemented pylayer, a significantly improved way to call SNAP C++ functions
|
| 25 |
+
- standalone functions are available as class methods
|
| 26 |
+
- built-in Python classes (lists, dictionaries) can be provided as parameters
|
| 27 |
+
- results are available as return values rather than as reference parameters
|
| 28 |
+
- support for optional parameters has been enhanced
|
| 29 |
+
- implemented SnapX, a NetworkX compatible graph manipulation layer, as a
|
| 30 |
+
module within Snap.py
|
| 31 |
+
- implemented standard Python interface functions for SNAP vector and hash
|
| 32 |
+
types to be compatible with Python lists and dictionaries
|
| 33 |
+
- implemented new functions to calculate egonets, GetEgonet, GetEgonetHop,
|
| 34 |
+
GetInEgonetHop, GetOutEgonetHop, GetInEgonetSub
|
| 35 |
+
- implemented new functions to perform graph union, GetGraphUnion,
|
| 36 |
+
GetGraphUnionAttr
|
| 37 |
+
- added Dockerfile to containerize a release
|
| 38 |
+
- replaced setup.py with a completely new implementation
|
| 39 |
+
- added scripts for building wheel packages on macOS, Linux and Windows
|
| 40 |
+
- performed a large number of updates in Makefiles
|
| 41 |
+
- performed a major rewrite and extensions of the Snap.py documentation
|
| 42 |
+
- expanded functionality tests
|
| 43 |
+
- added a program to test the speed of various methods for writing and
|
| 44 |
+
reading a graph
|
| 45 |
+
- fixed formatting problems in creating the documentation with Sphinx
|
| 46 |
+
- added hellotest, a simple module to test the building of Python C/C++
|
| 47 |
+
|
| 48 |
+
Release 5.0.0, Aug 30, 2019
|
| 49 |
+
|
| 50 |
+
- implemented support for py3
|
| 51 |
+
- implemented wheel packages and pip for py2 and py3
|
| 52 |
+
- updated tests and documentation for py3
|
| 53 |
+
- updated other python code for the py3 print function
|
| 54 |
+
- upgraded build platforms to Ubuntu 18.04, macOS 14.10, Windows 10
|
| 55 |
+
- upgraded Visual Studio files to VS2019
|
| 56 |
+
- updated install_name_tool to the version from High Sierra 10.13
|
| 57 |
+
- updated setup.py from distutils to setuptools
|
| 58 |
+
- improved the tests for generated files, such as gnuplot files
|
| 59 |
+
- removed the need for Unix dependent commands grep and rm in tests
|
| 60 |
+
- commented out tests for PNG files, since these differ on various platforms
|
| 61 |
+
- implemented various other improvements in tests
|
| 62 |
+
- improved the update_dynlib.sh script
|
| 63 |
+
- improved the package build process
|
| 64 |
+
- added a license text
|
| 65 |
+
- added troubleshooting notes
|
| 66 |
+
- improved documentation on graph creation
|
| 67 |
+
- updated conf.py for the next release
|
| 68 |
+
|
| 69 |
+
Release 4.1.0, Jul 27, 2018
|
| 70 |
+
|
| 71 |
+
- updated C++ codebase to SNAP 4.1
|
| 72 |
+
- implemented GetSubGraphRenumber()
|
| 73 |
+
- implemented GetLen2Paths()
|
| 74 |
+
- implemented GetEigVec()
|
| 75 |
+
- implemented GetSngVec()
|
| 76 |
+
- implemented GetBfsEffDiamAll()
|
| 77 |
+
- implemented GetClustCfAll()
|
| 78 |
+
- implemented GetTriadsAll()
|
| 79 |
+
- implemented GetNodeTriadsAll()
|
| 80 |
+
- improved support for node2vec
|
| 81 |
+
- expanded the set of supported node iterator methods
|
| 82 |
+
- defined TFltVFltV
|
| 83 |
+
- added test programs for gnuplot and Graphviz
|
| 84 |
+
- improved documentation for GetEdgesInOut()
|
| 85 |
+
- improved documentation for GetSubTreeSz()
|
| 86 |
+
- improved documentation for IsTree()
|
| 87 |
+
- improved documentation for GetMxNId()
|
| 88 |
+
- improved documentation for CommunityCNM()
|
| 89 |
+
- improved documentation for CommunityCNM()
|
| 90 |
+
- improved documentation for GetRndNId()
|
| 91 |
+
- performed other minor updates in the documentation
|
| 92 |
+
|
| 93 |
+
Release 4.0.0, Jul 28, 2017
|
| 94 |
+
|
| 95 |
+
- updated C++ codebase to SNAP 4.0
|
| 96 |
+
- added a test for TTable
|
| 97 |
+
- minor updates in the documentation
|
| 98 |
+
|
| 99 |
+
Release 3.0.2, Oct 7, 2016
|
| 100 |
+
|
| 101 |
+
- fixed a missing ToNetwork() function
|
| 102 |
+
- fixed a few issues with documentation
|
| 103 |
+
- further improved Anaconda Python handling in setup.py
|
| 104 |
+
|
| 105 |
+
Release 3.0.1, Sep 28, 2016
|
| 106 |
+
|
| 107 |
+
- improved setup.py for installations with Anaconda Python
|
| 108 |
+
|
| 109 |
+
Release 3.0.0, Sep 14, 2016
|
| 110 |
+
|
| 111 |
+
- this is a major release with many new features
|
| 112 |
+
- version number synced up with SNAP
|
| 113 |
+
- updated C++ codebase to SNAP 3.0
|
| 114 |
+
- added support for new classes: multimodal networks TMMNet, TModeNet,
|
| 115 |
+
TCrossNet, TDirNet, TUndirNet, TNGraphMP, TNEANetMP
|
| 116 |
+
- included support for GetBetweennessCentr(), GetClosenessCentr(),
|
| 117 |
+
GetFarnessCentr() on TUNGraph(), TNGraph(), TNEANet()
|
| 118 |
+
- implemented multithreaded execution of many operations on Linux and Mac OS X
|
| 119 |
+
- extended test suite in snap-test.py
|
| 120 |
+
- added a batch script for testing on Windows
|
| 121 |
+
- fixed attributes in TNEANet and added a test
|
| 122 |
+
- fixed edge iterators and added a test
|
| 123 |
+
- fixed edge deletion in TNEANet and added a test
|
| 124 |
+
- fixed LoadConnListStr() and added a test
|
| 125 |
+
- fixed LoadEdgeListStr() and added a test
|
| 126 |
+
- fixed GetBfsTree() and added a test
|
| 127 |
+
- fixed GetBetweennessCentr() and added a test
|
| 128 |
+
- fixed GetClosenessCentr() and added a test
|
| 129 |
+
- fixed GetFarnessCentr() and added a test
|
| 130 |
+
- fixed THashKeyDatI and added a test
|
| 131 |
+
- added a test for vector operations
|
| 132 |
+
- extended Makefile with support for new classes: multimodal networks TMMNet,
|
| 133 |
+
TModeNet, TCrossNet, TNGraphMP, TNEANetMP
|
| 134 |
+
- added documentation for multimodal networks TMMNet
|
| 135 |
+
- added documentation for tables TTable
|
| 136 |
+
- added documentation for conversion of tables to graphs
|
| 137 |
+
- added documentation for sparse attributes
|
| 138 |
+
- added documentation for TUndirNet, TDirNet
|
| 139 |
+
- added documentation for sparse attributes for TNEANet
|
| 140 |
+
- fixed documentation for LoadConnListStr(), LoadEdgeListStr()
|
| 141 |
+
- added GetDat() to documentation on THash
|
| 142 |
+
- fixed a minor typo in documentation for PlotSccDistr()
|
| 143 |
+
|
| 144 |
+
Release 1.2, May 12, 2015
|
| 145 |
+
|
| 146 |
+
- updated C++ codebase to SNAP 2.4
|
| 147 |
+
- implemented and documented IsAttrDeletedN(), IsIntAttrDeletedN(),
|
| 148 |
+
IsFltAttrDeletedN(), IsStrAttrDeletedN(), IsAttrDeletedE(),
|
| 149 |
+
IsIntAttrDeletedE(), IsFltAttrDeletedE(), IsStrAttrDeletedE(),
|
| 150 |
+
GetNIdV(), GetEIdV(), GetRndEI()
|
| 151 |
+
- implemented GetIntAttrIndDatE(), GetFtlAttrIndDatE(), GetStrAttrIndDatE()
|
| 152 |
+
- implemented and documented GetAttrIndN(), GetAttrIndE(), IntAttrNameNI(),
|
| 153 |
+
FltAttrNameNI(), StrAttrNameNI(), IntAttrValueNI(), FltAttrValueNI(),
|
| 154 |
+
StrAttrValueNI(), GetIntAttrIndDatN(), GetFltAttrIndDatN(),
|
| 155 |
+
GetStrAttrIndDatN()
|
| 156 |
+
- expanded the code for the TNEAnet.GetEI()
|
| 157 |
+
- changed THashSet iterator to use THashSetKeyI
|
| 158 |
+
- fixed redefinition of Python built-in len() function
|
| 159 |
+
- fixed error with THashSet iterator
|
| 160 |
+
- fixed the code and the documentation for GetEI() in graphs and networks
|
| 161 |
+
- improved tneanet.py, fixed a few typos
|
| 162 |
+
- added tests for empty strings and nested iterators over TIntSet()
|
| 163 |
+
- added programs for the bug reports from CS224W
|
| 164 |
+
- added a bug program for GenRndPowerLaw()
|
| 165 |
+
- added a code that reproduces problem with LoadEdgeListStr()
|
| 166 |
+
- configured short compilation
|
| 167 |
+
- updated documentation and test program for AttrNameNI(), AttrValueNI(),
|
| 168 |
+
AttrNameEI(), AttrValueEI()
|
| 169 |
+
- documented GetIntAttrIndDatN(), GetFtlAttrIndDatN(), GetStrAttrIndDatN(),
|
| 170 |
+
IntAttrNameEI(), FltAttrNameEI(), StrAttrNameEI(), IntAttrValueEI(),
|
| 171 |
+
FltAttrValueEI(), StrAttrValueEI()
|
| 172 |
+
- updated typo in the documentation for GetNodeWcc()
|
| 173 |
+
- improved documentation for GetNodesAtHop() and GetNodesAtHops()
|
| 174 |
+
- fixed typos in documentation for GetMxSccSz
|
| 175 |
+
- fixed the documentation about the THashKeyDatI Next() iterator
|
| 176 |
+
- fixed errors in reference manual for GetOutDegCnt and GetInDegCnt
|
| 177 |
+
- fixed an small bug in the sample code for GetMxSccSz in the reference manual
|
| 178 |
+
- split documentation on node and edge attribute methods for TNEANet
|
| 179 |
+
- fixed documentation for TNEANetEdgeI.GetId()
|
| 180 |
+
- improved the documentation and a test for the set iterator
|
| 181 |
+
- improved documentation on PrintInfo()
|
| 182 |
+
|
| 183 |
+
Release 1.1, Jun 16, 2014
|
| 184 |
+
|
| 185 |
+
- updated C++ codebase to SNAP 2.3
|
| 186 |
+
- added support for installation with Anaconda or Homebrew python on Mac
|
| 187 |
+
- added StackOverflow example
|
| 188 |
+
- added AGM related functionality for community detection
|
| 189 |
+
- added clique percolation method for community detection
|
| 190 |
+
- added a test program and data for clique percolation method for
|
| 191 |
+
community detection
|
| 192 |
+
- added OpenMP support
|
| 193 |
+
- added more comprehensive tests
|
| 194 |
+
- updated TVec and THash samples
|
| 195 |
+
- added README.txt
|
| 196 |
+
- updated Makefile for tests
|
| 197 |
+
- improved top level Makefile
|
| 198 |
+
|
| 199 |
+
Release 1.0, Mar 20, 2014
|
| 200 |
+
|
| 201 |
+
- initial public release of Snap.py
|
| 202 |
+
- included C++ codebase SNAP 2.2
|
| 203 |
+
|
snap-python/source/__init__.py
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# -*- coding: utf-8 -*-
|
| 2 |
+
"""
|
| 3 |
+
snap-python Project Package Initialization File
|
| 4 |
+
"""
|
snap-python/source/dev/__init__.py
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
# -*- coding: utf-8 -*-
|
snap-python/source/dev/examples/Makefile
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#
|
| 2 |
+
# Makefile for running
|
| 3 |
+
#
|
| 4 |
+
|
| 5 |
+
all: benchmark, tneanet
|
| 6 |
+
|
| 7 |
+
benchmark:
|
| 8 |
+
python benchmark.py
|
| 9 |
+
|
| 10 |
+
tneanet:
|
| 11 |
+
python tneanet.py
|
| 12 |
+
|
| 13 |
+
clean:
|
| 14 |
+
rm -rf results *.graph
|
snap-python/source/dev/examples/__init__.py
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
# -*- coding: utf-8 -*-
|
snap-python/source/dev/examples/benchmark.py
ADDED
|
@@ -0,0 +1,431 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/usr/bin/python
|
| 2 |
+
# benchmark.py
|
| 3 |
+
#
|
| 4 |
+
# Author: Nick Shelly, Spring 2013
|
| 5 |
+
# Description:
|
| 6 |
+
# - Loads SNAP as a Python module.
|
| 7 |
+
# - Randomly generates a graph of specified size and type, and saves
|
| 8 |
+
# or loads the graph if it has already been created.
|
| 9 |
+
# - Benchmarks a number of "is this a good graph?" tests on the graph,
|
| 10 |
+
# calculating the amount of time required and appends to a file.
|
| 11 |
+
#
|
| 12 |
+
# usage: benchmark.py [-h] [-v] [-r RANGE] [-d] [-t GRAPH_TYPES]
|
| 13 |
+
# [-n NUM_ITERATIONS] [-o OUTPUT_FILE] [-g]
|
| 14 |
+
#
|
| 15 |
+
# optional arguments:
|
| 16 |
+
# -h, --help show this help message and exit
|
| 17 |
+
# -v, --verbose increase output verbosity
|
| 18 |
+
# -r RANGE, --range RANGE
|
| 19 |
+
# range (4-6) (10^4 to 10^6 nodes)
|
| 20 |
+
# -d, --deterministic deterministic benchmark
|
| 21 |
+
# -t GRAPH_TYPES, --graph_types GRAPH_TYPES
|
| 22 |
+
# Graph types, comma separated. Available: rand_ungraph,
|
| 23 |
+
# rand_ngraph, rmat, pref, sw
|
| 24 |
+
# -n NUM_ITERATIONS, --num_iterations NUM_ITERATIONS
|
| 25 |
+
# number of iterations
|
| 26 |
+
# -o OUTPUT_FILE, --output_file OUTPUT_FILE
|
| 27 |
+
# file to output results
|
| 28 |
+
# -g, --generate generate new graphs
|
| 29 |
+
#
|
| 30 |
+
# Examples:
|
| 31 |
+
# 1. Use default arguments.
|
| 32 |
+
# $ python menchmark.py
|
| 33 |
+
# 2. Generate deterministic RMAT graphs from 10^2-10^3 nodes, and
|
| 34 |
+
# run 3 times, outputing to results.txt.
|
| 35 |
+
# $ python benchmark.py -v -n 3 -g -d -r 2-3 -t rmat -o results/results.txt
|
| 36 |
+
#
|
| 37 |
+
|
| 38 |
+
import os.path
|
| 39 |
+
import sys
|
| 40 |
+
import argparse
|
| 41 |
+
from socket import gethostname
|
| 42 |
+
from time import clock
|
| 43 |
+
from datetime import datetime
|
| 44 |
+
|
| 45 |
+
sys.path.append("../swig-r")
|
| 46 |
+
import snap
|
| 47 |
+
|
| 48 |
+
PROPERTY_TYPES = [1, 10] # 1=Triads, 10=BFS
|
| 49 |
+
|
| 50 |
+
# Comma-separated, graph types:
|
| 51 |
+
# 'rmat' - R-MAT
|
| 52 |
+
# 'pref' - preferential attachment
|
| 53 |
+
# 'sw' - small world
|
| 54 |
+
# 'rand_ungraph' - random undirected
|
| 55 |
+
# 'rand_ngraph' - random directed
|
| 56 |
+
# 'rand_neanet' - random directed attribute
|
| 57 |
+
# 'syn_ngraph' - random directed
|
| 58 |
+
# 'syn_negraph' - synthetic multi-edge
|
| 59 |
+
# 'syn_neanet' - synthetic directed multi-edge attribute
|
| 60 |
+
|
| 61 |
+
DEFAULT_TYPES = "rand_neanet"
|
| 62 |
+
|
| 63 |
+
# Average is 1, non-average is 0.
|
| 64 |
+
DEFAULT_DEGREES = "1-2" # Default is 10x and 100x edges/node
|
| 65 |
+
DEFAULT_WRITE = False
|
| 66 |
+
SW_REWIRE_PROB = 0.1
|
| 67 |
+
SYNTHETIC_DELTA = 10
|
| 68 |
+
|
| 69 |
+
# Exponent range (e.g. 10^x to 10^y)
|
| 70 |
+
DEFAULT_VERBOSE=True
|
| 71 |
+
DEFAULT_RANGE = '3-4'
|
| 72 |
+
DEFAULT_ITERATIONS = 1
|
| 73 |
+
|
| 74 |
+
# Hostname for results
|
| 75 |
+
HOSTNAME = gethostname()
|
| 76 |
+
|
| 77 |
+
RESULTS_DIR = 'results'
|
| 78 |
+
DEFAULT_RESULTS_FILE = os.path.join(RESULTS_DIR, 'results%s.txt' % \
|
| 79 |
+
datetime.now().strftime('%m%d-%H%M%S'))
|
| 80 |
+
|
| 81 |
+
def benchmark_ngraph(Graph):
|
| 82 |
+
'''
|
| 83 |
+
Perform benchmark tests for Directed Graphs
|
| 84 |
+
'''
|
| 85 |
+
|
| 86 |
+
results = {}
|
| 87 |
+
results['num_nodes'] = Graph.GetNodes()
|
| 88 |
+
results['num_edges'] = Graph.GetEdges()
|
| 89 |
+
|
| 90 |
+
for degree in range(0, 11):
|
| 91 |
+
num = snap.NodesGTEDegree_PNGraph(Graph, degree)
|
| 92 |
+
percent_deg = float(num) / results['num_nodes']
|
| 93 |
+
results['deg_gte_%d' % degree] = num
|
| 94 |
+
results['deg_gte_%d_percent' % degree] = percent_deg
|
| 95 |
+
|
| 96 |
+
# Check for over-weighted nodes
|
| 97 |
+
results['max_degree'] = snap.MxDegree_PNGraph(Graph)
|
| 98 |
+
|
| 99 |
+
num = snap.NodesGTEDegree_PNGraph(Graph, results['max_degree'])
|
| 100 |
+
results['max_degree_num'] = num
|
| 101 |
+
|
| 102 |
+
results['max_wcc_percent'] = snap.MxWccSz_PNGraph(Graph) \
|
| 103 |
+
/ results['num_nodes']
|
| 104 |
+
results['max_scc_percent'] = snap.MxSccSz_PNGraph(Graph).GetNodes() \
|
| 105 |
+
/ results['num_nodes']
|
| 106 |
+
|
| 107 |
+
return results
|
| 108 |
+
|
| 109 |
+
def benchmark_ungraph(Graph):
|
| 110 |
+
'''
|
| 111 |
+
Perform benchmark tests for Undirected Graphs
|
| 112 |
+
'''
|
| 113 |
+
|
| 114 |
+
results = {}
|
| 115 |
+
results['num_nodes'] = Graph.GetNodes()
|
| 116 |
+
results['num_edges'] = Graph.GetEdges()
|
| 117 |
+
|
| 118 |
+
for degree in range(0,11):
|
| 119 |
+
num = snap.NodesGTEDegree_PUNGraph(Graph, degree)
|
| 120 |
+
percent_deg = float(num) / results['num_nodes']
|
| 121 |
+
results['deg_gte_%d' % degree] = num
|
| 122 |
+
results['deg_gte_%d_percent' % degree] = percent_deg
|
| 123 |
+
|
| 124 |
+
# Check for over-weighted nodes
|
| 125 |
+
results['max_degree'] = snap.MxDegree_PUNGraph(Graph)
|
| 126 |
+
|
| 127 |
+
num = snap.NodesGTEDegree_PUNGraph(Graph, results['max_degree'])
|
| 128 |
+
results['max_degree_num'] = num
|
| 129 |
+
results['max_wcc_percent'] = snap.MxWccSz_PUNGraph(Graph) \
|
| 130 |
+
/ results['num_nodes']
|
| 131 |
+
results['max_scc_percent'] = snap.MxSccSz_PUNGraph(Graph).GetNodes() \
|
| 132 |
+
/ results['num_nodes']
|
| 133 |
+
|
| 134 |
+
# TODO: Calculate graph skew
|
| 135 |
+
return results
|
| 136 |
+
|
| 137 |
+
def benchmark_neanet(Graph):
|
| 138 |
+
'''
|
| 139 |
+
Perform benchmark tests for Directed Attribute Graphs
|
| 140 |
+
'''
|
| 141 |
+
|
| 142 |
+
results = {}
|
| 143 |
+
results['num_nodes'] = Graph.GetNodes()
|
| 144 |
+
results['num_edges'] = Graph.GetEdges()
|
| 145 |
+
|
| 146 |
+
for degree in range(0, 11):
|
| 147 |
+
num = snap.NodesGTEDegree(Graph, degree)
|
| 148 |
+
percent_deg = float(num) / results['num_nodes']
|
| 149 |
+
results['deg_gte_%d' % degree] = num
|
| 150 |
+
results['deg_gte_%d_percent' % degree] = percent_deg
|
| 151 |
+
|
| 152 |
+
# Check for over-weighted nodes
|
| 153 |
+
results['max_degree'] = snap.MxDegree(Graph)
|
| 154 |
+
|
| 155 |
+
num = snap.NodesGTEDegree(Graph, results['max_degree'])
|
| 156 |
+
results['max_degree_num'] = num
|
| 157 |
+
|
| 158 |
+
results['max_wcc_percent'] = snap.MxWccSz(Graph) \
|
| 159 |
+
/ results['num_nodes']
|
| 160 |
+
results['max_scc_percent'] = snap.MxSccSz(Graph).GetNodes() \
|
| 161 |
+
/ results['num_nodes']
|
| 162 |
+
|
| 163 |
+
return results
|
| 164 |
+
|
| 165 |
+
|
| 166 |
+
def convert_graph(Graph, TypeSrc, TypeDst):
|
| 167 |
+
'''
|
| 168 |
+
Converts a GRAPH from type TYPESRC to a TYPEDST and returns the new graph
|
| 169 |
+
'''
|
| 170 |
+
pass
|
| 171 |
+
|
| 172 |
+
|
| 173 |
+
def generate_graph(NNodes, NEdges, Model, Type, Rnd):
|
| 174 |
+
|
| 175 |
+
if Model == 'rand_ungraph':
|
| 176 |
+
# GnRndGnm returns error, so manually generate
|
| 177 |
+
Graph = snap.GenRndGnm_PUNGraph(NNodes, NEdges, 0)
|
| 178 |
+
|
| 179 |
+
elif Model == 'rand_ngraph':
|
| 180 |
+
Graph = snap.GenRndGnm_PNGraph(NNodes, NEdges, 1)
|
| 181 |
+
|
| 182 |
+
elif Model == 'rand_neanet':
|
| 183 |
+
Graph = snap.GenRndGnm(NNodes, NEdges, 1)
|
| 184 |
+
|
| 185 |
+
elif Model == 'syn_neanet':
|
| 186 |
+
Graph = snap.GenSyntheticGraph(NNodes, NEdges/NNodes,
|
| 187 |
+
SYNTHETIC_DELTA)
|
| 188 |
+
|
| 189 |
+
elif Model == 'syn_ngraph':
|
| 190 |
+
Graph = snap.GenSyntheticGraph_PNGraph(NNodes, NEdges/NNodes,
|
| 191 |
+
SYNTHETIC_DELTA)
|
| 192 |
+
|
| 193 |
+
elif Model == 'rmat':
|
| 194 |
+
Graph = snap.GenRMat(NNodes, NEdges, 0.40, 0.25, 0.2, Rnd)
|
| 195 |
+
|
| 196 |
+
elif Model == 'sw':
|
| 197 |
+
Graph = snap.GenSmallWorld(NNodes, NNodes/NEdges, 0.1)
|
| 198 |
+
|
| 199 |
+
elif Model == 'pref':
|
| 200 |
+
Graph = snap.GenPrefAttach(NNodes, NNodes/NEdges)
|
| 201 |
+
|
| 202 |
+
return Graph
|
| 203 |
+
|
| 204 |
+
def run_tests(num_iterations=3, min_nodes_exponent=3, max_nodes_exponent=4):
|
| 205 |
+
'''
|
| 206 |
+
Perform tests with specified exponent range
|
| 207 |
+
'''
|
| 208 |
+
|
| 209 |
+
if verbose:
|
| 210 |
+
print "Running results from %e to %e" % (min_nodes_exponent,
|
| 211 |
+
max_nodes_exponent)
|
| 212 |
+
|
| 213 |
+
Rnd = snap.TRnd()
|
| 214 |
+
|
| 215 |
+
for exp in range(min_nodes_exponent,max_nodes_exponent+1):
|
| 216 |
+
|
| 217 |
+
for n in range(num_iterations):
|
| 218 |
+
|
| 219 |
+
if verbose:
|
| 220 |
+
print "Iteration: %d of %d" % (n+1, num_iterations)
|
| 221 |
+
|
| 222 |
+
# Random number of nodes of degree i
|
| 223 |
+
NNodes = 10**exp;
|
| 224 |
+
|
| 225 |
+
for avg_deg in range(min_degree_edges, max_degree_edges+1):
|
| 226 |
+
|
| 227 |
+
for g in graph_types:
|
| 228 |
+
|
| 229 |
+
if deterministic:
|
| 230 |
+
if verbose:
|
| 231 |
+
print "Deterministic mode, putting seed"
|
| 232 |
+
else:
|
| 233 |
+
if verbose:
|
| 234 |
+
print "Non-deterministic mode"
|
| 235 |
+
Rnd.PutSeed(0)
|
| 236 |
+
|
| 237 |
+
if verbose: print "Using average degree of 10^%d" % avg_deg
|
| 238 |
+
NEdges = NNodes*(10**avg_deg)
|
| 239 |
+
|
| 240 |
+
Graph = None
|
| 241 |
+
if g in ['rmat', 'rand_ngraph', 'syn_ngraph','syn_negraph']:
|
| 242 |
+
Type = "directed"
|
| 243 |
+
|
| 244 |
+
elif g in ['sw', 'pref', 'rand_ungraph']:
|
| 245 |
+
Type = "undirected"
|
| 246 |
+
|
| 247 |
+
elif g in ['rand_neanet', 'syn_neanet']:
|
| 248 |
+
Type = "attribute"
|
| 249 |
+
|
| 250 |
+
else:
|
| 251 |
+
print "Unknown graph type: %s" % g
|
| 252 |
+
sys.exit(1)
|
| 253 |
+
|
| 254 |
+
StartTime = clock()
|
| 255 |
+
FName = os.path.join(RESULTS_DIR, "%s_10e%d_deg%d_%d.graph" %
|
| 256 |
+
(g, exp, NEdges/NNodes, n))
|
| 257 |
+
|
| 258 |
+
if not generate:
|
| 259 |
+
|
| 260 |
+
if os.path.exists(FName):
|
| 261 |
+
try:
|
| 262 |
+
|
| 263 |
+
if verbose:
|
| 264 |
+
print "Loading '%s' from ...'%s'" % (g, FName),
|
| 265 |
+
sys.stdout.flush()
|
| 266 |
+
|
| 267 |
+
FIn = snap.TFIn(snap.TStr(FName))
|
| 268 |
+
if Type == "directed":
|
| 269 |
+
Graph = snap.PNGraph_New()
|
| 270 |
+
elif Type == "undirected":
|
| 271 |
+
Graph = snap.PUNGraph_New()
|
| 272 |
+
elif Type == "attribute":
|
| 273 |
+
Graph = snap.PNEANet_New()
|
| 274 |
+
|
| 275 |
+
Graph = Graph.Load(FIn)
|
| 276 |
+
if verbose: print "done"
|
| 277 |
+
|
| 278 |
+
if verbose:
|
| 279 |
+
print "Re-loaded graph with %d Nodes and %d Edges" % \
|
| 280 |
+
(Graph.GetNodes(), Graph.GetEdges())
|
| 281 |
+
|
| 282 |
+
except Exception, e:
|
| 283 |
+
print "Unable to load graph file, '%s': %s" % (FName, str(e))
|
| 284 |
+
|
| 285 |
+
# else:
|
| 286 |
+
# print "File not found: %s" % FName
|
| 287 |
+
|
| 288 |
+
if not Graph:
|
| 289 |
+
|
| 290 |
+
try:
|
| 291 |
+
|
| 292 |
+
# User wants to re-generate graph, or no graph data available.
|
| 293 |
+
if verbose:
|
| 294 |
+
print "Generating '%s %s' graph with %e nodes, %e edges..." % \
|
| 295 |
+
(Type, g, NNodes, NEdges),
|
| 296 |
+
sys.stdout.flush()
|
| 297 |
+
Graph = generate_graph(NNodes, NEdges, g, Type, Rnd)
|
| 298 |
+
if verbose: print "done"
|
| 299 |
+
|
| 300 |
+
if opt_write:
|
| 301 |
+
|
| 302 |
+
# Save the graph
|
| 303 |
+
if verbose:
|
| 304 |
+
print "Saving '%s' graph to file '%s'..." % (g, FName),
|
| 305 |
+
sys.stdout.flush()
|
| 306 |
+
|
| 307 |
+
if Graph:
|
| 308 |
+
FOut = snap.TFOut(snap.TStr(FName))
|
| 309 |
+
Graph.__ref__().Save(FOut) # Save as TUNGraph or TNGraph
|
| 310 |
+
FOut.Flush()
|
| 311 |
+
if verbose: print "done"
|
| 312 |
+
|
| 313 |
+
except Exception, e:
|
| 314 |
+
print "Unable to generate/save graph file, '%s': %s" % \
|
| 315 |
+
(FName, str(e))
|
| 316 |
+
continue
|
| 317 |
+
|
| 318 |
+
TimeGenerate = clock() - StartTime
|
| 319 |
+
|
| 320 |
+
print "Running tests...",
|
| 321 |
+
sys.stdout.flush()
|
| 322 |
+
|
| 323 |
+
StartTime = clock()
|
| 324 |
+
|
| 325 |
+
if Type == 'directed':
|
| 326 |
+
results = benchmark_ngraph(Graph)
|
| 327 |
+
elif Type == 'undirected':
|
| 328 |
+
results = benchmark_ungraph(Graph)
|
| 329 |
+
elif Type == 'attribute':
|
| 330 |
+
results = benchmark_neanet(Graph)
|
| 331 |
+
|
| 332 |
+
if verbose: print "done"
|
| 333 |
+
|
| 334 |
+
TimeElapsed = clock() - StartTime
|
| 335 |
+
|
| 336 |
+
print "Elapsed Time = %.4f sec" % TimeElapsed
|
| 337 |
+
|
| 338 |
+
row_header = ["Hostname", "Model", "Type", "Nodes", "Edges",
|
| 339 |
+
"StartTime", "Generation Time", "Run Time"]
|
| 340 |
+
|
| 341 |
+
print "Header: %s" % " ".join(row_header)
|
| 342 |
+
|
| 343 |
+
import csv
|
| 344 |
+
with open(results_file, 'a+') as csvfile:
|
| 345 |
+
writer = csv.writer(csvfile)
|
| 346 |
+
if verbose:
|
| 347 |
+
print "Writing to '%s'..." % results_file,
|
| 348 |
+
sys.stdout.flush()
|
| 349 |
+
|
| 350 |
+
row = [HOSTNAME, g, Type, NNodes, NEdges,
|
| 351 |
+
datetime.now().strftime("%d/%b/%Y:%H:%M:%S"),
|
| 352 |
+
TimeGenerate, TimeElapsed]
|
| 353 |
+
if verbose: print "done"
|
| 354 |
+
print "Time Data: %s" % repr(row)
|
| 355 |
+
writer.writerow(row)
|
| 356 |
+
|
| 357 |
+
print "-"*75
|
| 358 |
+
|
| 359 |
+
def main():
|
| 360 |
+
|
| 361 |
+
global results_dir, verbose, deterministic, generate, graph_types, \
|
| 362 |
+
hostname, num_iterations, results_file, \
|
| 363 |
+
min_degree_edges, max_degree_edges, opt_write
|
| 364 |
+
|
| 365 |
+
parser = argparse.ArgumentParser()
|
| 366 |
+
parser.add_argument("-v", "--verbose", default=DEFAULT_VERBOSE,
|
| 367 |
+
action="store_true", dest="verbose",
|
| 368 |
+
help="increase output verbosity")
|
| 369 |
+
|
| 370 |
+
parser.add_argument("-r", "--range", default=DEFAULT_RANGE,
|
| 371 |
+
help="range (4-6) (10^4 to 10^6 nodes)")
|
| 372 |
+
|
| 373 |
+
parser.add_argument("-e", "--edges_deg", default=DEFAULT_DEGREES,
|
| 374 |
+
help="range of degrees (e.g \"2-3\" => (10^1 to 10^3 edges per node)")
|
| 375 |
+
|
| 376 |
+
parser.add_argument("-d", "--deterministic", default=False,
|
| 377 |
+
action="store_true", dest="deterministic",
|
| 378 |
+
help="deterministic benchmark")
|
| 379 |
+
|
| 380 |
+
parser.add_argument("-t", "--graph_types", default=DEFAULT_TYPES,
|
| 381 |
+
help='''
|
| 382 |
+
Graph types, comma separated.
|
| 383 |
+
Available: rand_ungraph, rand_ngraph, rmat, pref, sw''')
|
| 384 |
+
|
| 385 |
+
parser.add_argument("-n", "--num_iterations", type=int,
|
| 386 |
+
default=DEFAULT_ITERATIONS, help="number of iterations")
|
| 387 |
+
|
| 388 |
+
parser.add_argument("-o", "--output_file",
|
| 389 |
+
default=DEFAULT_RESULTS_FILE,
|
| 390 |
+
help="file to output results")
|
| 391 |
+
|
| 392 |
+
parser.add_argument("-g", "--generate", default=False,
|
| 393 |
+
action="store_true", dest="generate",
|
| 394 |
+
help="generate new graphs")
|
| 395 |
+
|
| 396 |
+
parser.add_argument("-w", "--write_graph", default=DEFAULT_WRITE,
|
| 397 |
+
action="store_true", dest="write",
|
| 398 |
+
help="save graph")
|
| 399 |
+
|
| 400 |
+
args = parser.parse_args()
|
| 401 |
+
|
| 402 |
+
verbose = args.verbose
|
| 403 |
+
generate = args.generate
|
| 404 |
+
deterministic = args.deterministic
|
| 405 |
+
results_file = args.output_file
|
| 406 |
+
num_iterations = args.num_iterations
|
| 407 |
+
graph_types = args.graph_types.split(",")
|
| 408 |
+
min_degree_edges = int(args.edges_deg.split("-")[0])
|
| 409 |
+
max_degree_edges = int(args.edges_deg.split("-")[-1])
|
| 410 |
+
opt_write = args.write
|
| 411 |
+
|
| 412 |
+
|
| 413 |
+
print "Edge degree = 10^%d to 10^%d edges/node" % \
|
| 414 |
+
(min_degree_edges, max_degree_edges)
|
| 415 |
+
|
| 416 |
+
if verbose:
|
| 417 |
+
print "Hostname: %s" % HOSTNAME
|
| 418 |
+
min = int(args.range.split("-")[0])
|
| 419 |
+
max = int(args.range.split("-")[-1])
|
| 420 |
+
print "Node range = 10^%d to 10^%d" % (min, max)
|
| 421 |
+
|
| 422 |
+
if not os.path.exists(RESULTS_DIR):
|
| 423 |
+
print "Creating results directory %s" % RESULTS_DIR
|
| 424 |
+
os.makedirs(RESULTS_DIR)
|
| 425 |
+
|
| 426 |
+
run_tests(num_iterations, min, max)
|
| 427 |
+
|
| 428 |
+
if __name__ == "__main__":
|
| 429 |
+
main()
|
| 430 |
+
|
| 431 |
+
|
snap-python/source/dev/examples/convert.py
ADDED
|
@@ -0,0 +1,220 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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Author: Nick Shelly, Spring 2013
|
| 5 |
+
# Description:
|
| 6 |
+
# - Loads SNAP as a Python module.
|
| 7 |
+
# - Randomly generates a graph of specified size and type and saving,
|
| 8 |
+
# or loading the graph if has already been created.
|
| 9 |
+
# - Converts the graph to the specified file
|
| 10 |
+
#
|
| 11 |
+
# usage: convert.py [-h] [-v]
|
| 12 |
+
#
|
| 13 |
+
# optional arguments:
|
| 14 |
+
# -h, --help show this help message and exit
|
| 15 |
+
#
|
| 16 |
+
# Example:
|
| 17 |
+
# $ python benchmark.py -v -n 3 -g -d -r 2-3 -t rmat -o results/results.txt
|
| 18 |
+
#
|
| 19 |
+
|
| 20 |
+
import os.path
|
| 21 |
+
import sys
|
| 22 |
+
import argparse
|
| 23 |
+
from socket import gethostname
|
| 24 |
+
from time import clock
|
| 25 |
+
from datetime import datetime
|
| 26 |
+
|
| 27 |
+
sys.path.append("../swig-r")
|
| 28 |
+
import snap
|
| 29 |
+
|
| 30 |
+
PROPERTY_TYPES = [1, 10] # 1=Triads, 10=BFS
|
| 31 |
+
|
| 32 |
+
# Comma-separated, graph types:
|
| 33 |
+
# 'rmat' - R-MAT
|
| 34 |
+
# 'pref' - preferential attachment
|
| 35 |
+
# 'sw' - small world
|
| 36 |
+
# 'rand_ungraph' - random undirected
|
| 37 |
+
# 'rand_ngraph' - random directed
|
| 38 |
+
# 'rand_neagraph' - random directed attribute
|
| 39 |
+
# 'syn_ngraph' - random directed
|
| 40 |
+
# 'syn_negraph' - synthetic multi-edge
|
| 41 |
+
# 'syn_neagraph' - synthetic directed multi-edge attribute
|
| 42 |
+
|
| 43 |
+
GRAPH_TYPES = ['rmat', 'pref', 'sw', \
|
| 44 |
+
'rand_ungraph', 'rand_ngraph', 'rand_neagraph', \
|
| 45 |
+
'syn_ngraph', 'syn_negraph', 'syn_neagraph']
|
| 46 |
+
DEFAULT_TYPES = "rmat,rand_ungraph"
|
| 47 |
+
|
| 48 |
+
DEFAULT_NODES_EXP = 3
|
| 49 |
+
DEFAULT_EDGES_EXP = 4
|
| 50 |
+
|
| 51 |
+
# Average is 1, non-average is 0.
|
| 52 |
+
DEFAULT_DEGREES = 1-2 # Default is 10x and 100x edges/node
|
| 53 |
+
DEFAULT_WRITE = False
|
| 54 |
+
SW_REWIRE_PROB = 0.1
|
| 55 |
+
SYNTHETIC_DELTA = 10
|
| 56 |
+
|
| 57 |
+
# Exponent range (e.g. 10^x to 10^y)
|
| 58 |
+
DEFAULT_RANGE = '5-7'
|
| 59 |
+
DEFAULT_ITERATIONS = 1
|
| 60 |
+
|
| 61 |
+
# Hostname for results
|
| 62 |
+
HOSTNAME = gethostname()
|
| 63 |
+
|
| 64 |
+
RESULTS_DIR = 'results'
|
| 65 |
+
DEFAULT_RESULTS_FILE = os.path.join(RESULTS_DIR, 'results%s.txt' % \
|
| 66 |
+
datetime.now().strftime('%m%d-%H%M%S'))
|
| 67 |
+
|
| 68 |
+
def generate_graph(NNodes, NEdges, Model, Rnd):
|
| 69 |
+
|
| 70 |
+
Graph = None
|
| 71 |
+
if Model == 'rand_ungraph':
|
| 72 |
+
# GnRndGnm returns error, so manually generate
|
| 73 |
+
Graph = snap.GenRndGnm_PUNGraph(NNodes, NEdges, 0)
|
| 74 |
+
|
| 75 |
+
elif Model == 'rand_ngraph':
|
| 76 |
+
Graph = snap.GenRndGnm_PNGraph(NNodes, NEdges, 1)
|
| 77 |
+
|
| 78 |
+
elif Model == 'rand_neagraph':
|
| 79 |
+
Graph = snap.GenRndGnm_PNEANet(NNodes, NEdges, 1)
|
| 80 |
+
|
| 81 |
+
elif Model == 'syn_neagraph':
|
| 82 |
+
Graph = snap.GenSyntheticGraph_PNEANet(NNodes, NEdges/NNodes,
|
| 83 |
+
SYNTHETIC_DELTA)
|
| 84 |
+
|
| 85 |
+
elif Model == 'syn_ngraph':
|
| 86 |
+
Graph = snap.GenSyntheticGraph_PNGraph(NNodes, NEdges/NNodes,
|
| 87 |
+
SYNTHETIC_DELTA)
|
| 88 |
+
|
| 89 |
+
elif Model == 'rmat':
|
| 90 |
+
Graph = snap.GenRMat(NNodes, NEdges, 0.40, 0.25, 0.2, Rnd)
|
| 91 |
+
|
| 92 |
+
elif Model == 'sw':
|
| 93 |
+
Graph = snap.GenSmallWorld(NNodes, NNodes/NEdges, 0.1)
|
| 94 |
+
|
| 95 |
+
elif Model == 'pref':
|
| 96 |
+
Graph = snap.GenPrefAttach(NNodes, NNodes/NEdges)
|
| 97 |
+
|
| 98 |
+
else:
|
| 99 |
+
print "Unknown model: %s" % Model
|
| 100 |
+
sys.exit(1)
|
| 101 |
+
|
| 102 |
+
return Graph
|
| 103 |
+
|
| 104 |
+
|
| 105 |
+
def convert_graph(Graph, TypeSrc, TypeDst):
|
| 106 |
+
'''
|
| 107 |
+
Converts a GRAPH from type TYPESRC to a TYPEDST and returns the new graph
|
| 108 |
+
'''
|
| 109 |
+
|
| 110 |
+
print "Converting from '%s' to '%s'..." % (TypeSrc, TypeDst)
|
| 111 |
+
sys.stdout.flush()
|
| 112 |
+
|
| 113 |
+
|
| 114 |
+
if TypeSrc == 'ngraph' and TypeDst == 'neagraph':
|
| 115 |
+
|
| 116 |
+
GraphOut = snap.ConvertGraph_PNGraphToPNEANet(Graph)
|
| 117 |
+
|
| 118 |
+
else:
|
| 119 |
+
print "Unable to convert: %s to %s" % (TypeSrc, TypeDst)
|
| 120 |
+
sys.exit(1)
|
| 121 |
+
|
| 122 |
+
print "done"
|
| 123 |
+
|
| 124 |
+
print "GraphIn (%s) has %d nodes, %d edges\n" % \
|
| 125 |
+
(Graph.__class__, Graph.GetNodes(), Graph.GetEdges())
|
| 126 |
+
print "GraphOut (%s) has %d nodes, %d edges" % \
|
| 127 |
+
(GraphOut.__class__, GraphOut.GetNodes(), GraphOut.GetEdges())
|
| 128 |
+
|
| 129 |
+
def run(nodes_exp, edges_exp, InputModel, OutputType):
|
| 130 |
+
|
| 131 |
+
'''
|
| 132 |
+
Perform tests with specified exponent range
|
| 133 |
+
'''
|
| 134 |
+
|
| 135 |
+
if opt_verbose:
|
| 136 |
+
print "Running results from %e to %e" % (min_nodes_exponent,
|
| 137 |
+
max_nodes_exponent)
|
| 138 |
+
|
| 139 |
+
Rnd = snap.TRnd()
|
| 140 |
+
|
| 141 |
+
# Random number of nodes of degree i
|
| 142 |
+
NNodes = 10**nodes_exp
|
| 143 |
+
NEdges = 10**edges_exp
|
| 144 |
+
|
| 145 |
+
if opt_deterministic:
|
| 146 |
+
if opt_verbose:
|
| 147 |
+
print "Deterministic mode, putting seed"
|
| 148 |
+
else:
|
| 149 |
+
if opt_verbose:
|
| 150 |
+
print "Non-deterministic mode"
|
| 151 |
+
Rnd.PutSeed(0)
|
| 152 |
+
|
| 153 |
+
if opt_verbose: print "Using average degree of 10^%d" % avg_deg
|
| 154 |
+
|
| 155 |
+
StartTime = clock()
|
| 156 |
+
|
| 157 |
+
# User wants to re-generate graph, or no graph data available.
|
| 158 |
+
if opt_verbose:
|
| 159 |
+
print "Generating '%s %s' graph with %e nodes, %e edges..." % \
|
| 160 |
+
(Type, g, NNodes, NEdges),
|
| 161 |
+
sys.stdout.flush()
|
| 162 |
+
Graph = generate_graph(NNodes, NEdges, InputModel, Rnd)
|
| 163 |
+
if opt_verbose: print "done"
|
| 164 |
+
|
| 165 |
+
if InputModel in ['rmat', 'rand_ngraph', 'syn_ngraph','syn_negraph']:
|
| 166 |
+
TypeSrc = "ngraph"
|
| 167 |
+
|
| 168 |
+
elif InputModel in ['sw', 'pref', 'rand_ungraph']:
|
| 169 |
+
TypeSrc = "ungraph"
|
| 170 |
+
|
| 171 |
+
elif InputModel in ['rand_neagraph', 'syn_neagraph']:
|
| 172 |
+
TypeSrc = "neagraph"
|
| 173 |
+
|
| 174 |
+
else:
|
| 175 |
+
print "Unknown graph type: %s" % g
|
| 176 |
+
sys.exit(1)
|
| 177 |
+
|
| 178 |
+
convert_graph(Graph, TypeSrc, OutputType)
|
| 179 |
+
print "-"*75
|
| 180 |
+
|
| 181 |
+
def main():
|
| 182 |
+
|
| 183 |
+
parser = argparse.ArgumentParser()
|
| 184 |
+
parser.add_argument("-v", "--verbose", default=False,
|
| 185 |
+
action="store_true", dest="verbose",
|
| 186 |
+
help="increase output verbosity")
|
| 187 |
+
|
| 188 |
+
parser.add_argument("-n", "--nodes_exp", default=DEFAULT_NODES_EXP,
|
| 189 |
+
help="number of nodes, exponent (e.g. 4 => 10^4 nodes)")
|
| 190 |
+
|
| 191 |
+
parser.add_argument("-e", "--edges_exp", default=DEFAULT_EDGES_EXP,
|
| 192 |
+
help="number of edges, exponent (e.g. 4 => 10^4 edges)")
|
| 193 |
+
|
| 194 |
+
parser.add_argument("-d", "--deterministic", default=False,
|
| 195 |
+
action="store_true", dest="deterministic",
|
| 196 |
+
help="deterministic benchmark")
|
| 197 |
+
|
| 198 |
+
parser.add_argument("-i", "--input_model", required=True,
|
| 199 |
+
help='''
|
| 200 |
+
Graph types, comma separated: (rmat, pref, rand_ngraph, syn_ngraph)'''
|
| 201 |
+
|
| 202 |
+
parser.add_argument("-o", "--output_type", required=True,
|
| 203 |
+
help="output type (PNEANet)")
|
| 204 |
+
|
| 205 |
+
args = parser.parse_args()
|
| 206 |
+
|
| 207 |
+
global opt_verbose, opt_deterministic, opt_nodes_exp, opt_edges_exp
|
| 208 |
+
|
| 209 |
+
opt_verbose = args.verbose
|
| 210 |
+
opt_deterministic = args.deterministic
|
| 211 |
+
|
| 212 |
+
if opt_verbose:
|
| 213 |
+
print "Hostname: %s" % HOSTNAME
|
| 214 |
+
|
| 215 |
+
run(args.nodes_exp, args.edges_exp, args.input_model, args.output_type)
|
| 216 |
+
|
| 217 |
+
if __name__ == "__main__":
|
| 218 |
+
main()
|
| 219 |
+
|
| 220 |
+
|
snap-python/source/dev/examples/data/p2p-Gnutella08.txt
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
snap-python/source/dev/examples/demo.graph.dat
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import os
|
| 2 |
+
import sys
|
| 3 |
+
import time
|
| 4 |
+
from random import randrange, choice
|
| 5 |
+
from socket import gethostname
|
| 6 |
+
import argparse
|
| 7 |
+
|
| 8 |
+
sys.path.append("../swig-r")
|
| 9 |
+
|
| 10 |
+
import snap
|
| 11 |
+
|
| 12 |
+
min_nodes_exponent = 1
|
| 13 |
+
max_nodes_exponent = 4
|
| 14 |
+
NUM_ITERATIONS = 1
|
| 15 |
+
PROPERTY_TYPES = [1, 10] # 1=Triads, 10=BFS
|
| 16 |
+
GRAPH_TYPES = [0, 3, 4] # Small World, Pref, R-MAT
|
| 17 |
+
DEGREE_TYPES = [0, 1]
|
| 18 |
+
|
| 19 |
+
AVG_DEG = 3
|
| 20 |
+
AVG_DEGREE_RANGE = range(2, 10)
|
| 21 |
+
|
| 22 |
+
results_dir = '.'
|
| 23 |
+
combined_dir = 'public_html'
|
| 24 |
+
hostname = gethostname()
|
| 25 |
+
verbose = False
|
| 26 |
+
|
| 27 |
+
def calc_stats():
|
| 28 |
+
|
| 29 |
+
for g in GRAPH_TYPES:
|
| 30 |
+
|
| 31 |
+
for e in range(min_nodes_exponent,max_nodes_exponent+1):
|
| 32 |
+
|
| 33 |
+
# Random number of nodes of degree i
|
| 34 |
+
NNodes = randrange(10**e,10**(e+1))
|
| 35 |
+
|
| 36 |
+
for avg in DEGREE_TYPES:
|
| 37 |
+
|
| 38 |
+
if avg:
|
| 39 |
+
# Use average degree
|
| 40 |
+
NEdges = NNodes * AVG_DEG
|
| 41 |
+
|
| 42 |
+
else:
|
| 43 |
+
# Random number of edges (from 1-3x nodes)
|
| 44 |
+
NEdges = NNodes * choice(AVG_DEGREE_RANGE)
|
| 45 |
+
|
| 46 |
+
print "%s graph: NNodes=%.2e, %.2e" % \
|
| 47 |
+
(snap.GetGraphDesc(g), NNodes, NEdges)
|
| 48 |
+
|
| 49 |
+
fname = "%s%s" % (snap.GetGraphAbbr(g),
|
| 50 |
+
'deg%d' % AVG_DEG if avg else '')
|
| 51 |
+
# Repeat for all graph types
|
| 52 |
+
for j in PROPERTY_TYPES:
|
| 53 |
+
print "Calculating %s..." % snap.GetAttributeDesc(j)
|
| 54 |
+
t = snap.GetStats(NNodes, NEdges, j, g)
|
| 55 |
+
f = open('%s/%s_%s.txt' % (results_dir, snap.GetAttributeAbbr(j),
|
| 56 |
+
fname),
|
| 57 |
+
'a')
|
| 58 |
+
f.write("%d %d %.5f\n" % (NNodes, NEdges, t))
|
| 59 |
+
|
| 60 |
+
f_all = open('%s/%s_all.txt' % (results_dir,
|
| 61 |
+
snap.GetAttributeAbbr(j)),
|
| 62 |
+
'a')
|
| 63 |
+
f_all.write("%d %d %.5f\n" % (NNodes, NEdges, t))
|
| 64 |
+
|
| 65 |
+
# For each characteristic:
|
| 66 |
+
# Write out test data to same file (linear fit using matlab?)
|
| 67 |
+
# NNodes NEdges Time
|
| 68 |
+
|
| 69 |
+
print "-"*75
|
| 70 |
+
|
| 71 |
+
# --------------- Plotting ---------------
|
| 72 |
+
import matplotlib
|
| 73 |
+
matplotlib.use('Agg')
|
| 74 |
+
|
| 75 |
+
from pylab import *
|
| 76 |
+
from numpy import sort,array,ones,linalg,column_stack,loadtxt,savetxt
|
| 77 |
+
from scipy import *
|
| 78 |
+
from scipy.optimize import leastsq
|
| 79 |
+
from scipy import linalg
|
| 80 |
+
|
| 81 |
+
def plot_2d(property):
|
| 82 |
+
|
| 83 |
+
# Plot average degree on 2d-graph
|
| 84 |
+
figure()
|
| 85 |
+
for g in GRAPH_TYPES:
|
| 86 |
+
|
| 87 |
+
fname = '%s/%s_%sdeg%d.txt' % (results_dir, snap.GetAttributeAbbr(property),
|
| 88 |
+
snap.GetGraphAbbr(g), AVG_DEG)
|
| 89 |
+
A = loadtxt(fname)
|
| 90 |
+
A = sort(A,0)
|
| 91 |
+
Y = A[:,-1] # Last column
|
| 92 |
+
X = A[:,:-1] # Columns 0-(n-1)
|
| 93 |
+
|
| 94 |
+
loglog(X[:,0], Y, 'o', label=snap.GetGraphDesc(g))
|
| 95 |
+
|
| 96 |
+
legend(loc='lower right')
|
| 97 |
+
xlabel('Num Nodes (d_avg = %.1f)' % AVG_DEG)
|
| 98 |
+
ylabel('time')
|
| 99 |
+
title('%s runtime (avg degree = %d)' % (snap.GetAttributeDesc(property), AVG_DEG))
|
| 100 |
+
pname = '%s/plot2d_%s.png' % (results_dir, snap.GetAttributeAbbr(property))
|
| 101 |
+
print "Saving figure %s" % pname
|
| 102 |
+
savefig(pname)
|
| 103 |
+
|
| 104 |
+
# Plot using 3D-graph
|
| 105 |
+
def plot_3d(property):
|
| 106 |
+
|
| 107 |
+
import mpl_toolkits.mplot3d.axes3d as p3
|
| 108 |
+
fig3d = figure()
|
| 109 |
+
ax = fig3d.add_subplot(111, projection='3d')
|
| 110 |
+
|
| 111 |
+
for g in GRAPH_TYPES:
|
| 112 |
+
fname = '%s/%s_%s.txt' % (results_dir, snap.GetAttributeAbbr(property),
|
| 113 |
+
snap.GetGraphAbbr(g))
|
| 114 |
+
|
| 115 |
+
if not os.path.exists(fname):
|
| 116 |
+
print "No such file: %s" % fname
|
| 117 |
+
return
|
| 118 |
+
|
| 119 |
+
A = loadtxt(fname)
|
| 120 |
+
A = sort(A,0)
|
| 121 |
+
Y = A[:,-1] # Last column
|
| 122 |
+
X = A[:,:-1] # Columns 0-(n-1)
|
| 123 |
+
# savetxt(fname+'_sorted.txt', A)
|
| 124 |
+
|
| 125 |
+
Nodes = X[:,0]
|
| 126 |
+
Edges = X[:,1]
|
| 127 |
+
ax.plot(Nodes,Edges,Y,'o',
|
| 128 |
+
label="%s-%s" % (snap.GetAttributeAbbr(property),
|
| 129 |
+
snap.GetGraphAbbr(g)))
|
| 130 |
+
|
| 131 |
+
ax.set_xlabel('# of nodes', fontsize=9)
|
| 132 |
+
ax.set_ylabel('# of edges', fontsize=9)
|
| 133 |
+
ax.set_zlabel('Run time %s (sec)' % snap.GetAttributeAbbr(property),
|
| 134 |
+
fontsize=9)
|
| 135 |
+
ax.legend()
|
| 136 |
+
|
| 137 |
+
# ax.set_xlim3d([0, 10**max_nodes_exponent])
|
| 138 |
+
# ax.set_ylim3d([0, 10**max_nodes_exponent*AVG_DEGREE_RANGE[1]])
|
| 139 |
+
# ax.set_zlim3d([0, max(Y)])
|
| 140 |
+
# ax.set_xscale('log')
|
| 141 |
+
# ax.w_xaxis.set_scale('log')
|
| 142 |
+
# ax.w_yaxis.set_scale('log')
|
| 143 |
+
# ax.set_zscale('log')
|
| 144 |
+
# ax.auto_scale_xyz([0, max(Nodes)], [0, max(Edges)], [0, max(Y)])
|
| 145 |
+
# ax.title("%s run time" % snap.GetAttributeAbbr(property))
|
| 146 |
+
pname = '%s/plot3d_%s.png' % (results_dir, snap.GetAttributeAbbr(property))
|
| 147 |
+
print "Saving figure %s" % pname
|
| 148 |
+
|
| 149 |
+
fig3d.savefig(pname)
|
| 150 |
+
|
| 151 |
+
# Fitting the data using given model and least squares
|
| 152 |
+
def plot_fit(Xdata, Ydata, labelstr, fit_type):
|
| 153 |
+
|
| 154 |
+
X1 = Xdata[:,0] # Nodes
|
| 155 |
+
X2 = Xdata[:,1] # Edges
|
| 156 |
+
Y = Ydata
|
| 157 |
+
|
| 158 |
+
best_r2 = 0
|
| 159 |
+
|
| 160 |
+
if "poly" in fit_type:
|
| 161 |
+
# Polynomial fit
|
| 162 |
+
fitfunc = lambda p, x1, x2: (p[0] + p[1] * x1 + p[2] * x2 +
|
| 163 |
+
p[3] * x1**2 + p[4] * x2**2)
|
| 164 |
+
pinit = [1.0 for i in range(5)]
|
| 165 |
+
|
| 166 |
+
if "exp" in fit_type:
|
| 167 |
+
# Exponential fit
|
| 168 |
+
Y = log(Y)
|
| 169 |
+
fitfunc = lambda p, x1, x2: (p[0] + p[1] * x1 + p[3] * x2)
|
| 170 |
+
pinit = [1.0 for i in range(5)]
|
| 171 |
+
|
| 172 |
+
if "log" in fit_type:
|
| 173 |
+
# Logarithmic fit
|
| 174 |
+
fitfunc = lambda p, x1, x2: (p[0] + p[1] * log10(x1) + p[2] * log10(x2))
|
| 175 |
+
pinit = [1.0 for i in range(3)]
|
| 176 |
+
|
| 177 |
+
# errfunc = lambda p, x, y, err: (y - fitfunc(p, x)) / err
|
| 178 |
+
errfunc = lambda p, y, x1, x2: (y - fitfunc(p, x1, x2))
|
| 179 |
+
|
| 180 |
+
pfinal,covar,infodict,mesg,ier = \
|
| 181 |
+
leastsq(errfunc, pinit, args=(Y, X1, X2), full_output=1)
|
| 182 |
+
|
| 183 |
+
print "pfinal = ", pfinal
|
| 184 |
+
# print "covar: \n", covar
|
| 185 |
+
# print "infodict['fvec']: ", infodict['fvec']
|
| 186 |
+
|
| 187 |
+
ss_err=(infodict['fvec']**2).sum()
|
| 188 |
+
ss_tot=((Y-Y.mean())**2).sum()
|
| 189 |
+
rsquared=1-(ss_err/ss_tot)
|
| 190 |
+
|
| 191 |
+
labelstr = "%s (r2=%.3f)" % (fit_type, rsquared)
|
| 192 |
+
plot(X1, errfunc(pfinal, Y, X1, X2), '.', label=labelstr)
|
| 193 |
+
|
| 194 |
+
return (rsquared, pfinal)
|
| 195 |
+
|
| 196 |
+
# Calculate and Plot Residual Errors
|
| 197 |
+
def plot_residuals(property):
|
| 198 |
+
|
| 199 |
+
# Calculate residuals for all graph types, and combined
|
| 200 |
+
figure()
|
| 201 |
+
|
| 202 |
+
# All graphs
|
| 203 |
+
fname = '%s/%s_all.txt' % (results_dir, snap.GetAttributeAbbr(property))
|
| 204 |
+
|
| 205 |
+
A = loadtxt(fname)
|
| 206 |
+
A = sort(A,0)
|
| 207 |
+
Y = A[:,-1] # Last column
|
| 208 |
+
X = A[:,:-1] # Columns 0-(n-1)
|
| 209 |
+
# savetxt(fname+'_sorted.txt', A)
|
| 210 |
+
|
| 211 |
+
best_r2 = 0.0
|
| 212 |
+
best_model = None
|
| 213 |
+
best_p = None
|
| 214 |
+
|
| 215 |
+
desc = 'all'
|
| 216 |
+
abbr = 'all'
|
| 217 |
+
|
| 218 |
+
print "Fitting %s for %s" % (snap.GetAttributeDesc(property), desc)
|
| 219 |
+
|
| 220 |
+
fname = '%s/coeff_%s.txt' % (results_dir, snap.GetAttributeAbbr(property))
|
| 221 |
+
f = open(fname, 'w')
|
| 222 |
+
|
| 223 |
+
cname = '%s/coeff_%s.txt' % (combined_dir,
|
| 224 |
+
snap.GetAttributeAbbr(property))
|
| 225 |
+
combined_file = open(cname, 'a+')
|
| 226 |
+
|
| 227 |
+
|
| 228 |
+
for model in ['poly', 'exp', 'log']:
|
| 229 |
+
# Plot residuals with multiple fitting types
|
| 230 |
+
rsquared, pfinal = plot_fit(X, Y, desc, model)
|
| 231 |
+
|
| 232 |
+
f.write("%s, model=%s r2=%.4f pfinal=%s\n" %
|
| 233 |
+
(abbr, model, rsquared, pfinal))
|
| 234 |
+
|
| 235 |
+
if (rsquared > best_r2):
|
| 236 |
+
best_r2 = rsquared
|
| 237 |
+
best_model = model
|
| 238 |
+
best_p = pfinal
|
| 239 |
+
|
| 240 |
+
|
| 241 |
+
title('Residual error for approx. of run-time, %s (%s)' %
|
| 242 |
+
(snap.GetAttributeDesc(property).title(), desc))
|
| 243 |
+
xscale('log')
|
| 244 |
+
yscale('symlog')
|
| 245 |
+
grid(True)
|
| 246 |
+
xlabel('Number of Nodes')
|
| 247 |
+
ylabel('Residual')
|
| 248 |
+
legend(loc='lower right')
|
| 249 |
+
pname = '%s/residuals_%s_%s.png' % (results_dir,
|
| 250 |
+
snap.GetAttributeAbbr(property),
|
| 251 |
+
abbr)
|
| 252 |
+
print "Saving figure %s" % pname
|
| 253 |
+
savefig(pname)
|
| 254 |
+
print "Best model: %s, r2 = %.3f, pfinal: %s" % \
|
| 255 |
+
(best_model, best_r2, repr(best_p))
|
| 256 |
+
|
| 257 |
+
# TODO: Get most recent date of data
|
| 258 |
+
print "Best results to %s" % cname
|
| 259 |
+
combined_file.write(
|
| 260 |
+
'hostname=%s, model=%s, type=%s, n=%d, r2=%.4f, pfinal=%s\n' % \
|
| 261 |
+
(hostname, best_model, abbr, len(X), best_r2,
|
| 262 |
+
["%.4e" % p for p in best_p]))
|
| 263 |
+
|
| 264 |
+
def plot_stats():
|
| 265 |
+
|
| 266 |
+
for type in PROPERTY_TYPES:
|
| 267 |
+
|
| 268 |
+
plot_3d(type)
|
| 269 |
+
|
| 270 |
+
plot_2d(type)
|
| 271 |
+
|
| 272 |
+
plot_residuals(type)
|
| 273 |
+
|
| 274 |
+
#end for loop - graph type
|
| 275 |
+
|
| 276 |
+
#end for loop - plot type
|
| 277 |
+
|
| 278 |
+
def main():
|
| 279 |
+
|
| 280 |
+
global results_dir, verbose, hostname, max_nodes_exponent
|
| 281 |
+
|
| 282 |
+
parser = argparse.ArgumentParser()
|
| 283 |
+
parser.add_argument("-v", "--verbose", default=False,
|
| 284 |
+
action="store_true", dest="verbose",
|
| 285 |
+
help="increase output verbosity")
|
| 286 |
+
parser.add_argument("-m", "--max_nodes_exponent", type=int,
|
| 287 |
+
default=max_nodes_exponent, help="max nodes exponent (4->10^4")
|
| 288 |
+
parser.add_argument("-n", "--num_iterations", type=int,
|
| 289 |
+
default=NUM_ITERATIONS, help="number of iterations")
|
| 290 |
+
parser.add_argument("-i", "--hostname", help="hostname")
|
| 291 |
+
parser.add_argument("-p", "--plot", action="store_true", help="plot stats")
|
| 292 |
+
parser.add_argument("-r", "--run", action="store_true", help="run stats")
|
| 293 |
+
|
| 294 |
+
parser.add_argument("results_dir", help="directory to save/store data")
|
| 295 |
+
args = parser.parse_args()
|
| 296 |
+
|
| 297 |
+
results_dir = args.results_dir
|
| 298 |
+
verbose = args.verbose
|
| 299 |
+
|
| 300 |
+
if not os.path.exists(results_dir):
|
| 301 |
+
os.mkdir(results_dir)
|
| 302 |
+
|
| 303 |
+
if not os.path.exists(combined_dir):
|
| 304 |
+
os.mkdir(combined_dir)
|
| 305 |
+
|
| 306 |
+
if args.max_nodes_exponent:
|
| 307 |
+
max_nodes_exponent = args.max_nodes_exponent
|
| 308 |
+
|
| 309 |
+
if args.hostname:
|
| 310 |
+
hostname = args.hostname
|
| 311 |
+
print "Hostname: %s" % hostname
|
| 312 |
+
print "Results dir: %s" % results_dir
|
| 313 |
+
|
| 314 |
+
if args.run:
|
| 315 |
+
for n in range(args.num_iterations):
|
| 316 |
+
if verbose:
|
| 317 |
+
print "Iteration: %d of %d" % (n+1, args.num_iterations)
|
| 318 |
+
calc_stats()
|
| 319 |
+
|
| 320 |
+
if args.plot:
|
| 321 |
+
if verbose:
|
| 322 |
+
print "Plotting results"
|
| 323 |
+
plot_stats()
|
| 324 |
+
|
| 325 |
+
if __name__ == "__main__":
|
| 326 |
+
main()
|
| 327 |
+
|
| 328 |
+
|
snap-python/source/dev/examples/load.py
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import snap
|
| 2 |
+
|
| 3 |
+
for item in dir(snap):
|
| 4 |
+
if item.find("Load") >= 0:
|
| 5 |
+
print item
|
| 6 |
+
|
| 7 |
+
g = snap.LoadEdgeList_PNGraph(snap.TStr("soc-Epinions1.txt"), 0, 1)
|
| 8 |
+
print dir(g)
|
| 9 |
+
print g.GetNodes()
|
| 10 |
+
print g.GetEdges()
|
| 11 |
+
|
snap-python/source/dev/examples/plot_results.py
ADDED
|
@@ -0,0 +1,194 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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../swig")
|
| 8 |
+
import snap
|
| 9 |
+
from glob import glob
|
| 10 |
+
|
| 11 |
+
NUM_ITERATIONS = 1
|
| 12 |
+
PROPERTY_TYPES = [1, 10] # 1=Triads, 10=BFS
|
| 13 |
+
DEFAULT_TYPES = "rmat,rand_ngraph,rand_neanet,rand_negraph" # Comma separated
|
| 14 |
+
|
| 15 |
+
# Random, Small World, Pref, R-MAT
|
| 16 |
+
# Graph types:
|
| 17 |
+
# 'rand_ungraph' - random undirected
|
| 18 |
+
# 'rand_ngraph' - random directed
|
| 19 |
+
# 'rmat' - R-MAT
|
| 20 |
+
# 'pref' - preferential attachment
|
| 21 |
+
# 'sw' - small world
|
| 22 |
+
|
| 23 |
+
DEGREE_TYPES = [0, 1]
|
| 24 |
+
DEFAULT_RANGE = '5-7' # Exponent (e.g. 10^x to 10^y)
|
| 25 |
+
DEFAULT_NODES_MIN = 10**5
|
| 26 |
+
|
| 27 |
+
VERBOSE = False
|
| 28 |
+
DEFAULT_TIME_MIN = 0.0
|
| 29 |
+
|
| 30 |
+
AVG_DEG = 3
|
| 31 |
+
AVG_DEGREE_RANGE = range(2, 10)
|
| 32 |
+
SW_REWIRE_PROB = 0.1
|
| 33 |
+
|
| 34 |
+
HOSTNAME = gethostname()
|
| 35 |
+
|
| 36 |
+
# Where to build the table.
|
| 37 |
+
PUBLIC_DIR = 'public_html'
|
| 38 |
+
TABLE_FILE = os.path.join(PUBLIC_DIR, 'result_table_%s.html' %
|
| 39 |
+
datetime.now().strftime('%m%d-%H%M'))
|
| 40 |
+
|
| 41 |
+
# Where to read-in/generate the graph.
|
| 42 |
+
|
| 43 |
+
RESULTS_DIR = 'results'
|
| 44 |
+
RESULTS_FILE = os.path.join(RESULTS_DIR, 'results%s.txt' % \
|
| 45 |
+
datetime.now().strftime('%m%d-%H%M'))
|
| 46 |
+
|
| 47 |
+
def parse_file(f, results):
|
| 48 |
+
|
| 49 |
+
import csv
|
| 50 |
+
print "Parsing %s" % f
|
| 51 |
+
|
| 52 |
+
with open(f, 'rb') as csvfile:
|
| 53 |
+
spamreader = csv.reader(csvfile)
|
| 54 |
+
for row in spamreader:
|
| 55 |
+
result = {}
|
| 56 |
+
result["hostname"] = row[0]
|
| 57 |
+
result["model"] = row[1]
|
| 58 |
+
result["type"] = row[2]
|
| 59 |
+
result["num_nodes"] = int(row[3])
|
| 60 |
+
result["num_edges"] = int(row[4])
|
| 61 |
+
result["start_time"] = row[5]
|
| 62 |
+
result["time_generate"] = float(row[6])
|
| 63 |
+
result["time_elapsed"] = float(row[7])
|
| 64 |
+
|
| 65 |
+
results.append(result)
|
| 66 |
+
|
| 67 |
+
def write_stats(results):
|
| 68 |
+
|
| 69 |
+
f = open(TABLE_FILE, 'w')
|
| 70 |
+
|
| 71 |
+
f.write("<html>\n");
|
| 72 |
+
|
| 73 |
+
f.write("<body>\n");
|
| 74 |
+
f.write("<table border=1 id=\"datatab\" summary=\"Dataset statistics\">\n");
|
| 75 |
+
|
| 76 |
+
f.write("<tr>");
|
| 77 |
+
f.write("<th>Hostname</th>\n");
|
| 78 |
+
f.write("<th>Model</th>\n");
|
| 79 |
+
f.write("<th>Type</th>\n");
|
| 80 |
+
f.write("<th>Nodes</th>\n");
|
| 81 |
+
f.write("<th>Edges</th>\n");
|
| 82 |
+
f.write("<th>Start Time</th>\n");
|
| 83 |
+
f.write("<th>Gen Time (sec)</th>\n");
|
| 84 |
+
f.write("<th>Run Time (sec)</th>\n");
|
| 85 |
+
f.write("</tr>\n");
|
| 86 |
+
|
| 87 |
+
for result in results:
|
| 88 |
+
|
| 89 |
+
for model in graph_types:
|
| 90 |
+
|
| 91 |
+
if result['time_elapsed'] > time_min \
|
| 92 |
+
and model in result['model'] and \
|
| 93 |
+
result['num_nodes'] >= DEFAULT_NODES_MIN:
|
| 94 |
+
|
| 95 |
+
f.write("<tr>\n");
|
| 96 |
+
f.write("<td>%s</td>" % result['hostname']);
|
| 97 |
+
f.write("<td>%s</td>" % result['model']);
|
| 98 |
+
f.write("<td>%s</td>" % result['type']);
|
| 99 |
+
f.write("<td>%.3e</td>" % result['num_nodes']);
|
| 100 |
+
f.write("<td>%.3e</td>" % result['num_edges']);
|
| 101 |
+
f.write("<td>%s</td>" % result['start_time']);
|
| 102 |
+
f.write("<td>%.4f</td>" % result['time_generate']);
|
| 103 |
+
f.write("<td>%.4f</td>" % result['time_elapsed']);
|
| 104 |
+
f.write("</tr>\n");
|
| 105 |
+
|
| 106 |
+
f.write("</table>\n");
|
| 107 |
+
|
| 108 |
+
f.write("</body>");
|
| 109 |
+
f.write("</html>");
|
| 110 |
+
if verbose:
|
| 111 |
+
print "Writing to file ", TABLE_FILE
|
| 112 |
+
|
| 113 |
+
f.close();
|
| 114 |
+
|
| 115 |
+
# --------------- Plotting ---------------
|
| 116 |
+
import matplotlib
|
| 117 |
+
matplotlib.use('Agg')
|
| 118 |
+
|
| 119 |
+
from pylab import *
|
| 120 |
+
from numpy import sort,array,ones,linalg,column_stack,loadtxt,savetxt
|
| 121 |
+
|
| 122 |
+
def plot_2d(property):
|
| 123 |
+
|
| 124 |
+
# Plot average degree on 2d-graph
|
| 125 |
+
figure()
|
| 126 |
+
for g in GRAPH_TYPES:
|
| 127 |
+
|
| 128 |
+
fname = '%s/%s_%sdeg%d.txt' % (results_dir, snap.GetAttributeAbbr(property),
|
| 129 |
+
snap.GetGraphAbbr(g), AVG_DEG)
|
| 130 |
+
A = loadtxt(fname)
|
| 131 |
+
A = sort(A,0)
|
| 132 |
+
Y = A[:,-1] # Last column
|
| 133 |
+
X = A[:,:-1] # Columns 0-(n-1)
|
| 134 |
+
|
| 135 |
+
loglog(X[:,0], Y, 'o', label=snap.GetGraphDesc(g))
|
| 136 |
+
|
| 137 |
+
legend(loc='lower right')
|
| 138 |
+
xlabel('Num Nodes (d_avg = %.1f)' % AVG_DEG)
|
| 139 |
+
ylabel('time')
|
| 140 |
+
title('%s runtime (avg degree = %d)' % (snap.GetAttributeDesc(property), AVG_DEG))
|
| 141 |
+
pname = '%s/plot2d_%s.png' % (results_dir, snap.GetAttributeAbbr(property))
|
| 142 |
+
print "Saving figure %s" % pname
|
| 143 |
+
savefig(pname)
|
| 144 |
+
|
| 145 |
+
def main():
|
| 146 |
+
|
| 147 |
+
global results_dir, verbose, time_min, graph_types
|
| 148 |
+
|
| 149 |
+
parser = argparse.ArgumentParser()
|
| 150 |
+
parser.add_argument("-v", "--verbose", default=False,
|
| 151 |
+
action="store_true", dest="verbose",
|
| 152 |
+
help="increase output verbosity")
|
| 153 |
+
|
| 154 |
+
parser.add_argument("-d", "--results_dir", help="results directory",
|
| 155 |
+
default=RESULTS_DIR)
|
| 156 |
+
|
| 157 |
+
parser.add_argument("-m", "--time_min", type=float,
|
| 158 |
+
default=DEFAULT_TIME_MIN,
|
| 159 |
+
help="time minimum threshold")
|
| 160 |
+
|
| 161 |
+
parser.add_argument("-t", "--graph_types", default=DEFAULT_TYPES,
|
| 162 |
+
help='''
|
| 163 |
+
Graph types, comma separated.
|
| 164 |
+
Available: rand_ungraph, rand_ngraph, rand_neanet rmat,
|
| 165 |
+
pref, sw''')
|
| 166 |
+
|
| 167 |
+
args = parser.parse_args()
|
| 168 |
+
|
| 169 |
+
verbose = args.verbose
|
| 170 |
+
graph_types = args.graph_types.split(",")
|
| 171 |
+
|
| 172 |
+
print "Hostname: %s" % HOSTNAME
|
| 173 |
+
|
| 174 |
+
time_min = args.time_min
|
| 175 |
+
|
| 176 |
+
if not os.path.exists(RESULTS_DIR):
|
| 177 |
+
os.makedirs(RESULTS_DIR)
|
| 178 |
+
|
| 179 |
+
if not os.path.exists(PUBLIC_DIR):
|
| 180 |
+
os.makedirs(PUBLIC_DIR)
|
| 181 |
+
|
| 182 |
+
if verbose:
|
| 183 |
+
print "Reading results %s" % args.results_dir
|
| 184 |
+
|
| 185 |
+
results = []
|
| 186 |
+
for f in glob("%s/result*.txt" % args.results_dir):
|
| 187 |
+
print "Parsing %s" % f
|
| 188 |
+
parse_file(f, results)
|
| 189 |
+
|
| 190 |
+
write_stats(results)
|
| 191 |
+
|
| 192 |
+
if __name__ == "__main__":
|
| 193 |
+
main()
|
| 194 |
+
|
snap-python/source/dev/examples/public_html/result_table.html
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<html>
|
| 2 |
+
<body>
|
| 3 |
+
<table border=1 id="datatab" summary="Dataset statistics">
|
| 4 |
+
<tr><th>Hostname</th>
|
| 5 |
+
<th>Model</th>
|
| 6 |
+
<th>Type</th>
|
| 7 |
+
<th>Nodes</th>
|
| 8 |
+
<th>Edges</th>
|
| 9 |
+
<th>Gen Time (sec)</th>
|
| 10 |
+
<th>Run Time (sec)</th>
|
| 11 |
+
</tr>
|
| 12 |
+
<tr>
|
| 13 |
+
<td>madmax.stanford.edu</td><td>rmat</td><td>directed</td><td>1.000e+06</td><td>1.000e+07</td><td>19.1000</td><td>16.9700</td></tr>
|
| 14 |
+
<tr>
|
| 15 |
+
<td>madmax.stanford.edu</td><td>rmat</td><td>directed</td><td>1.000e+06</td><td>1.000e+07</td><td>20.8500</td><td>17.3800</td></tr>
|
| 16 |
+
<tr>
|
| 17 |
+
<td>madmax.stanford.edu</td><td>rmat</td><td>directed</td><td>1.000e+06</td><td>1.000e+07</td><td>18.2400</td><td>15.6800</td></tr>
|
| 18 |
+
<tr>
|
| 19 |
+
<td>madmax.stanford.edu</td><td>rmat</td><td>directed</td><td>1.000e+06</td><td>1.000e+07</td><td>18.8100</td><td>16.1100</td></tr>
|
| 20 |
+
<tr>
|
| 21 |
+
<td>madmax.stanford.edu</td><td>rmat</td><td>directed</td><td>1.000e+06</td><td>1.000e+07</td><td>18.7500</td><td>16.4400</td></tr>
|
| 22 |
+
<tr>
|
| 23 |
+
<td>madmax.stanford.edu</td><td>rmat</td><td>directed</td><td>1.000e+06</td><td>1.000e+07</td><td>21.5600</td><td>18.6400</td></tr>
|
| 24 |
+
<tr>
|
| 25 |
+
<td>madmax.stanford.edu</td><td>rmat</td><td>directed</td><td>1.000e+06</td><td>1.000e+07</td><td>21.5000</td><td>19.1500</td></tr>
|
| 26 |
+
<tr>
|
| 27 |
+
<td>madmax2.stanford.edu</td><td>rmat</td><td>directed</td><td>1.000e+06</td><td>1.000e+07</td><td>18.8500</td><td>19.6100</td></tr>
|
| 28 |
+
<tr>
|
| 29 |
+
<td>madmax.stanford.edu</td><td>rmat</td><td>directed</td><td>1.000e+06</td><td>1.000e+07</td><td>20.4400</td><td>16.7600</td></tr>
|
| 30 |
+
<tr>
|
| 31 |
+
<td>sheridan</td><td>rmat</td><td>directed</td><td>1.000e+06</td><td>1.000e+07</td><td>13.8408</td><td>15.5060</td></tr>
|
| 32 |
+
<tr>
|
| 33 |
+
<td>sheridan</td><td>rmat</td><td>directed</td><td>1.000e+05</td><td>1.000e+06</td><td>1.1328</td><td>1.0108</td></tr>
|
| 34 |
+
<tr>
|
| 35 |
+
<td>sheridan</td><td>rmat</td><td>directed</td><td>1.000e+06</td><td>1.000e+07</td><td>13.7993</td><td>16.2093</td></tr>
|
| 36 |
+
<tr>
|
| 37 |
+
<td>sheridan</td><td>rmat</td><td>directed</td><td>1.000e+06</td><td>1.000e+07</td><td>13.8415</td><td>14.4375</td></tr>
|
| 38 |
+
<tr>
|
| 39 |
+
<td>sheridan</td><td>rmat</td><td>directed</td><td>1.000e+06</td><td>1.000e+07</td><td>14.0142</td><td>14.7885</td></tr>
|
| 40 |
+
<tr>
|
| 41 |
+
<td>sheridan</td><td>rmat</td><td>directed</td><td>1.000e+06</td><td>1.000e+07</td><td>14.1651</td><td>14.9464</td></tr>
|
| 42 |
+
<tr>
|
| 43 |
+
<td>sheridan</td><td>rmat</td><td>directed</td><td>1.000e+06</td><td>1.000e+07</td><td>13.8763</td><td>15.2115</td></tr>
|
| 44 |
+
<tr>
|
| 45 |
+
<td>sheridan</td><td>rmat</td><td>directed</td><td>1.000e+06</td><td>1.000e+07</td><td>13.8888</td><td>14.3995</td></tr>
|
| 46 |
+
<tr>
|
| 47 |
+
<td>sheridan</td><td>rmat</td><td>directed</td><td>1.000e+06</td><td>1.000e+07</td><td>13.7283</td><td>14.3290</td></tr>
|
| 48 |
+
<tr>
|
| 49 |
+
<td>sheridan</td><td>rmat</td><td>directed</td><td>1.000e+06</td><td>1.000e+07</td><td>14.0119</td><td>15.7053</td></tr>
|
| 50 |
+
<tr>
|
| 51 |
+
<td>sheridan</td><td>rmat</td><td>directed</td><td>1.000e+06</td><td>1.000e+07</td><td>14.1115</td><td>15.0208</td></tr>
|
| 52 |
+
<tr>
|
| 53 |
+
<td>sheridan</td><td>rmat</td><td>directed</td><td>1.000e+06</td><td>1.000e+07</td><td>14.2100</td><td>15.1617</td></tr>
|
| 54 |
+
</table>
|
| 55 |
+
</body></html>
|
snap-python/source/dev/examples/public_html/result_table_0320-1403.html
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<html>
|
| 2 |
+
<body>
|
| 3 |
+
<table border=1 id="datatab" summary="Dataset statistics">
|
| 4 |
+
<tr><th>Hostname</th>
|
| 5 |
+
<th>Model</th>
|
| 6 |
+
<th>Type</th>
|
| 7 |
+
<th>Nodes</th>
|
| 8 |
+
<th>Edges</th>
|
| 9 |
+
<th>Gen Time (sec)</th>
|
| 10 |
+
<th>Run Time (sec)</th>
|
| 11 |
+
</tr>
|
| 12 |
+
<tr>
|
| 13 |
+
<td>madmax.stanford.edu</td><td>rmat</td><td>directed</td><td>1.000e+04</td><td>1.000e+06</td><td>2.4132</td><td>1.7536</td></tr>
|
| 14 |
+
<tr>
|
| 15 |
+
<td>madmax.stanford.edu</td><td>rnd_ungraph</td><td>undirected</td><td>1.000e+05</td><td>1.000e+06</td><td>1.1366</td><td>1.0203</td></tr>
|
| 16 |
+
<tr>
|
| 17 |
+
<td>madmax.stanford.edu</td><td>rnd_ungraph</td><td>undirected</td><td>1.000e+05</td><td>1.000e+07</td><td>23.7658</td><td>8.4573</td></tr>
|
| 18 |
+
<tr>
|
| 19 |
+
<td>madmax.stanford.edu</td><td>rnd_ngraph</td><td>directed</td><td>1.000e+05</td><td>1.000e+06</td><td>1.6178</td><td>1.7030</td></tr>
|
| 20 |
+
<tr>
|
| 21 |
+
<td>madmax.stanford.edu</td><td>rnd_ngraph</td><td>directed</td><td>1.000e+05</td><td>1.000e+07</td><td>20.7980</td><td>5.9126</td></tr>
|
| 22 |
+
<tr>
|
| 23 |
+
<td>madmax.stanford.edu</td><td>rmat</td><td>directed</td><td>1.000e+05</td><td>1.000e+06</td><td>2.8777</td><td>2.1940</td></tr>
|
| 24 |
+
<tr>
|
| 25 |
+
<td>madmax.stanford.edu</td><td>rmat</td><td>directed</td><td>1.000e+05</td><td>1.000e+07</td><td>40.0090</td><td>21.3967</td></tr>
|
| 26 |
+
<tr>
|
| 27 |
+
<td>madmax.stanford.edu</td><td>rnd_ungraph</td><td>undirected</td><td>1.000e+06</td><td>1.000e+07</td><td>26.1444</td><td>21.8137</td></tr>
|
| 28 |
+
<tr>
|
| 29 |
+
<td>madmax.stanford.edu</td><td>rnd_ungraph</td><td>undirected</td><td>1.000e+06</td><td>1.000e+08</td><td>383.3239</td><td>157.0932</td></tr>
|
| 30 |
+
<tr>
|
| 31 |
+
<td>madmax.stanford.edu</td><td>rnd_ngraph</td><td>directed</td><td>1.000e+06</td><td>1.000e+07</td><td>24.3111</td><td>47.3226</td></tr>
|
| 32 |
+
<tr>
|
| 33 |
+
<td>madmax.stanford.edu</td><td>rnd_ngraph</td><td>directed</td><td>1.000e+06</td><td>1.000e+08</td><td>385.4147</td><td>101.7317</td></tr>
|
| 34 |
+
<tr>
|
| 35 |
+
<td>madmax.stanford.edu</td><td>rmat</td><td>directed</td><td>1.000e+06</td><td>1.000e+07</td><td>39.7669</td><td>40.8386</td></tr>
|
| 36 |
+
<tr>
|
| 37 |
+
<td>madmax.stanford.edu</td><td>rmat</td><td>directed</td><td>1.000e+06</td><td>1.000e+08</td><td>798.9350</td><td>921.3519</td></tr>
|
| 38 |
+
<tr>
|
| 39 |
+
<td>madmax.stanford.edu</td><td>pref</td><td>undirected</td><td>1.000e+06</td><td>1.000e+07</td><td>1.3549</td><td>4.1890</td></tr>
|
| 40 |
+
<tr>
|
| 41 |
+
<td>madmax.stanford.edu</td><td>pref</td><td>undirected</td><td>1.000e+06</td><td>1.000e+08</td><td>1.3629</td><td>4.7027</td></tr>
|
| 42 |
+
<tr>
|
| 43 |
+
<td>madmax.stanford.edu</td><td>sw</td><td>undirected</td><td>1.000e+06</td><td>1.000e+07</td><td>1.3249</td><td>4.6494</td></tr>
|
| 44 |
+
<tr>
|
| 45 |
+
<td>madmax.stanford.edu</td><td>sw</td><td>undirected</td><td>1.000e+06</td><td>1.000e+08</td><td>1.3194</td><td>4.5435</td></tr>
|
| 46 |
+
</table>
|
| 47 |
+
</body></html>
|
snap-python/source/dev/examples/public_html/result_table_0320-1417.html
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<html>
|
| 2 |
+
<body>
|
| 3 |
+
<table border=1 id="datatab" summary="Dataset statistics">
|
| 4 |
+
<tr><th>Hostname</th>
|
| 5 |
+
<th>Model</th>
|
| 6 |
+
<th>Type</th>
|
| 7 |
+
<th>Nodes</th>
|
| 8 |
+
<th>Edges</th>
|
| 9 |
+
<th>Gen Time (sec)</th>
|
| 10 |
+
<th>Run Time (sec)</th>
|
| 11 |
+
</tr>
|
| 12 |
+
<tr>
|
| 13 |
+
<td>madmax.stanford.edu</td><td>rmat</td><td>directed</td><td>1.000e+04</td><td>1.000e+06</td><td>2.4132</td><td>1.7536</td></tr>
|
| 14 |
+
<tr>
|
| 15 |
+
<td>madmax.stanford.edu</td><td>rnd_ungraph</td><td>undirected</td><td>1.000e+05</td><td>1.000e+06</td><td>1.1366</td><td>1.0203</td></tr>
|
| 16 |
+
<tr>
|
| 17 |
+
<td>madmax.stanford.edu</td><td>rnd_ungraph</td><td>undirected</td><td>1.000e+05</td><td>1.000e+07</td><td>23.7658</td><td>8.4573</td></tr>
|
| 18 |
+
<tr>
|
| 19 |
+
<td>madmax.stanford.edu</td><td>rnd_ngraph</td><td>directed</td><td>1.000e+05</td><td>1.000e+06</td><td>1.6178</td><td>1.7030</td></tr>
|
| 20 |
+
<tr>
|
| 21 |
+
<td>madmax.stanford.edu</td><td>rnd_ngraph</td><td>directed</td><td>1.000e+05</td><td>1.000e+07</td><td>20.7980</td><td>5.9126</td></tr>
|
| 22 |
+
<tr>
|
| 23 |
+
<td>madmax.stanford.edu</td><td>rmat</td><td>directed</td><td>1.000e+05</td><td>1.000e+06</td><td>2.8777</td><td>2.1940</td></tr>
|
| 24 |
+
<tr>
|
| 25 |
+
<td>madmax.stanford.edu</td><td>rmat</td><td>directed</td><td>1.000e+05</td><td>1.000e+07</td><td>40.0090</td><td>21.3967</td></tr>
|
| 26 |
+
<tr>
|
| 27 |
+
<td>madmax.stanford.edu</td><td>rnd_ungraph</td><td>undirected</td><td>1.000e+06</td><td>1.000e+07</td><td>26.1444</td><td>21.8137</td></tr>
|
| 28 |
+
<tr>
|
| 29 |
+
<td>madmax.stanford.edu</td><td>rnd_ungraph</td><td>undirected</td><td>1.000e+06</td><td>1.000e+08</td><td>383.3239</td><td>157.0932</td></tr>
|
| 30 |
+
<tr>
|
| 31 |
+
<td>madmax.stanford.edu</td><td>rnd_ngraph</td><td>directed</td><td>1.000e+06</td><td>1.000e+07</td><td>24.3111</td><td>47.3226</td></tr>
|
| 32 |
+
<tr>
|
| 33 |
+
<td>madmax.stanford.edu</td><td>rnd_ngraph</td><td>directed</td><td>1.000e+06</td><td>1.000e+08</td><td>385.4147</td><td>101.7317</td></tr>
|
| 34 |
+
<tr>
|
| 35 |
+
<td>madmax.stanford.edu</td><td>rmat</td><td>directed</td><td>1.000e+06</td><td>1.000e+07</td><td>39.7669</td><td>40.8386</td></tr>
|
| 36 |
+
<tr>
|
| 37 |
+
<td>madmax.stanford.edu</td><td>rmat</td><td>directed</td><td>1.000e+06</td><td>1.000e+08</td><td>798.9350</td><td>921.3519</td></tr>
|
| 38 |
+
<tr>
|
| 39 |
+
<td>madmax.stanford.edu</td><td>pref</td><td>undirected</td><td>1.000e+06</td><td>1.000e+07</td><td>1.3549</td><td>4.1890</td></tr>
|
| 40 |
+
<tr>
|
| 41 |
+
<td>madmax.stanford.edu</td><td>pref</td><td>undirected</td><td>1.000e+06</td><td>1.000e+08</td><td>1.3629</td><td>4.7027</td></tr>
|
| 42 |
+
<tr>
|
| 43 |
+
<td>madmax.stanford.edu</td><td>sw</td><td>undirected</td><td>1.000e+06</td><td>1.000e+07</td><td>1.3249</td><td>4.6494</td></tr>
|
| 44 |
+
<tr>
|
| 45 |
+
<td>madmax.stanford.edu</td><td>sw</td><td>undirected</td><td>1.000e+06</td><td>1.000e+08</td><td>1.3194</td><td>4.5435</td></tr>
|
| 46 |
+
</table>
|
| 47 |
+
</body></html>
|
snap-python/source/dev/examples/public_html/result_table_0320-1420.html
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<html>
|
| 2 |
+
<body>
|
| 3 |
+
<table border=1 id="datatab" summary="Dataset statistics">
|
| 4 |
+
<tr><th>Hostname</th>
|
| 5 |
+
<th>Model</th>
|
| 6 |
+
<th>Type</th>
|
| 7 |
+
<th>Nodes</th>
|
| 8 |
+
<th>Edges</th>
|
| 9 |
+
<th>Gen Time (sec)</th>
|
| 10 |
+
<th>Run Time (sec)</th>
|
| 11 |
+
</tr>
|
| 12 |
+
<tr>
|
| 13 |
+
<td>sheridan</td><td>rnd_ungraph</td><td>undirected</td><td>1.000e+05</td><td>1.000e+07</td><td>9.4968</td><td>3.3481</td></tr>
|
| 14 |
+
<tr>
|
| 15 |
+
<td>sheridan</td><td>rnd_ngraph</td><td>directed</td><td>1.000e+05</td><td>1.000e+07</td><td>7.0061</td><td>2.0728</td></tr>
|
| 16 |
+
</table>
|
| 17 |
+
</body></html>
|
snap-python/source/dev/examples/public_html/result_table_0320-1421.html
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<html>
|
| 2 |
+
<body>
|
| 3 |
+
<table border=1 id="datatab" summary="Dataset statistics">
|
| 4 |
+
<tr><th>Hostname</th>
|
| 5 |
+
<th>Model</th>
|
| 6 |
+
<th>Type</th>
|
| 7 |
+
<th>Nodes</th>
|
| 8 |
+
<th>Edges</th>
|
| 9 |
+
<th>Gen Time (sec)</th>
|
| 10 |
+
<th>Run Time (sec)</th>
|
| 11 |
+
</tr>
|
| 12 |
+
<tr>
|
| 13 |
+
<td>sheridan</td><td>rnd_ungraph</td><td>undirected</td><td>1.000e+05</td><td>1.000e+07</td><td>9.4968</td><td>3.3481</td></tr>
|
| 14 |
+
<tr>
|
| 15 |
+
<td>sheridan</td><td>rnd_ngraph</td><td>directed</td><td>1.000e+05</td><td>1.000e+07</td><td>7.0061</td><td>2.0728</td></tr>
|
| 16 |
+
<tr>
|
| 17 |
+
<td>sheridan</td><td>rmat</td><td>directed</td><td>1.000e+05</td><td>1.000e+07</td><td>16.3892</td><td>12.9903</td></tr>
|
| 18 |
+
</table>
|
| 19 |
+
</body></html>
|
snap-python/source/dev/examples/public_html/result_table_0320-1423.html
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<html>
|
| 2 |
+
<body>
|
| 3 |
+
<table border=1 id="datatab" summary="Dataset statistics">
|
| 4 |
+
<tr><th>Hostname</th>
|
| 5 |
+
<th>Model</th>
|
| 6 |
+
<th>Type</th>
|
| 7 |
+
<th>Nodes</th>
|
| 8 |
+
<th>Edges</th>
|
| 9 |
+
<th>Gen Time (sec)</th>
|
| 10 |
+
<th>Run Time (sec)</th>
|
| 11 |
+
</tr>
|
| 12 |
+
<tr>
|
| 13 |
+
<td>sheridan</td><td>rnd_ungraph</td><td>undirected</td><td>1.000e+05</td><td>1.000e+07</td><td>9.4968</td><td>3.3481</td></tr>
|
| 14 |
+
<tr>
|
| 15 |
+
<td>sheridan</td><td>rnd_ngraph</td><td>directed</td><td>1.000e+05</td><td>1.000e+07</td><td>7.0061</td><td>2.0728</td></tr>
|
| 16 |
+
<tr>
|
| 17 |
+
<td>sheridan</td><td>rmat</td><td>directed</td><td>1.000e+05</td><td>1.000e+07</td><td>16.3892</td><td>12.9903</td></tr>
|
| 18 |
+
</table>
|
| 19 |
+
</body></html>
|
snap-python/source/dev/examples/public_html/result_table_0321-2331.html
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<html>
|
| 2 |
+
<body>
|
| 3 |
+
<table border=1 id="datatab" summary="Dataset statistics">
|
| 4 |
+
<tr><th>Hostname</th>
|
| 5 |
+
<th>Model</th>
|
| 6 |
+
<th>Type</th>
|
| 7 |
+
<th>Nodes</th>
|
| 8 |
+
<th>Edges</th>
|
| 9 |
+
<th>Gen Time (sec)</th>
|
| 10 |
+
<th>Run Time (sec)</th>
|
| 11 |
+
</tr>
|
| 12 |
+
</table>
|
| 13 |
+
</body></html>
|
snap-python/source/dev/examples/public_html/result_table_0321-2332.html
ADDED
|
@@ -0,0 +1,61 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<html>
|
| 2 |
+
<body>
|
| 3 |
+
<table border=1 id="datatab" summary="Dataset statistics">
|
| 4 |
+
<tr><th>Hostname</th>
|
| 5 |
+
<th>Model</th>
|
| 6 |
+
<th>Type</th>
|
| 7 |
+
<th>Nodes</th>
|
| 8 |
+
<th>Edges</th>
|
| 9 |
+
<th>Gen Time (sec)</th>
|
| 10 |
+
<th>Run Time (sec)</th>
|
| 11 |
+
</tr>
|
| 12 |
+
<tr>
|
| 13 |
+
<td>madmax.stanford.edu</td><td>rmat</td><td>directed</td><td>1.000e+04</td><td>1.000e+06</td><td>2.4132</td><td>1.7536</td></tr>
|
| 14 |
+
<tr>
|
| 15 |
+
<td>madmax.stanford.edu</td><td>rmat</td><td>directed</td><td>1.000e+05</td><td>1.000e+06</td><td>2.8777</td><td>2.1940</td></tr>
|
| 16 |
+
<tr>
|
| 17 |
+
<td>madmax.stanford.edu</td><td>rmat</td><td>directed</td><td>1.000e+05</td><td>1.000e+07</td><td>40.0090</td><td>21.3967</td></tr>
|
| 18 |
+
<tr>
|
| 19 |
+
<td>madmax.stanford.edu</td><td>rmat</td><td>directed</td><td>1.000e+06</td><td>1.000e+07</td><td>39.7669</td><td>40.8386</td></tr>
|
| 20 |
+
<tr>
|
| 21 |
+
<td>madmax.stanford.edu</td><td>rmat</td><td>directed</td><td>1.000e+06</td><td>1.000e+08</td><td>798.9350</td><td>921.3519</td></tr>
|
| 22 |
+
<tr>
|
| 23 |
+
<td>sheridan</td><td>rmat</td><td>directed</td><td>1.000e+05</td><td>1.000e+07</td><td>16.3892</td><td>12.9903</td></tr>
|
| 24 |
+
<tr>
|
| 25 |
+
<td>sheridan</td><td>rmat</td><td>directed</td><td>1.000e+05</td><td>1.000e+07</td><td>15.7994</td><td>13.0970</td></tr>
|
| 26 |
+
<tr>
|
| 27 |
+
<td>sheridan</td><td>rmat</td><td>directed</td><td>1.000e+05</td><td>1.000e+07</td><td>15.9588</td><td>13.8366</td></tr>
|
| 28 |
+
<tr>
|
| 29 |
+
<td>sheridan</td><td>rmat</td><td>directed</td><td>1.000e+05</td><td>1.000e+07</td><td>15.6456</td><td>14.1982</td></tr>
|
| 30 |
+
<tr>
|
| 31 |
+
<td>sheridan</td><td>rmat</td><td>directed</td><td>1.000e+05</td><td>1.000e+07</td><td>16.0872</td><td>13.3833</td></tr>
|
| 32 |
+
<tr>
|
| 33 |
+
<td>sheridan</td><td>rmat</td><td>directed</td><td>1.000e+05</td><td>1.000e+07</td><td>15.8590</td><td>12.8888</td></tr>
|
| 34 |
+
<tr>
|
| 35 |
+
<td>madmax.stanford.edu</td><td>rmat</td><td>directed</td><td>1.000e+04</td><td>1.000e+06</td><td>3.7098</td><td>2.2293</td></tr>
|
| 36 |
+
<tr>
|
| 37 |
+
<td>madmax.stanford.edu</td><td>rmat</td><td>directed</td><td>1.000e+05</td><td>1.000e+06</td><td>3.6605</td><td>2.5440</td></tr>
|
| 38 |
+
<tr>
|
| 39 |
+
<td>madmax.stanford.edu</td><td>rmat</td><td>directed</td><td>1.000e+05</td><td>1.000e+07</td><td>61.0159</td><td>77.0117</td></tr>
|
| 40 |
+
<tr>
|
| 41 |
+
<td>madmax.stanford.edu</td><td>rmat</td><td>directed</td><td>1.000e+05</td><td>1.000e+06</td><td>3.6629</td><td>2.8650</td></tr>
|
| 42 |
+
<tr>
|
| 43 |
+
<td>madmax.stanford.edu</td><td>rmat</td><td>directed</td><td>1.000e+04</td><td>1.000e+06</td><td>3.3448</td><td>2.0680</td></tr>
|
| 44 |
+
<tr>
|
| 45 |
+
<td>madmax.stanford.edu</td><td>rmat</td><td>directed</td><td>1.000e+05</td><td>1.000e+06</td><td>4.1631</td><td>3.0476</td></tr>
|
| 46 |
+
<tr>
|
| 47 |
+
<td>madmax.stanford.edu</td><td>rmat</td><td>directed</td><td>1.000e+05</td><td>1.000e+07</td><td>69.7596</td><td>54.4046</td></tr>
|
| 48 |
+
<tr>
|
| 49 |
+
<td>madmax.stanford.edu</td><td>rmat</td><td>directed</td><td>1.000e+06</td><td>1.000e+07</td><td>60.9612</td><td>59.8299</td></tr>
|
| 50 |
+
<tr>
|
| 51 |
+
<td>madmax.stanford.edu</td><td>rmat</td><td>directed</td><td>1.000e+04</td><td>1.000e+06</td><td>3.8324</td><td>2.3204</td></tr>
|
| 52 |
+
<tr>
|
| 53 |
+
<td>madmax.stanford.edu</td><td>rmat</td><td>directed</td><td>1.000e+05</td><td>1.000e+06</td><td>4.3456</td><td>3.2776</td></tr>
|
| 54 |
+
<tr>
|
| 55 |
+
<td>madmax.stanford.edu</td><td>rmat</td><td>directed</td><td>1.000e+05</td><td>1.000e+07</td><td>72.9842</td><td>61.6619</td></tr>
|
| 56 |
+
<tr>
|
| 57 |
+
<td>madmax.stanford.edu</td><td>rmat</td><td>directed</td><td>1.000e+06</td><td>1.000e+07</td><td>74.7449</td><td>68.7944</td></tr>
|
| 58 |
+
<tr>
|
| 59 |
+
<td>madmax.stanford.edu</td><td>rmat</td><td>directed</td><td>1.000e+06</td><td>1.000e+08</td><td>1031.9497</td><td>928.5699</td></tr>
|
| 60 |
+
</table>
|
| 61 |
+
</body></html>
|
snap-python/source/dev/examples/public_html/result_table_0321-2339.html
ADDED
|
@@ -0,0 +1,61 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<html>
|
| 2 |
+
<body>
|
| 3 |
+
<table border=1 id="datatab" summary="Dataset statistics">
|
| 4 |
+
<tr><th>Hostname</th>
|
| 5 |
+
<th>Model</th>
|
| 6 |
+
<th>Type</th>
|
| 7 |
+
<th>Nodes</th>
|
| 8 |
+
<th>Edges</th>
|
| 9 |
+
<th>Gen Time (sec)</th>
|
| 10 |
+
<th>Run Time (sec)</th>
|
| 11 |
+
</tr>
|
| 12 |
+
<tr>
|
| 13 |
+
<td>madmax.stanford.edu</td><td>rmat</td><td>directed</td><td>1.000e+04</td><td>1.000e+06</td><td>2.4132</td><td>1.7536</td></tr>
|
| 14 |
+
<tr>
|
| 15 |
+
<td>madmax.stanford.edu</td><td>rmat</td><td>directed</td><td>1.000e+05</td><td>1.000e+06</td><td>2.8777</td><td>2.1940</td></tr>
|
| 16 |
+
<tr>
|
| 17 |
+
<td>madmax.stanford.edu</td><td>rmat</td><td>directed</td><td>1.000e+05</td><td>1.000e+07</td><td>40.0090</td><td>21.3967</td></tr>
|
| 18 |
+
<tr>
|
| 19 |
+
<td>madmax.stanford.edu</td><td>rmat</td><td>directed</td><td>1.000e+06</td><td>1.000e+07</td><td>39.7669</td><td>40.8386</td></tr>
|
| 20 |
+
<tr>
|
| 21 |
+
<td>madmax.stanford.edu</td><td>rmat</td><td>directed</td><td>1.000e+06</td><td>1.000e+08</td><td>798.9350</td><td>921.3519</td></tr>
|
| 22 |
+
<tr>
|
| 23 |
+
<td>sheridan</td><td>rmat</td><td>directed</td><td>1.000e+05</td><td>1.000e+07</td><td>16.3892</td><td>12.9903</td></tr>
|
| 24 |
+
<tr>
|
| 25 |
+
<td>sheridan</td><td>rmat</td><td>directed</td><td>1.000e+05</td><td>1.000e+07</td><td>15.7994</td><td>13.0970</td></tr>
|
| 26 |
+
<tr>
|
| 27 |
+
<td>sheridan</td><td>rmat</td><td>directed</td><td>1.000e+05</td><td>1.000e+07</td><td>15.9588</td><td>13.8366</td></tr>
|
| 28 |
+
<tr>
|
| 29 |
+
<td>sheridan</td><td>rmat</td><td>directed</td><td>1.000e+05</td><td>1.000e+07</td><td>15.6456</td><td>14.1982</td></tr>
|
| 30 |
+
<tr>
|
| 31 |
+
<td>sheridan</td><td>rmat</td><td>directed</td><td>1.000e+05</td><td>1.000e+07</td><td>16.0872</td><td>13.3833</td></tr>
|
| 32 |
+
<tr>
|
| 33 |
+
<td>sheridan</td><td>rmat</td><td>directed</td><td>1.000e+05</td><td>1.000e+07</td><td>15.8590</td><td>12.8888</td></tr>
|
| 34 |
+
<tr>
|
| 35 |
+
<td>madmax.stanford.edu</td><td>rmat</td><td>directed</td><td>1.000e+04</td><td>1.000e+06</td><td>3.7098</td><td>2.2293</td></tr>
|
| 36 |
+
<tr>
|
| 37 |
+
<td>madmax.stanford.edu</td><td>rmat</td><td>directed</td><td>1.000e+05</td><td>1.000e+06</td><td>3.6605</td><td>2.5440</td></tr>
|
| 38 |
+
<tr>
|
| 39 |
+
<td>madmax.stanford.edu</td><td>rmat</td><td>directed</td><td>1.000e+05</td><td>1.000e+07</td><td>61.0159</td><td>77.0117</td></tr>
|
| 40 |
+
<tr>
|
| 41 |
+
<td>madmax.stanford.edu</td><td>rmat</td><td>directed</td><td>1.000e+05</td><td>1.000e+06</td><td>3.6629</td><td>2.8650</td></tr>
|
| 42 |
+
<tr>
|
| 43 |
+
<td>madmax.stanford.edu</td><td>rmat</td><td>directed</td><td>1.000e+04</td><td>1.000e+06</td><td>3.3448</td><td>2.0680</td></tr>
|
| 44 |
+
<tr>
|
| 45 |
+
<td>madmax.stanford.edu</td><td>rmat</td><td>directed</td><td>1.000e+05</td><td>1.000e+06</td><td>4.1631</td><td>3.0476</td></tr>
|
| 46 |
+
<tr>
|
| 47 |
+
<td>madmax.stanford.edu</td><td>rmat</td><td>directed</td><td>1.000e+05</td><td>1.000e+07</td><td>69.7596</td><td>54.4046</td></tr>
|
| 48 |
+
<tr>
|
| 49 |
+
<td>madmax.stanford.edu</td><td>rmat</td><td>directed</td><td>1.000e+06</td><td>1.000e+07</td><td>60.9612</td><td>59.8299</td></tr>
|
| 50 |
+
<tr>
|
| 51 |
+
<td>madmax.stanford.edu</td><td>rmat</td><td>directed</td><td>1.000e+04</td><td>1.000e+06</td><td>3.8324</td><td>2.3204</td></tr>
|
| 52 |
+
<tr>
|
| 53 |
+
<td>madmax.stanford.edu</td><td>rmat</td><td>directed</td><td>1.000e+05</td><td>1.000e+06</td><td>4.3456</td><td>3.2776</td></tr>
|
| 54 |
+
<tr>
|
| 55 |
+
<td>madmax.stanford.edu</td><td>rmat</td><td>directed</td><td>1.000e+05</td><td>1.000e+07</td><td>72.9842</td><td>61.6619</td></tr>
|
| 56 |
+
<tr>
|
| 57 |
+
<td>madmax.stanford.edu</td><td>rmat</td><td>directed</td><td>1.000e+06</td><td>1.000e+07</td><td>74.7449</td><td>68.7944</td></tr>
|
| 58 |
+
<tr>
|
| 59 |
+
<td>madmax.stanford.edu</td><td>rmat</td><td>directed</td><td>1.000e+06</td><td>1.000e+08</td><td>1031.9497</td><td>928.5699</td></tr>
|
| 60 |
+
</table>
|
| 61 |
+
</body></html>
|
snap-python/source/dev/examples/public_html/result_table_0321-2340.html
ADDED
|
@@ -0,0 +1,61 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<html>
|
| 2 |
+
<body>
|
| 3 |
+
<table border=1 id="datatab" summary="Dataset statistics">
|
| 4 |
+
<tr><th>Hostname</th>
|
| 5 |
+
<th>Model</th>
|
| 6 |
+
<th>Type</th>
|
| 7 |
+
<th>Nodes</th>
|
| 8 |
+
<th>Edges</th>
|
| 9 |
+
<th>Gen Time (sec)</th>
|
| 10 |
+
<th>Run Time (sec)</th>
|
| 11 |
+
</tr>
|
| 12 |
+
<tr>
|
| 13 |
+
<td>madmax.stanford.edu</td><td>rmat</td><td>directed</td><td>1.000e+04</td><td>1.000e+06</td><td>2.4132</td><td>1.7536</td></tr>
|
| 14 |
+
<tr>
|
| 15 |
+
<td>madmax.stanford.edu</td><td>rmat</td><td>directed</td><td>1.000e+05</td><td>1.000e+06</td><td>2.8777</td><td>2.1940</td></tr>
|
| 16 |
+
<tr>
|
| 17 |
+
<td>madmax.stanford.edu</td><td>rmat</td><td>directed</td><td>1.000e+05</td><td>1.000e+07</td><td>40.0090</td><td>21.3967</td></tr>
|
| 18 |
+
<tr>
|
| 19 |
+
<td>madmax.stanford.edu</td><td>rmat</td><td>directed</td><td>1.000e+06</td><td>1.000e+07</td><td>39.7669</td><td>40.8386</td></tr>
|
| 20 |
+
<tr>
|
| 21 |
+
<td>madmax.stanford.edu</td><td>rmat</td><td>directed</td><td>1.000e+06</td><td>1.000e+08</td><td>798.9350</td><td>921.3519</td></tr>
|
| 22 |
+
<tr>
|
| 23 |
+
<td>madmax.stanford.edu</td><td>rmat</td><td>directed</td><td>1.000e+04</td><td>1.000e+06</td><td>3.7098</td><td>2.2293</td></tr>
|
| 24 |
+
<tr>
|
| 25 |
+
<td>madmax.stanford.edu</td><td>rmat</td><td>directed</td><td>1.000e+05</td><td>1.000e+06</td><td>3.6605</td><td>2.5440</td></tr>
|
| 26 |
+
<tr>
|
| 27 |
+
<td>madmax.stanford.edu</td><td>rmat</td><td>directed</td><td>1.000e+05</td><td>1.000e+07</td><td>61.0159</td><td>77.0117</td></tr>
|
| 28 |
+
<tr>
|
| 29 |
+
<td>madmax.stanford.edu</td><td>rmat</td><td>directed</td><td>1.000e+05</td><td>1.000e+06</td><td>3.6629</td><td>2.8650</td></tr>
|
| 30 |
+
<tr>
|
| 31 |
+
<td>madmax.stanford.edu</td><td>rmat</td><td>directed</td><td>1.000e+04</td><td>1.000e+06</td><td>3.3448</td><td>2.0680</td></tr>
|
| 32 |
+
<tr>
|
| 33 |
+
<td>madmax.stanford.edu</td><td>rmat</td><td>directed</td><td>1.000e+05</td><td>1.000e+06</td><td>4.1631</td><td>3.0476</td></tr>
|
| 34 |
+
<tr>
|
| 35 |
+
<td>madmax.stanford.edu</td><td>rmat</td><td>directed</td><td>1.000e+05</td><td>1.000e+07</td><td>69.7596</td><td>54.4046</td></tr>
|
| 36 |
+
<tr>
|
| 37 |
+
<td>madmax.stanford.edu</td><td>rmat</td><td>directed</td><td>1.000e+06</td><td>1.000e+07</td><td>60.9612</td><td>59.8299</td></tr>
|
| 38 |
+
<tr>
|
| 39 |
+
<td>madmax.stanford.edu</td><td>rmat</td><td>directed</td><td>1.000e+04</td><td>1.000e+06</td><td>3.8324</td><td>2.3204</td></tr>
|
| 40 |
+
<tr>
|
| 41 |
+
<td>madmax.stanford.edu</td><td>rmat</td><td>directed</td><td>1.000e+05</td><td>1.000e+06</td><td>4.3456</td><td>3.2776</td></tr>
|
| 42 |
+
<tr>
|
| 43 |
+
<td>madmax.stanford.edu</td><td>rmat</td><td>directed</td><td>1.000e+05</td><td>1.000e+07</td><td>72.9842</td><td>61.6619</td></tr>
|
| 44 |
+
<tr>
|
| 45 |
+
<td>madmax.stanford.edu</td><td>rmat</td><td>directed</td><td>1.000e+06</td><td>1.000e+07</td><td>74.7449</td><td>68.7944</td></tr>
|
| 46 |
+
<tr>
|
| 47 |
+
<td>madmax.stanford.edu</td><td>rmat</td><td>directed</td><td>1.000e+06</td><td>1.000e+08</td><td>1031.9497</td><td>928.5699</td></tr>
|
| 48 |
+
<tr>
|
| 49 |
+
<td>sheridan</td><td>rmat</td><td>directed</td><td>1.000e+05</td><td>1.000e+07</td><td>16.3892</td><td>12.9903</td></tr>
|
| 50 |
+
<tr>
|
| 51 |
+
<td>sheridan</td><td>rmat</td><td>directed</td><td>1.000e+05</td><td>1.000e+07</td><td>15.7994</td><td>13.0970</td></tr>
|
| 52 |
+
<tr>
|
| 53 |
+
<td>sheridan</td><td>rmat</td><td>directed</td><td>1.000e+05</td><td>1.000e+07</td><td>15.9588</td><td>13.8366</td></tr>
|
| 54 |
+
<tr>
|
| 55 |
+
<td>sheridan</td><td>rmat</td><td>directed</td><td>1.000e+05</td><td>1.000e+07</td><td>15.6456</td><td>14.1982</td></tr>
|
| 56 |
+
<tr>
|
| 57 |
+
<td>sheridan</td><td>rmat</td><td>directed</td><td>1.000e+05</td><td>1.000e+07</td><td>16.0872</td><td>13.3833</td></tr>
|
| 58 |
+
<tr>
|
| 59 |
+
<td>sheridan</td><td>rmat</td><td>directed</td><td>1.000e+05</td><td>1.000e+07</td><td>15.8590</td><td>12.8888</td></tr>
|
| 60 |
+
</table>
|
| 61 |
+
</body></html>
|
snap-python/source/dev/examples/public_html/results_0320-1303.html
ADDED
|
@@ -0,0 +1,215 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
+
<tr><th>Model</th>
|
| 5 |
+
<th>Type</th>
|
| 6 |
+
<th>Nodes</th>
|
| 7 |
+
<th>Edges</th>
|
| 8 |
+
<th>Gen Time (sec)</th>
|
| 9 |
+
<th>Run Time (sec)</th>
|
| 10 |
+
<th>Hostname</th>
|
| 11 |
+
</tr>
|
| 12 |
+
<tr>
|
| 13 |
+
<td>sw</td><td>undirected</td><td>1.000e+04</td><td>1.000e+06</td><td>0.0019</td><td>0.0133</td></tr>
|
| 14 |
+
<tr>
|
| 15 |
+
<td>rnd_ungraph</td><td>undirected</td><td>1.000e+03</td><td>1.000e+04</td><td>0.0047</td><td>0.0033</td></tr>
|
| 16 |
+
<tr>
|
| 17 |
+
<td>rnd_ungraph</td><td>undirected</td><td>1.000e+03</td><td>1.000e+05</td><td>0.0613</td><td>0.0270</td></tr>
|
| 18 |
+
<tr>
|
| 19 |
+
<td>rnd_ngraph</td><td>directed</td><td>1.000e+03</td><td>1.000e+04</td><td>0.0031</td><td>0.0024</td></tr>
|
| 20 |
+
<tr>
|
| 21 |
+
<td>rnd_ngraph</td><td>directed</td><td>1.000e+03</td><td>1.000e+05</td><td>0.0375</td><td>0.0181</td></tr>
|
| 22 |
+
<tr>
|
| 23 |
+
<td>rmat</td><td>directed</td><td>1.000e+03</td><td>1.000e+04</td><td>0.0068</td><td>0.0049</td></tr>
|
| 24 |
+
<tr>
|
| 25 |
+
<td>rmat</td><td>directed</td><td>1.000e+03</td><td>1.000e+05</td><td>0.0871</td><td>0.0154</td></tr>
|
| 26 |
+
<tr>
|
| 27 |
+
<td>pref</td><td>undirected</td><td>1.000e+03</td><td>1.000e+04</td><td>0.0004</td><td>0.0013</td></tr>
|
| 28 |
+
<tr>
|
| 29 |
+
<td>pref</td><td>undirected</td><td>1.000e+03</td><td>1.000e+05</td><td>0.0002</td><td>0.0013</td></tr>
|
| 30 |
+
<tr>
|
| 31 |
+
<td>sw</td><td>undirected</td><td>1.000e+03</td><td>1.000e+04</td><td>0.0003</td><td>0.0013</td></tr>
|
| 32 |
+
<tr>
|
| 33 |
+
<td>sw</td><td>undirected</td><td>1.000e+03</td><td>1.000e+05</td><td>0.0003</td><td>0.0013</td></tr>
|
| 34 |
+
<tr>
|
| 35 |
+
<td>rnd_ungraph</td><td>undirected</td><td>1.000e+04</td><td>1.000e+05</td><td>0.0527</td><td>0.0443</td></tr>
|
| 36 |
+
<tr>
|
| 37 |
+
<td>rnd_ungraph</td><td>undirected</td><td>1.000e+04</td><td>1.000e+06</td><td>0.7715</td><td>0.2963</td></tr>
|
| 38 |
+
<tr>
|
| 39 |
+
<td>rnd_ngraph</td><td>directed</td><td>1.000e+04</td><td>1.000e+05</td><td>0.0328</td><td>0.0549</td></tr>
|
| 40 |
+
<tr>
|
| 41 |
+
<td>rnd_ngraph</td><td>directed</td><td>1.000e+04</td><td>1.000e+06</td><td>0.4893</td><td>0.1846</td></tr>
|
| 42 |
+
<tr>
|
| 43 |
+
<td>rmat</td><td>directed</td><td>1.000e+04</td><td>1.000e+05</td><td>0.0777</td><td>0.0541</td></tr>
|
| 44 |
+
<tr>
|
| 45 |
+
<td>rmat</td><td>directed</td><td>1.000e+04</td><td>1.000e+06</td><td>1.0613</td><td>0.7422</td></tr>
|
| 46 |
+
<tr>
|
| 47 |
+
<td>pref</td><td>undirected</td><td>1.000e+04</td><td>1.000e+05</td><td>0.0023</td><td>0.0220</td></tr>
|
| 48 |
+
<tr>
|
| 49 |
+
<td>pref</td><td>undirected</td><td>1.000e+04</td><td>1.000e+06</td><td>0.0017</td><td>0.0166</td></tr>
|
| 50 |
+
<tr>
|
| 51 |
+
<td>sw</td><td>undirected</td><td>1.000e+04</td><td>1.000e+05</td><td>0.0027</td><td>0.0160</td></tr>
|
| 52 |
+
<tr>
|
| 53 |
+
<td>sw</td><td>undirected</td><td>1.000e+04</td><td>1.000e+06</td><td>0.0018</td><td>0.0137</td></tr>
|
| 54 |
+
<tr>
|
| 55 |
+
<td>rnd_ungraph</td><td>undirected</td><td>1.000e+04</td><td>1.000e+05</td><td>0.0474</td><td>0.0373</td></tr>
|
| 56 |
+
<tr>
|
| 57 |
+
<td>rnd_ungraph</td><td>undirected</td><td>1.000e+04</td><td>1.000e+06</td><td>0.7119</td><td>0.3017</td></tr>
|
| 58 |
+
<tr>
|
| 59 |
+
<td>rnd_ngraph</td><td>directed</td><td>1.000e+04</td><td>1.000e+05</td><td>0.0367</td><td>0.0277</td></tr>
|
| 60 |
+
<tr>
|
| 61 |
+
<td>rnd_ngraph</td><td>directed</td><td>1.000e+04</td><td>1.000e+06</td><td>0.4688</td><td>0.1889</td></tr>
|
| 62 |
+
<tr>
|
| 63 |
+
<td>rmat</td><td>directed</td><td>1.000e+04</td><td>1.000e+05</td><td>0.0782</td><td>0.0579</td></tr>
|
| 64 |
+
<tr>
|
| 65 |
+
<td>rmat</td><td>directed</td><td>1.000e+04</td><td>1.000e+06</td><td>1.1570</td><td>0.7897</td></tr>
|
| 66 |
+
<tr>
|
| 67 |
+
<td>pref</td><td>undirected</td><td>1.000e+04</td><td>1.000e+05</td><td>0.0022</td><td>0.0140</td></tr>
|
| 68 |
+
<tr>
|
| 69 |
+
<td>pref</td><td>undirected</td><td>1.000e+04</td><td>1.000e+06</td><td>0.0016</td><td>0.0132</td></tr>
|
| 70 |
+
<tr>
|
| 71 |
+
<td>sw</td><td>undirected</td><td>1.000e+04</td><td>1.000e+05</td><td>0.0020</td><td>0.0132</td></tr>
|
| 72 |
+
<tr>
|
| 73 |
+
<td>sw</td><td>undirected</td><td>1.000e+04</td><td>1.000e+06</td><td>0.0019</td><td>0.0131</td></tr>
|
| 74 |
+
<tr>
|
| 75 |
+
<td>rnd_ungraph</td><td>undirected</td><td>1.000e+05</td><td>1.000e+06</td><td>0.6291</td><td>0.4348</td></tr>
|
| 76 |
+
<tr>
|
| 77 |
+
<td>rnd_ungraph</td><td>undirected</td><td>1.000e+05</td><td>1.000e+07</td><td>9.5032</td><td>3.4722</td></tr>
|
| 78 |
+
<tr>
|
| 79 |
+
<td>rnd_ngraph</td><td>directed</td><td>1.000e+05</td><td>1.000e+06</td><td>0.5852</td><td>0.8645</td></tr>
|
| 80 |
+
<tr>
|
| 81 |
+
<td>rnd_ngraph</td><td>directed</td><td>1.000e+05</td><td>1.000e+07</td><td>7.1251</td><td>2.0593</td></tr>
|
| 82 |
+
<tr>
|
| 83 |
+
<td>rmat</td><td>directed</td><td>1.000e+05</td><td>1.000e+06</td><td>1.0443</td><td>0.8116</td></tr>
|
| 84 |
+
<tr>
|
| 85 |
+
<td>rmat</td><td>directed</td><td>1.000e+05</td><td>1.000e+07</td><td>16.0948</td><td>13.2966</td></tr>
|
| 86 |
+
<tr>
|
| 87 |
+
<td>pref</td><td>undirected</td><td>1.000e+05</td><td>1.000e+06</td><td>0.0167</td><td>0.1340</td></tr>
|
| 88 |
+
<tr>
|
| 89 |
+
<td>pref</td><td>undirected</td><td>1.000e+05</td><td>1.000e+07</td><td>0.0168</td><td>0.1430</td></tr>
|
| 90 |
+
<tr>
|
| 91 |
+
<td>sw</td><td>undirected</td><td>1.000e+05</td><td>1.000e+06</td><td>0.0208</td><td>0.1472</td></tr>
|
| 92 |
+
<tr>
|
| 93 |
+
<td>sw</td><td>undirected</td><td>1.000e+05</td><td>1.000e+07</td><td>0.0272</td><td>0.1418</td></tr>
|
| 94 |
+
<tr>
|
| 95 |
+
<td>rnd_ungraph</td><td>undirected</td><td>1.000e+04</td><td>1.000e+05</td><td>0.0522</td><td>0.0377</td></tr>
|
| 96 |
+
<tr>
|
| 97 |
+
<td>rnd_ungraph</td><td>undirected</td><td>1.000e+04</td><td>1.000e+06</td><td>0.7031</td><td>0.2983</td></tr>
|
| 98 |
+
<tr>
|
| 99 |
+
<td>rnd_ngraph</td><td>directed</td><td>1.000e+04</td><td>1.000e+05</td><td>0.0364</td><td>0.0267</td></tr>
|
| 100 |
+
<tr>
|
| 101 |
+
<td>rnd_ngraph</td><td>directed</td><td>1.000e+04</td><td>1.000e+06</td><td>0.4759</td><td>0.1864</td></tr>
|
| 102 |
+
<tr>
|
| 103 |
+
<td>rmat</td><td>directed</td><td>1.000e+04</td><td>1.000e+05</td><td>0.0789</td><td>0.0584</td></tr>
|
| 104 |
+
<tr>
|
| 105 |
+
<td>rmat</td><td>directed</td><td>1.000e+04</td><td>1.000e+06</td><td>1.1542</td><td>0.8002</td></tr>
|
| 106 |
+
<tr>
|
| 107 |
+
<td>pref</td><td>undirected</td><td>1.000e+04</td><td>1.000e+05</td><td>0.0017</td><td>0.0137</td></tr>
|
| 108 |
+
<tr>
|
| 109 |
+
<td>pref</td><td>undirected</td><td>1.000e+04</td><td>1.000e+06</td><td>0.0017</td><td>0.0132</td></tr>
|
| 110 |
+
<tr>
|
| 111 |
+
<td>sw</td><td>undirected</td><td>1.000e+04</td><td>1.000e+05</td><td>0.0019</td><td>0.0131</td></tr>
|
| 112 |
+
<tr>
|
| 113 |
+
<td>sw</td><td>undirected</td><td>1.000e+04</td><td>1.000e+06</td><td>0.0020</td><td>0.0135</td></tr>
|
| 114 |
+
<tr>
|
| 115 |
+
<td>rnd_ungraph</td><td>undirected</td><td>1.000e+05</td><td>1.000e+06</td><td>0.6280</td><td>0.4285</td></tr>
|
| 116 |
+
<tr>
|
| 117 |
+
<td>rnd_ungraph</td><td>undirected</td><td>1.000e+05</td><td>1.000e+07</td><td>9.8755</td><td>3.4552</td></tr>
|
| 118 |
+
<tr>
|
| 119 |
+
<td>rnd_ngraph</td><td>directed</td><td>1.000e+05</td><td>1.000e+06</td><td>0.5372</td><td>0.8366</td></tr>
|
| 120 |
+
<tr>
|
| 121 |
+
<td>rnd_ngraph</td><td>directed</td><td>1.000e+05</td><td>1.000e+07</td><td>7.3021</td><td>2.1303</td></tr>
|
| 122 |
+
<tr>
|
| 123 |
+
<td>rmat</td><td>directed</td><td>1.000e+05</td><td>1.000e+06</td><td>1.0667</td><td>0.8308</td></tr>
|
| 124 |
+
<tr>
|
| 125 |
+
<td>rnd_ungraph</td><td>undirected</td><td>1.000e+03</td><td>1.000e+04</td><td>0.0049</td><td>0.0034</td></tr>
|
| 126 |
+
<tr>
|
| 127 |
+
<td>rnd_ungraph</td><td>undirected</td><td>1.000e+03</td><td>1.000e+05</td><td>0.0630</td><td>0.0277</td></tr>
|
| 128 |
+
<tr>
|
| 129 |
+
<td>rnd_ngraph</td><td>directed</td><td>1.000e+03</td><td>1.000e+04</td><td>0.0031</td><td>0.0024</td></tr>
|
| 130 |
+
<tr>
|
| 131 |
+
<td>rnd_ngraph</td><td>directed</td><td>1.000e+03</td><td>1.000e+05</td><td>0.0383</td><td>0.0191</td></tr>
|
| 132 |
+
<tr>
|
| 133 |
+
<td>rmat</td><td>directed</td><td>1.000e+03</td><td>1.000e+04</td><td>0.0074</td><td>0.0059</td></tr>
|
| 134 |
+
<tr>
|
| 135 |
+
<td>rmat</td><td>directed</td><td>1.000e+03</td><td>1.000e+05</td><td>0.0890</td><td>0.0165</td></tr>
|
| 136 |
+
<tr>
|
| 137 |
+
<td>pref</td><td>undirected</td><td>1.000e+03</td><td>1.000e+04</td><td>0.0004</td><td>0.0013</td></tr>
|
| 138 |
+
<tr>
|
| 139 |
+
<td>pref</td><td>undirected</td><td>1.000e+03</td><td>1.000e+05</td><td>0.0003</td><td>0.0013</td></tr>
|
| 140 |
+
<tr>
|
| 141 |
+
<td>sw</td><td>undirected</td><td>1.000e+03</td><td>1.000e+04</td><td>0.0003</td><td>0.0013</td></tr>
|
| 142 |
+
<tr>
|
| 143 |
+
<td>sw</td><td>undirected</td><td>1.000e+03</td><td>1.000e+05</td><td>0.0003</td><td>0.0013</td></tr>
|
| 144 |
+
<tr>
|
| 145 |
+
<td>rnd_ungraph</td><td>undirected</td><td>1.000e+04</td><td>1.000e+05</td><td>0.0517</td><td>0.0407</td></tr>
|
| 146 |
+
<tr>
|
| 147 |
+
<td>rnd_ungraph</td><td>undirected</td><td>1.000e+04</td><td>1.000e+06</td><td>0.8008</td><td>0.3120</td></tr>
|
| 148 |
+
<tr>
|
| 149 |
+
<td>rnd_ngraph</td><td>directed</td><td>1.000e+04</td><td>1.000e+05</td><td>0.0373</td><td>0.0669</td></tr>
|
| 150 |
+
<tr>
|
| 151 |
+
<td>rnd_ngraph</td><td>directed</td><td>1.000e+04</td><td>1.000e+06</td><td>0.5369</td><td>0.1978</td></tr>
|
| 152 |
+
<tr>
|
| 153 |
+
<td>rmat</td><td>directed</td><td>1.000e+04</td><td>1.000e+05</td><td>0.0876</td><td>0.0672</td></tr>
|
| 154 |
+
<tr>
|
| 155 |
+
<td>rmat</td><td>directed</td><td>1.000e+04</td><td>1.000e+06</td><td>1.1729</td><td>0.8125</td></tr>
|
| 156 |
+
<tr>
|
| 157 |
+
<td>pref</td><td>undirected</td><td>1.000e+04</td><td>1.000e+05</td><td>0.0022</td><td>0.0141</td></tr>
|
| 158 |
+
<tr>
|
| 159 |
+
<td>pref</td><td>undirected</td><td>1.000e+04</td><td>1.000e+06</td><td>0.0017</td><td>0.0181</td></tr>
|
| 160 |
+
<tr>
|
| 161 |
+
<td>sw</td><td>undirected</td><td>1.000e+04</td><td>1.000e+05</td><td>0.0020</td><td>0.0138</td></tr>
|
| 162 |
+
<tr>
|
| 163 |
+
<td>sw</td><td>undirected</td><td>1.000e+04</td><td>1.000e+06</td><td>0.0019</td><td>0.0184</td></tr>
|
| 164 |
+
<tr>
|
| 165 |
+
<td>rmat</td><td>directed</td><td>1.000e+05</td><td>1.000e+07</td><td>16.6068</td><td>13.4748</td></tr>
|
| 166 |
+
<tr>
|
| 167 |
+
<td>pref</td><td>undirected</td><td>1.000e+05</td><td>1.000e+06</td><td>0.0177</td><td>0.1335</td></tr>
|
| 168 |
+
<tr>
|
| 169 |
+
<td>pref</td><td>undirected</td><td>1.000e+05</td><td>1.000e+07</td><td>0.0161</td><td>0.1313</td></tr>
|
| 170 |
+
<tr>
|
| 171 |
+
<td>sw</td><td>undirected</td><td>1.000e+05</td><td>1.000e+06</td><td>0.0185</td><td>0.1318</td></tr>
|
| 172 |
+
<tr>
|
| 173 |
+
<td>sw</td><td>undirected</td><td>1.000e+05</td><td>1.000e+07</td><td>0.0187</td><td>0.1305</td></tr>
|
| 174 |
+
<tr>
|
| 175 |
+
<td>rnd_ungraph</td><td>undirected</td><td>1.000e+04</td><td>1.000e+05</td><td>0.0476</td><td>0.0382</td></tr>
|
| 176 |
+
<tr>
|
| 177 |
+
<td>rnd_ungraph</td><td>undirected</td><td>1.000e+04</td><td>1.000e+06</td><td>0.7023</td><td>0.2999</td></tr>
|
| 178 |
+
<tr>
|
| 179 |
+
<td>rnd_ngraph</td><td>directed</td><td>1.000e+04</td><td>1.000e+05</td><td>0.0323</td><td>0.0276</td></tr>
|
| 180 |
+
<tr>
|
| 181 |
+
<td>rnd_ngraph</td><td>directed</td><td>1.000e+04</td><td>1.000e+06</td><td>0.4846</td><td>0.1927</td></tr>
|
| 182 |
+
<tr>
|
| 183 |
+
<td>rmat</td><td>directed</td><td>1.000e+04</td><td>1.000e+05</td><td>0.0811</td><td>0.0602</td></tr>
|
| 184 |
+
<tr>
|
| 185 |
+
<td>rmat</td><td>directed</td><td>1.000e+04</td><td>1.000e+06</td><td>1.1522</td><td>0.7962</td></tr>
|
| 186 |
+
<tr>
|
| 187 |
+
<td>pref</td><td>undirected</td><td>1.000e+04</td><td>1.000e+05</td><td>0.0023</td><td>0.0162</td></tr>
|
| 188 |
+
<tr>
|
| 189 |
+
<td>pref</td><td>undirected</td><td>1.000e+04</td><td>1.000e+06</td><td>0.0018</td><td>0.0131</td></tr>
|
| 190 |
+
<tr>
|
| 191 |
+
<td>sw</td><td>undirected</td><td>1.000e+04</td><td>1.000e+05</td><td>0.0019</td><td>0.0132</td></tr>
|
| 192 |
+
<tr>
|
| 193 |
+
<td>sw</td><td>undirected</td><td>1.000e+04</td><td>1.000e+06</td><td>0.0021</td><td>0.0132</td></tr>
|
| 194 |
+
<tr>
|
| 195 |
+
<td>rnd_ungraph</td><td>undirected</td><td>1.000e+05</td><td>1.000e+06</td><td>0.6232</td><td>0.4392</td></tr>
|
| 196 |
+
<tr>
|
| 197 |
+
<td>rnd_ungraph</td><td>undirected</td><td>1.000e+05</td><td>1.000e+07</td><td>9.4708</td><td>3.5457</td></tr>
|
| 198 |
+
<tr>
|
| 199 |
+
<td>rnd_ngraph</td><td>directed</td><td>1.000e+05</td><td>1.000e+06</td><td>0.5382</td><td>0.8661</td></tr>
|
| 200 |
+
<tr>
|
| 201 |
+
<td>rnd_ngraph</td><td>directed</td><td>1.000e+05</td><td>1.000e+07</td><td>7.3567</td><td>2.1015</td></tr>
|
| 202 |
+
<tr>
|
| 203 |
+
<td>rmat</td><td>directed</td><td>1.000e+05</td><td>1.000e+06</td><td>1.0646</td><td>0.9549</td></tr>
|
| 204 |
+
<tr>
|
| 205 |
+
<td>rmat</td><td>directed</td><td>1.000e+05</td><td>1.000e+07</td><td>16.3262</td><td>14.4413</td></tr>
|
| 206 |
+
<tr>
|
| 207 |
+
<td>pref</td><td>undirected</td><td>1.000e+05</td><td>1.000e+06</td><td>0.0194</td><td>0.1322</td></tr>
|
| 208 |
+
<tr>
|
| 209 |
+
<td>pref</td><td>undirected</td><td>1.000e+05</td><td>1.000e+07</td><td>0.0209</td><td>0.1333</td></tr>
|
| 210 |
+
<tr>
|
| 211 |
+
<td>sw</td><td>undirected</td><td>1.000e+05</td><td>1.000e+06</td><td>0.0192</td><td>0.1376</td></tr>
|
| 212 |
+
<tr>
|
| 213 |
+
<td>sw</td><td>undirected</td><td>1.000e+05</td><td>1.000e+07</td><td>0.0197</td><td>0.1349</td></tr>
|
| 214 |
+
</table>
|
| 215 |
+
</body></html>
|
snap-python/source/dev/examples/result3.txt
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Hostname: sheridan
|
| 2 |
+
Range = 10^1 to 10^0
|
| 3 |
+
Running results from 1.000000e+00 to 0.000000e+00
|
| 4 |
+
Non-deterministic mode
|
| 5 |
+
Iteration: 1 of 1
|
snap-python/source/dev/examples/results-madmax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514 51084 1.47000
|
| 12 |
+
8514 25542 1.53000
|
| 13 |
+
10 70 0.00000
|
| 14 |
+
10 30 0.00000
|
| 15 |
+
210 1050 0.01000
|
| 16 |
+
210 630 0.01000
|
| 17 |
+
7266 21798 0.70000
|
| 18 |
+
7266 21798 0.66000
|
| 19 |
+
80 640 0.01000
|
| 20 |
+
80 240 0.00000
|
| 21 |
+
693 5544 0.05000
|
| 22 |
+
693 2079 0.03000
|
| 23 |
+
7944 71496 1.66000
|
| 24 |
+
7944 23832 0.81000
|
| 25 |
+
27 54 0.00000
|
| 26 |
+
27 81 0.01000
|
| 27 |
+
840 7560 0.05000
|
| 28 |
+
840 2520 0.05000
|
| 29 |
+
7510 15020 1.10000
|
| 30 |
+
7510 22530 0.81000
|
| 31 |
+
19 114 0.00000
|
| 32 |
+
19 57 0.00000
|
| 33 |
+
699 3495 0.03000
|
| 34 |
+
699 2097 0.02000
|
| 35 |
+
9203 27609 0.54000
|
| 36 |
+
9203 27609 0.53000
|
| 37 |
+
24 168 0.00000
|
| 38 |
+
24 72 0.00000
|
| 39 |
+
625 4375 0.03000
|
| 40 |
+
625 1875 0.02000
|
| 41 |
+
9448 37792 0.96000
|
| 42 |
+
9448 28344 0.82000
|
| 43 |
+
40 280 0.00000
|
| 44 |
+
40 120 0.01000
|
| 45 |
+
686 2058 0.04000
|
| 46 |
+
686 2058 0.03000
|
| 47 |
+
8245 57715 1.03000
|
| 48 |
+
8245 24735 1.06000
|
| 49 |
+
94 658 0.01000
|
| 50 |
+
94 282 0.00000
|
| 51 |
+
474 2844 0.01000
|
| 52 |
+
474 1422 0.01000
|
| 53 |
+
8138 73242 1.29000
|
| 54 |
+
8138 24414 0.51000
|
| 55 |
+
49 245 0.00000
|
| 56 |
+
49 147 0.00000
|
| 57 |
+
266 798 0.01000
|
| 58 |
+
266 798 0.01000
|
| 59 |
+
7844 70596 1.30000
|
| 60 |
+
7844 23532 0.55000
|
| 61 |
+
88 704 0.01000
|
| 62 |
+
88 264 0.00000
|
| 63 |
+
192 768 0.01000
|
| 64 |
+
192 576 0.00000
|
| 65 |
+
9274 27822 1.25000
|
| 66 |
+
9274 27822 1.25000
|
| 67 |
+
13 91 0.00000
|
| 68 |
+
13 39 0.00000
|
| 69 |
+
899 7192 0.05000
|
| 70 |
+
899 2697 0.03000
|
| 71 |
+
4901 34307 0.53000
|
| 72 |
+
4901 14703 0.22000
|
| 73 |
+
13 52 0.00000
|
| 74 |
+
13 39 0.00000
|
| 75 |
+
653 5877 0.04000
|
| 76 |
+
653 1959 0.02000
|
| 77 |
+
1495 13455 0.11000
|
| 78 |
+
1495 4485 0.07000
|
| 79 |
+
88 440 0.00000
|
| 80 |
+
88 264 0.01000
|
| 81 |
+
412 3708 0.02000
|
| 82 |
+
412 1236 0.02000
|
| 83 |
+
2702 8106 0.23000
|
| 84 |
+
2702 8106 0.22000
|
| 85 |
+
59 354 0.00000
|
| 86 |
+
59 177 0.00000
|
| 87 |
+
640 2560 0.02000
|
| 88 |
+
640 1920 0.03000
|
| 89 |
+
9907 79256 1.49000
|
| 90 |
+
9907 29721 0.77000
|
| 91 |
+
13 91 0.00000
|
| 92 |
+
13 39 0.00000
|
| 93 |
+
485 1455 0.02000
|
| 94 |
+
485 1455 0.02000
|
| 95 |
+
2953 8859 0.30000
|
| 96 |
+
2953 8859 0.30000
|
| 97 |
+
70 560 0.00000
|
| 98 |
+
70 210 0.01000
|
| 99 |
+
161 1449 0.01000
|
| 100 |
+
161 483 0.01000
|
| 101 |
+
9470 28410 2.07000
|
| 102 |
+
9470 28410 0.48000
|
| 103 |
+
93 651 0.00000
|
| 104 |
+
93 279 0.00000
|
| 105 |
+
731 1462 0.01000
|
| 106 |
+
731 2193 0.01000
|
| 107 |
+
1408 4224 0.02000
|
| 108 |
+
1408 4224 0.02000
|
| 109 |
+
80 560 0.01000
|
| 110 |
+
80 240 0.00000
|
| 111 |
+
452 3164 0.01000
|
| 112 |
+
452 1356 0.01000
|
| 113 |
+
8695 26085 0.23000
|
| 114 |
+
8695 26085 0.22000
|
| 115 |
+
62 124 0.01000
|
| 116 |
+
62 186 0.00000
|
| 117 |
+
624 5616 0.02000
|
| 118 |
+
624 1872 0.02000
|
| 119 |
+
8037 40185 0.37000
|
| 120 |
+
8037 24111 0.38000
|
| 121 |
+
65 585 0.00000
|
| 122 |
+
65 195 0.00000
|
| 123 |
+
899 8091 0.03000
|
| 124 |
+
899 2697 0.02000
|
| 125 |
+
4652 32564 0.17000
|
| 126 |
+
4652 13956 0.09000
|
| 127 |
+
19 76 0.00000
|
| 128 |
+
19 57 0.00000
|
| 129 |
+
332 2656 0.02000
|
| 130 |
+
332 996 0.01000
|
| 131 |
+
4293 30051 0.17000
|
| 132 |
+
4293 12879 0.10000
|
| 133 |
+
70 280 0.00000
|
| 134 |
+
70 210 0.01000
|
| 135 |
+
217 1736 0.02000
|
| 136 |
+
217 651 0.01000
|
| 137 |
+
1330 5320 0.05000
|
| 138 |
+
1330 3990 0.05000
|
| 139 |
+
44 88 0.00000
|
| 140 |
+
44 132 0.00000
|
| 141 |
+
786 2358 0.02000
|
| 142 |
+
786 2358 0.01000
|
| 143 |
+
2300 6900 0.04000
|
| 144 |
+
2300 6900 0.03000
|
| 145 |
+
78 390 0.00000
|
| 146 |
+
78 234 0.00000
|
| 147 |
+
848 1696 0.02000
|
| 148 |
+
848 2544 0.01000
|
| 149 |
+
7091 14182 0.13000
|
| 150 |
+
7091 21273 0.17000
|
| 151 |
+
14 28 0.00000
|
| 152 |
+
14 42 0.00000
|
| 153 |
+
163 1467 0.01000
|
| 154 |
+
163 489 0.01000
|
| 155 |
+
9326 55956 1.48000
|
| 156 |
+
9326 27978 1.47000
|
| 157 |
+
35 140 0.00000
|
| 158 |
+
35 105 0.00000
|
| 159 |
+
821 4926 0.05000
|
| 160 |
+
821 2463 0.03000
|
| 161 |
+
2608 20864 0.27000
|
| 162 |
+
2608 7824 0.14000
|
| 163 |
+
39 78 0.00000
|
| 164 |
+
39 117 0.00000
|
| 165 |
+
783 1566 0.02000
|
| 166 |
+
783 2349 0.03000
|
| 167 |
+
7338 66042 1.26000
|
| 168 |
+
7338 22014 0.64000
|
| 169 |
+
38 114 0.00000
|
| 170 |
+
38 114 0.00000
|
| 171 |
+
425 2550 0.02000
|
| 172 |
+
425 1275 0.02000
|
| 173 |
+
1018 5090 0.06000
|
| 174 |
+
1018 3054 0.06000
|
| 175 |
+
62 124 0.00000
|
| 176 |
+
62 186 0.00000
|
| 177 |
+
126 378 0.00000
|
| 178 |
+
126 378 0.01000
|
| 179 |
+
4056 8112 0.14000
|
| 180 |
+
4056 12168 0.21000
|
| 181 |
+
17 136 0.00000
|
| 182 |
+
17 51 0.00000
|
| 183 |
+
584 1168 0.01000
|
| 184 |
+
584 1752 0.02000
|
| 185 |
+
3306 9918 0.18000
|
| 186 |
+
3306 9918 0.18000
|
| 187 |
+
19804 59412 2.74000
|
| 188 |
+
19804 59412 3.02000
|
| 189 |
+
42 168 0.00000
|
| 190 |
+
42 126 0.00000
|
| 191 |
+
387 2709 0.01000
|
| 192 |
+
387 1161 0.01000
|
| 193 |
+
3797 22782 0.36000
|
| 194 |
+
3797 11391 0.36000
|
| 195 |
+
34028 102084 12.56000
|
| 196 |
+
34028 102084 13.10000
|
| 197 |
+
97 291 0.00000
|
| 198 |
+
97 291 0.00000
|
| 199 |
+
741 2964 0.03000
|
| 200 |
+
741 2223 0.02000
|
| 201 |
+
7391 51737 1.08000
|
| 202 |
+
7391 22173 0.57000
|
| 203 |
+
67897 203691 14.37000
|
| 204 |
+
67897 203691 7.04000
|
| 205 |
+
95 285 0.00000
|
| 206 |
+
95 285 0.01000
|
| 207 |
+
547 1094 0.02000
|
| 208 |
+
547 1641 0.02000
|
| 209 |
+
8498 59486 1.14000
|
| 210 |
+
8498 25494 0.71000
|
| 211 |
+
72579 290316 50.46000
|
| 212 |
+
72579 217737 18.71000
|
| 213 |
+
81 162 0.00000
|
| 214 |
+
81 243 0.01000
|
| 215 |
+
409 3272 0.02000
|
| 216 |
+
409 1227 0.02000
|
| 217 |
+
8863 79767 1.26000
|
| 218 |
+
8863 26589 1.93000
|
| 219 |
+
89153 624071 96.92000
|
| 220 |
+
89153 267459 85.52000
|
| 221 |
+
83 581 0.01000
|
| 222 |
+
83 249 0.00000
|
| 223 |
+
686 6174 0.04000
|
| 224 |
+
686 2058 0.03000
|
| 225 |
+
5255 42040 0.67000
|
| 226 |
+
5255 15765 0.26000
|
| 227 |
+
65123 325615 26.67000
|
| 228 |
+
65123 195369 15.17000
|
| 229 |
+
85 510 0.00000
|
| 230 |
+
85 255 0.00000
|
| 231 |
+
574 4592 0.03000
|
| 232 |
+
574 1722 0.02000
|
| 233 |
+
8536 76824 1.53000
|
| 234 |
+
8536 25608 0.75000
|
| 235 |
+
81055 162110 14.32000
|
| 236 |
+
81055 243165 41.29000
|
| 237 |
+
57 285 0.01000
|
| 238 |
+
57 171 0.00000
|
| 239 |
+
794 4764 0.04000
|
| 240 |
+
794 2382 0.04000
|
| 241 |
+
9500 76000 1.15000
|
| 242 |
+
9500 28500 1.00000
|
| 243 |
+
37275 74550 15.67000
|
| 244 |
+
37275 111825 13.68000
|
| 245 |
+
78 312 0.00000
|
| 246 |
+
78 234 0.00000
|
| 247 |
+
594 4752 0.04000
|
| 248 |
+
594 1782 0.02000
|
| 249 |
+
6160 36960 0.61000
|
| 250 |
+
6160 18480 0.32000
|
| 251 |
+
41142 329136 3.86000
|
| 252 |
+
41142 123426 2.90000
|
| 253 |
+
81 486 0.00000
|
| 254 |
+
81 243 0.01000
|
| 255 |
+
918 1836 0.05000
|
| 256 |
+
918 2754 0.06000
|
| 257 |
+
3685 33165 0.67000
|
| 258 |
+
3685 11055 0.37000
|
| 259 |
+
78419 313676 71.96000
|
| 260 |
+
78419 235257 53.10000
|
| 261 |
+
89 267 0.01000
|
| 262 |
+
89 267 0.00000
|
| 263 |
+
560 1680 0.04000
|
| 264 |
+
560 1680 0.04000
|
| 265 |
+
6184 37104 1.07000
|
| 266 |
+
6184 18552 1.06000
|
| 267 |
+
44276 177104 17.07000
|
| 268 |
+
44276 132828 21.02000
|
| 269 |
+
71 213 0.00000
|
| 270 |
+
71 213 0.00000
|
| 271 |
+
729 5832 0.04000
|
| 272 |
+
729 2187 0.02000
|
| 273 |
+
7082 42492 0.72000
|
| 274 |
+
7082 21246 0.37000
|
| 275 |
+
11383 45532 0.98000
|
| 276 |
+
11383 34149 0.86000
|
| 277 |
+
56 392 0.00000
|
| 278 |
+
56 168 0.00000
|
| 279 |
+
200 800 0.01000
|
| 280 |
+
200 600 0.01000
|
| 281 |
+
9689 29067 0.94000
|
| 282 |
+
9689 29067 0.95000
|
| 283 |
+
16287 114009 3.56000
|
| 284 |
+
16287 48861 1.84000
|
| 285 |
+
13 104 0.00000
|
| 286 |
+
13 39 0.00000
|
| 287 |
+
348 1740 0.02000
|
| 288 |
+
348 1044 0.02000
|
| 289 |
+
6074 30370 0.74000
|
| 290 |
+
6074 18222 0.72000
|
| 291 |
+
96859 678013 89.74000
|
| 292 |
+
96859 290577 106.46000
|
| 293 |
+
51 255 0.00000
|
| 294 |
+
51 153 0.00000
|
| 295 |
+
654 5886 0.06000
|
| 296 |
+
654 1962 0.04000
|
| 297 |
+
9041 36164 1.10000
|
| 298 |
+
9041 27123 0.75000
|
| 299 |
+
18740 168660 7.29000
|
| 300 |
+
18740 56220 2.52000
|
snap-python/source/dev/examples/results-madmax/BFS_pref.txt
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
44 396 0.00000
|
| 2 |
+
458 1832 0.02000
|
| 3 |
+
8514 51084 1.47000
|
| 4 |
+
27 54 0.00000
|
| 5 |
+
840 7560 0.05000
|
| 6 |
+
7510 15020 1.10000
|
| 7 |
+
40 280 0.00000
|
| 8 |
+
686 2058 0.04000
|
| 9 |
+
8245 57715 1.03000
|
| 10 |
+
88 704 0.01000
|
| 11 |
+
192 768 0.01000
|
| 12 |
+
9274 27822 1.25000
|
| 13 |
+
88 440 0.00000
|
| 14 |
+
412 3708 0.02000
|
| 15 |
+
2702 8106 0.23000
|
| 16 |
+
70 560 0.00000
|
| 17 |
+
161 1449 0.01000
|
| 18 |
+
9470 28410 2.07000
|
| 19 |
+
62 124 0.01000
|
| 20 |
+
624 5616 0.02000
|
| 21 |
+
8037 40185 0.37000
|
| 22 |
+
70 280 0.00000
|
| 23 |
+
217 1736 0.02000
|
| 24 |
+
1330 5320 0.05000
|
| 25 |
+
14 28 0.00000
|
| 26 |
+
163 1467 0.01000
|
| 27 |
+
9326 55956 1.48000
|
| 28 |
+
38 114 0.00000
|
| 29 |
+
425 2550 0.02000
|
| 30 |
+
1018 5090 0.06000
|
| 31 |
+
42 168 0.00000
|
| 32 |
+
387 2709 0.01000
|
| 33 |
+
3797 22782 0.36000
|
| 34 |
+
34028 102084 12.56000
|
| 35 |
+
81 162 0.00000
|
| 36 |
+
409 3272 0.02000
|
| 37 |
+
8863 79767 1.26000
|
| 38 |
+
89153 624071 96.92000
|
| 39 |
+
57 285 0.01000
|
| 40 |
+
794 4764 0.04000
|
| 41 |
+
9500 76000 1.15000
|
| 42 |
+
37275 74550 15.67000
|
| 43 |
+
89 267 0.01000
|
| 44 |
+
560 1680 0.04000
|
| 45 |
+
6184 37104 1.07000
|
| 46 |
+
44276 177104 17.07000
|
| 47 |
+
13 104 0.00000
|
| 48 |
+
348 1740 0.02000
|
| 49 |
+
6074 30370 0.74000
|
| 50 |
+
96859 678013 89.74000
|