{"id":27128669,"url":"https://github.com/kwonoh/glam","last_synced_at":"2025-04-07T18:58:37.682Z","repository":{"id":52494484,"uuid":"102667863","full_name":"kwonoh/glam","owner":"kwonoh","description":"GLAM: Graph Layout Aesthetic Metrics","archived":false,"fork":false,"pushed_at":"2024-06-06T05:02:21.000Z","size":15793,"stargazers_count":37,"open_issues_count":0,"forks_count":10,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-06-07T06:18:31.752Z","etag":null,"topics":["boost-graph-library","gpu","graph","graph-drawing","graph-layout","metric","opencl"],"latest_commit_sha":null,"homepage":null,"language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kwonoh.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-09-06T23:28:44.000Z","updated_at":"2024-06-06T05:02:25.000Z","dependencies_parsed_at":"2022-08-31T15:10:53.930Z","dependency_job_id":null,"html_url":"https://github.com/kwonoh/glam","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kwonoh%2Fglam","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kwonoh%2Fglam/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kwonoh%2Fglam/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kwonoh%2Fglam/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kwonoh","download_url":"https://codeload.github.com/kwonoh/glam/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247713259,"owners_count":20983683,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["boost-graph-library","gpu","graph","graph-drawing","graph-layout","metric","opencl"],"created_at":"2025-04-07T18:58:37.244Z","updated_at":"2025-04-07T18:58:37.677Z","avatar_url":"https://github.com/kwonoh.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# GLAM: Graph Layout Aesthetic Metrics\nA high-performance implementation for computing graph layout aesthetic metrics described in [our paper](https://goo.gl/Y8e9iH):\n```bibtex\n@article{kwon18wgl,\n    title={{What Would a Graph Look Like in This Layout? A Machine Learning Approach to Large Graph Visualization}},\n    author={Kwon, Oh-Hyun and Crnovrsanin, Tarik and Ma, Kwan-Liu},\n    journal={IEEE Transactions on Visualization and Computer Graphics},\n    year={2018},\n    volume={24},\n    number={1},\n    pages={478-488}\n}\n```\nOh-Hyun Kwon, Tarik Crnovrsanin, and Kwan-Liu Ma are with [VIDI Labs](http://vidi.cs.ucdavis.edu/) at the University of California, Davis.\n\n## Requirements\n- C++14 or higher\n- [Boost](http://www.boost.org/) 1.62 or higher\n- [Intel TBB](https://www.threadingbuildingblocks.org/)\n- [OpenCL](https://www.khronos.org/opencl/)\n- [CGAL](https://www.cgal.org/)\n- [JSON for Modern C++ (included)](https://github.com/nlohmann/json)\n\n## Build\n```shell\nmkdir build\ncd build\ncmake .. -DCMAKE_BUILD_TYPE=Release; make\n```\n\n## Usage\n```shell\n# glam FILEPATH(s) -m METRIC(s)\n\u003e ./glam ../data/karate.dot -m crosslessness\nLoading graph: ../data/karate.json\nComputing metric: crosslessness\ncrosslessness=0.970909 (num_edge_crossings=72)\n\n# multiple files and metrics\n\u003e ./glam ../data/karate.dot ../data/power.json -m crosslessness shape_gabriel\nLoading graph: ../data/karate.dot\nComputing metric: crosslessness\ncrosslessness=0.970909 (num_edge_crossings=72)\nComputing metric: shape_gabriel\nshape_gabriel=0.376176\n\nLoading graph: ../data/power.json\nComputing metric: crosslessness\ncrosslessness=0.999888 (num_edge_crossings=2426)\nComputing metric: shape_gabriel\nshape_gabriel=0.320775\n\n# help\n\u003e ./glam --help\nOptions:\n   -i [ --input-file ] arg input file(s)\n   -m [ --metric ] arg     metric(s) to compute. Available metrics:\n                           crosslessness, edge_length_cv, shape_gabriel,\n                           shape_delaunay\n   --help                  print help message\n```\n\n## Metrics\n`crosslessness`: This metric is defined in [H. C. Purchase. Metrics for Graph Drawing Aesthetics. Journal of Visual Languages and Computing, 13(5):501–516, 2002](http://www.sciencedirect.com/science/article/pii/S1045926X02902326).\n```shell\n\u003e ./glam ../data/cond-mat.json -m crosslessness\nLoading graph: ../data/cond-mat.json\nComputing metric: crosslessness\ncrosslessness=0.995233 (num_edge_crossings=5396100)\n```\n\n`edge_length_cv`: This metric is defined in [S. Hachul and M. Junger. Large-Graph Layout Algorithms at Work: An Experimental Study. Journal of Graph Algorithms and Applications, 11(2):345–369, 2007](http://jgaa.info/getPaper?id=150). The normalized definition is in [our paper](https://goo.gl/Y8e9iH).\n```shell\n\u003e ./glam ../data/cond-mat.json -m edge_length_cv\nLoading graph: ../data/cond-mat.json\nComputing metric: edge_length_cv\nedge_length_cv=0.724552 (normalized_cv=0.00332122)\n```\n\n`min_angle`: This metric is defined in [H. C. Purchase. Metrics for Graph Drawing Aesthetics. Journal of Visual Languages and Computing, 13(5):501–516, 2002](http://www.sciencedirect.com/science/article/pii/S1045926X02902326).\n```shell\n\u003e ./glam ../data/cond-mat.json -m min_angle\nLoading graph: ../data/cond-mat.json\nComputing metric: min_angle\nmin_angle=0.397181\n```\n\n`shape_delaunay`: This metric is defined in [P. Eades, S.-H. Hong, A. Nguyen, and K. Klein. Shape-Based Quality Metrics for Large Graph Visualization. Journal of Graph Algorithms and Applications, 21(1):29–53, 2017](http://jgaa.info/getPaper?id=405).\n```shell\n\u003e ./glam ../data/power.json -m shape_delaunay\nLoading graph: ../data/power.json\nComputing metric: shape_delaunay\nshape_delaunay=0.274121\n```\n\n`shape_gabriel`: This metric is defined in [P. Eades, S.-H. Hong, A. Nguyen, and K. Klein. Shape-Based Quality Metrics for Large Graph Visualization. Journal of Graph Algorithms and Applications, 21(1):29–53, 2017](http://jgaa.info/getPaper?id=405).\n```shell\n\u003e ./glam ../data/power.json -m shape_gabriel\nLoading graph: ../data/power.json\nComputing metric: shape_gabriel\nshape_gabriel=0.320775\n```\n\n## Data format\nSee [data](data) directory for example data files. The example data are obtained from [`graph-tool`](https://graph-tool.skewed.de/).\n\nGraphviz dot format:\n```dot\ngraph G {\n0 [x=\"-17.872\", y=\"24.5203\"];\n1 [x=\"-13.6346\", y=\"20.4381\"];\n2 [x=\"-16.0092\", y=\"16.7716\"];\n1--0 ;\n2--0 ;\n}\n```\n\nJSON format:\n```json\n{\n    \"nodes\": [\n        {\"x\": -17.872019430477007, \"y\": 24.520299748437747},\n        {\"x\": -13.634590227372781, \"y\": 20.438110276467413},\n        {\"x\": -16.009214853752148, \"y\": 16.771614256121076}\n    ],\n    \"links\": [\n        {\"source\": 0, \"target\": 1},\n        {\"source\": 0, \"target\": 2}\n    ]\n}\n```\n\n## Acknowledgement\nThis research has been sponsored by the U.S. National Science Foundation through grant IIS-1741536: Critical Visualization Technologies for Analyzing and Understanding Big Network Data.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkwonoh%2Fglam","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkwonoh%2Fglam","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkwonoh%2Fglam/lists"}