diff --git a/docs/api.rst b/docs/api.rst --- a/docs/api.rst +++ b/docs/api.rst @@ -41,9 +41,9 @@ :param string src: source node specified as a SWH PID :query string edges: edges types the traversal can follow; default to - ``"*"`` + ``"*"`` :query string direction: direction in which graph edges will be followed; - can be either ``forward`` or ``backward``, default to ``forward`` + can be either ``forward`` or ``backward``, default to ``forward`` :statuscode 200: success :statuscode 400: invalid query string provided @@ -51,14 +51,14 @@ .. sourcecode:: http - HTTP/1.1 200 OK - Content-Type: application/json + HTTP/1.1 200 OK + Content-Type: application/json - [ - "swh:1:cnt:669ac7c32292798644b21dbb5a0dc657125f444d", - "swh:1:cnt:da4cb28febe66172a9fdf1a235525ae6c00cde1d", - ... - ] + [ + "swh:1:cnt:669ac7c32292798644b21dbb5a0dc657125f444d", + "swh:1:cnt:da4cb28febe66172a9fdf1a235525ae6c00cde1d", + ... + ] Neighbors --------- @@ -70,9 +70,9 @@ :param string src: source node specified as a SWH PID :query string edges: edges types allowed to be listed as neighbors; default - to ``"*"`` + to ``"*"`` :query string direction: direction in which graph edges will be followed; - can be either ``forward`` or ``backward``, default to ``forward`` + can be either ``forward`` or ``backward``, default to ``forward`` :statuscode 200: success :statuscode 400: invalid query string provided @@ -80,14 +80,14 @@ .. sourcecode:: http - HTTP/1.1 200 OK - Content-Type: application/json + HTTP/1.1 200 OK + Content-Type: application/json - [ - "swh:1:cnt:94a9ed024d3859793618152ea559a168bbcbb5e2", - "swh:1:dir:d198bc9d7a6bcf6db04f476d29314f157507d505", - ... - ] + [ + "swh:1:cnt:94a9ed024d3859793618152ea559a168bbcbb5e2", + "swh:1:dir:d198bc9d7a6bcf6db04f476d29314f157507d505", + ... + ] Walk ---- @@ -99,15 +99,15 @@ :param string src: starting node specified as a SWH PID :param string dst: destination node, either as a node PID or a node type. - The traversal will stop at the first node encountered matching the desired - destination. + The traversal will stop at the first node encountered matching the + desired destination. :query string edges: edges types the traversal can follow; default to - ``"*"`` + ``"*"`` :query string traversal: traversal algorithm; can be either ``dfs`` or - ``bfs``, default to ``dfs`` + ``bfs``, default to ``dfs`` :query string direction: direction in which graph edges will be followed; - can be either ``forward`` or ``backward``, default to ``forward`` + can be either ``forward`` or ``backward``, default to ``forward`` :statuscode 200: success :statuscode 400: invalid query string provided @@ -115,16 +115,16 @@ .. sourcecode:: http - HTTP/1.1 200 OK - Content-Type: application/json + HTTP/1.1 200 OK + Content-Type: application/json - [ - "swh:1:rev:f39d7d78b70e0f39facb1e4fab77ad3df5c52a35", - "swh:1:rev:52c90f2d32bfa7d6eccd66a56c44ace1f78fbadd", - "swh:1:rev:cea92e843e40452c08ba313abc39f59efbb4c29c", - "swh:1:rev:8d517bdfb57154b8a11d7f1682ecc0f79abf8e02", - ... - ] + [ + "swh:1:rev:f39d7d78b70e0f39facb1e4fab77ad3df5c52a35", + "swh:1:rev:52c90f2d32bfa7d6eccd66a56c44ace1f78fbadd", + "swh:1:rev:cea92e843e40452c08ba313abc39f59efbb4c29c", + "swh:1:rev:8d517bdfb57154b8a11d7f1682ecc0f79abf8e02", + ... + ] Visit ----- @@ -138,9 +138,9 @@ :param string src: starting node specified as a SWH PID :query string edges: edges types the traversal can follow; default to - ``"*"`` + ``"*"`` :query string direction: direction in which graph edges will be followed; - can be either ``forward`` or ``backward``, default to ``forward`` + can be either ``forward`` or ``backward``, default to ``forward`` :statuscode 200: success :statuscode 400: invalid query string provided @@ -148,37 +148,37 @@ .. sourcecode:: http - GET /graph/visit/nodes/ - HTTP/1.1 200 OK - Content-Type: application/json - - [ - "swh:1:rev:f39d7d78b70e0f39facb1e4fab77ad3df5c52a35", - "swh:1:rev:52c90f2d32bfa7d6eccd66a56c44ace1f78fbadd", - ... - "swh:1:rev:a31e58e129f73ab5b04016330b13ed51fde7a961", - ... - ] - - .. sourcecode:: http - - GET /graph/visit/paths/ - HTTP/1.1 200 OK - Content-Type: application/json + GET /graph/visit/nodes/ + HTTP/1.1 200 OK + Content-Type: application/json - [ [ "swh:1:rev:f39d7d78b70e0f39facb1e4fab77ad3df5c52a35", "swh:1:rev:52c90f2d32bfa7d6eccd66a56c44ace1f78fbadd", ... - ], - [ - "swh:1:rev:f39d7d78b70e0f39facb1e4fab77ad3df5c52a35", "swh:1:rev:a31e58e129f73ab5b04016330b13ed51fde7a961", ... - ], - ... - ] + ] + + .. sourcecode:: http + + GET /graph/visit/paths/ + HTTP/1.1 200 OK + Content-Type: application/json + + [ + [ + "swh:1:rev:f39d7d78b70e0f39facb1e4fab77ad3df5c52a35", + "swh:1:rev:52c90f2d32bfa7d6eccd66a56c44ace1f78fbadd", + ... + ], + [ + "swh:1:rev:f39d7d78b70e0f39facb1e4fab77ad3df5c52a35", + "swh:1:rev:a31e58e129f73ab5b04016330b13ed51fde7a961", + ... + ], + ... + ] Stats ----- @@ -191,28 +191,28 @@ .. sourcecode:: http - HTTP/1.1 200 OK - Content-Type: application/json - - { - "counts": { - "nodes": 16222788, - "edges": 9907464 - }, - "ratios": { - "compression": 0.367, - "bits_per_node": 5.846, - "bits_per_edge": 9.573, - "avg_locality": 270.369 - }, - "indegree": { - "min": 0, - "max": 12382, - "avg": 0.6107127825377487 - }, - "outdegree": { - "min": 0, - "max": 1, - "avg": 0.6107127825377487 + HTTP/1.1 200 OK + Content-Type: application/json + + { + "counts": { + "nodes": 16222788, + "edges": 9907464 + }, + "ratios": { + "compression": 0.367, + "bits_per_node": 5.846, + "bits_per_edge": 9.573, + "avg_locality": 270.369 + }, + "indegree": { + "min": 0, + "max": 12382, + "avg": 0.6107127825377487 + }, + "outdegree": { + "min": 0, + "max": 1, + "avg": 0.6107127825377487 + } } - } diff --git a/docs/compression.rst b/docs/compression.rst --- a/docs/compression.rst +++ b/docs/compression.rst @@ -34,7 +34,7 @@ graph. From the `Sux4J `_ utility tool, we use the `GOVMinimalPerfectHashFunction `_ -class, mapping with no collisions $n$ keys to $n$ consecutive integers. +class, mapping with no collisions N keys to N consecutive integers. The step produces a ``.mph`` file (MPH stands for *Minimal Perfect Hash-function*) storing the hash function taking as input a string and returning @@ -65,7 +65,9 @@ Building on this insight, the previous compression results in the BV compress step are improved by re-ordering nodes ids using a BFS traversal order. We use -the `BFSBig <>`_ class from the `LAW `_ library. +the `BFS +`_ +class from the `LAW `_ library. The resulting ordering is stored in the ``.order`` file, listing nodes ids in order of traversal. diff --git a/docs/index.rst b/docs/index.rst --- a/docs/index.rst +++ b/docs/index.rst @@ -11,10 +11,10 @@ Overview -------- -* :doc:`graph compression ` -* :doc:`graph service REST API ` -* :doc:`use cases ` -* :doc:`docker environment ` (for development purposes) +* :doc:`Graph compression ` +* :doc:`Graph service REST API ` +* :doc:`Use cases ` +* :doc:`Docker environment ` (for development purposes) Reference Documentation