update docs

main
Ziyang Hu 2 years ago
parent b5d381ea11
commit fd24c14984

@ -14,7 +14,7 @@ Utilities
.. function:: Constant(data: [...])
Returns a constant relation containing the data passed in. The constant rule ``?[] <- ...`` is
Returns a relation containing the data passed in. The constant rule ``?[] <- ...`` is
syntax sugar for ``?[] <~ Constant(data: ...)``.
:param data: A list of lists, representing the rows of the returned relation.
@ -135,10 +135,6 @@ Pathfinding algorithms
:param limit: How many answers to produce for each starting nodes. Defaults to 1.
:return: Triples containing the starting node, the answer node, and the found path connecting them.
.. TIP::
You probably don't want to use depth first search for path finding unless you have a really niche use case.
.. function:: DFS(...)
See :func:`Algo.DepthFirstSearch`.
@ -226,7 +222,7 @@ Centrality measures
.. WARNING::
``BetweennessCentrality`` is very expensive to compute for medium to large graphs. Plan resources accordingly.
``BetweennessCentrality`` is very expensive for medium to large graphs. If possible, collapse large graphs into supergraphs by running a community detection algorithm first.
------------------
Miscellaneous

@ -146,8 +146,26 @@ A few other magic commands are available:
* ``%cozo_clear`` clears all set parameters.
* ``%cozo_params`` returns the parameters currently set.
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Python
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
You can also use the Python client without JupyterLab. First::
pip install pycozo
Next, in your Python code, do something like the following::
from pycozo.client import Client
client = Client(host='http://127.0.0.1:9070', auth=None, dataframe=False)
print(client.run('::relations'))
If ``dataframe=True``, the client will transform the returned relation into Pandas dataframes, which must be separately installed.
The ``client.run`` method also takes an optional second argument ``params``.
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
The Makeshift JavaScript Console
Web Browser
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
If you are reluctant to install python and Jupyter, you may consider the Makeshift JavaScript Console.

@ -48,7 +48,7 @@ Ops for stored relations
Set triggers for the stored relation ``<REL_NAME>``. This is explained in more detail in the transaction chapter.
.. function:: ::access_level <REL_NAME> <ACCESS_LEVEL>
.. function:: ::access_level <ACCESS_LEVEL> <REL_NAME> (, <REL_NAME>)*
Sets the access level of ``<REL_NAME>`` to the given level. The levels are:

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save