Skip to content

Commit

Permalink
Update documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
mannbach committed Sep 9, 2024
1 parent 7701e66 commit 0d8506f
Show file tree
Hide file tree
Showing 21 changed files with 149 additions and 50 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ Algorithms
:caption: Contents:
:glob:

algorithms/*
sampling
8 changes: 8 additions & 0 deletions docs/source/extensions/events.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
Event Handling
==============

.. autoclass:: netin.utils.Event
:members:
:undoc-members:
.. autoclass:: netin.utils.HasEvents
:members:
14 changes: 14 additions & 0 deletions docs/source/extensions/filters.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
Filters
==========

.. autoclass:: netin.filters.Filter
:members:

.. autoclass:: netin.filters.NoDoubleLinks
:members:

.. autoclass:: netin.filters.NoSelfLinks
:members:

.. autoclass:: netin.filters.ActiveNodes
:members:
29 changes: 29 additions & 0 deletions docs/source/extensions/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
Extending NetIn
===============

The package provides multiple interfaces to extend its functionalities.

Several classes implement the :class:`.HasEvents` interface which can be used to inject your own code at runtime.

.. toctree::
:maxdepth: 2

events

Alternatively, you can extend the existing class structure to facilitate the existing simulation code, changing only specific modeling details.
:class:`.Filter` and :class:`.LinkFormationMechanism` provide abstract classes that describe how target nodes are chosen during simulation.

.. toctree::
:maxdepth: 2

filters
mechanisms

Both custom and existing implementations (e.g., :class:`.Homophily`) can be used in custom models to reuse the existing simulation logic.
In that case, only some of the simulation methods have to be reimplemented.
For this purpose, several abstract base classes define varying levels of modelling abstractions.

.. toctree::
:maxdepth: 2

models
20 changes: 20 additions & 0 deletions docs/source/extensions/mechanisms.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
Link Formation Mechanisms (LFM)
===============================

.. autoclass:: netin.link_formation_mechanisms.LinkFormationMechanism
:members:

.. autoclass:: netin.link_formation_mechanisms.Uniform
:members:

.. autoclass:: netin.link_formation_mechanisms.PreferentialAttachment
:members:

.. autoclass:: netin.link_formation_mechanisms.InDegreePreferentialAttachment
:members:

.. autoclass:: netin.link_formation_mechanisms.Homophily
:members:

.. autoclass:: netin.link_formation_mechanisms.TriadicClosure
:members:
18 changes: 18 additions & 0 deletions docs/source/extensions/models.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
Model
=====

.. autoclass:: netin.models.Model
:members:
:private-members:

.. autoclass:: netin.models.BinaryClassModel
:members:
:private-members:

.. autoclass:: netin.models.UndirectedModel
:members:
:private-members:

.. autoclass:: netin.models.DirectedModel
:members:
:private-members:
14 changes: 0 additions & 14 deletions docs/source/generators/directed.rst

This file was deleted.

20 changes: 0 additions & 20 deletions docs/source/generators/undirected.rst

This file was deleted.

6 changes: 6 additions & 0 deletions docs/source/graphs/directed.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Directed Graphs
=================

.. autoclass:: netin.graphs.DiGraph
:members:
:inherited-members:
8 changes: 8 additions & 0 deletions docs/source/graphs/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
Graphs
=======
.. toctree::
:maxdepth: 1

undirected
directed

6 changes: 6 additions & 0 deletions docs/source/graphs/undirected.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Undirected Graphs
=================

.. autoclass:: netin.graphs.Graph
:members:
:inherited-members:
8 changes: 4 additions & 4 deletions docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@ Network Inequality
.. toctree::
:maxdepth: 3
:caption: Contents:
:glob:

graphs
algorithms
mechanisms
models/index
graphs/index
algorithms/index
statistics
visualizations
extensions/index

Indices and tables
==================
Expand Down
Binary file added docs/source/logo_simple_dark_bg.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/source/logo_twitter_v1_white_bg.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/source/logo_twitter_v2_white_bg.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 0 additions & 8 deletions docs/source/mechanisms.rst

This file was deleted.

10 changes: 10 additions & 0 deletions docs/source/models/directed.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
Directed Graph Models
=====================

.. autoclass:: netin.models.DPAModel
:members:
:inherited-members:

.. autoclass:: netin.models.DPAHModel
:members:
:inherited-members:
6 changes: 3 additions & 3 deletions docs/source/graphs.rst → docs/source/models/index.rst
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
Graphs
Models
=======

.. toctree::
:maxdepth: 2
:caption: Contents:
:glob:

generators/*
directed
undirected
22 changes: 22 additions & 0 deletions docs/source/models/undirected.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
Undirected Graph Models
=======================

.. autoclass:: netin.models.BarabasiAlbertModel
:members:
:inherited-members:

.. autoclass:: netin.models.HomophilyModel
:members:
:inherited-members:

.. autoclass:: netin.models.PAHModel
:members:
:inherited-members:

.. autoclass:: netin.models.PATCHModel
:members:
:inherited-members:

.. autoclass:: netin.models.CompoundLFM
:members:
:inherited-members:
Binary file added docs/source/netin-logo-bg-white.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/source/netin-logo-text-dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 0d8506f

Please sign in to comment.