Skip to content

Commit

Permalink
doc: Correct escape of math.
Browse files Browse the repository at this point in the history
Fixes #173
  • Loading branch information
vtraag committed Mar 18, 2024
1 parent 803f52c commit 4f66076
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
10 changes: 5 additions & 5 deletions src/leidenalg/Optimiser.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,19 +24,19 @@ class Optimiser(object):
algorithm that cannot be translated well in this framework: when merging
subcommunities in the refinement procedure, it does not consider whether they
are sufficiently well connected to the rest of the community. This
implementation therefore does not guarantee subpartition :math:`\gamma`-density.
implementation therefore does not guarantee subpartition :math:`\\gamma`-density.
However, all other guarantees still hold:
After each iteration
1. :math:`\gamma`-separation
2. :math:`\gamma`-connectivity
1. :math:`\\gamma`-separation
2. :math:`\\gamma`-connectivity
After a stable iteration
3. Node optimality
4. Some subsets are locally optimally assigned
Asymptotically
5. Uniform :math:`\gamma`-density
5. Uniform :math:`\\gamma`-density
6. Subset optimality
The optimiser class provides a number of different methods for optimising a
Expand Down Expand Up @@ -349,7 +349,7 @@ def optimise_partition_multiplex(self, partitions, layer_weights=None, n_iterati
layer :math:`k` and the weight by :math:`\\lambda_k`, the overall quality
is then
.. math:: Q = \sum_k \\lambda_k Q_k.
.. math:: Q = \\sum_k \\lambda_k Q_k.
This is particularly useful for graphs containing negative links. When
separating the graph in two graphs, the one containing only the positive
Expand Down
4 changes: 2 additions & 2 deletions src/leidenalg/VertexPartition.py
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,7 @@ class ModularityVertexPartition(MutableVertexPartition):
Note that for directed graphs a slightly different formulation is used, as
proposed by Leicht and Newman [2]:
.. math:: Q = \\frac{1}{m} \\sum_{ij} \\left(A_{ij} - \\frac{k_i^\mathrm{out} k_j^\mathrm{in}}{m} \\right)\\delta(\\sigma_i, \\sigma_j),
.. math:: Q = \\frac{1}{m} \\sum_{ij} \\left(A_{ij} - \\frac{k_i^\\mathrm{out} k_j^\\mathrm{in}}{m} \\right)\\delta(\\sigma_i, \\sigma_j),
where :math:`k_i^\\mathrm{out}` and :math:`k_i^\\mathrm{in}` refers to
respectively the outdegree and indegree of node :math:`i`, and :math:`A_{ij}`
Expand Down Expand Up @@ -785,7 +785,7 @@ class RBConfigurationVertexPartition(LinearResolutionParameterVertexPartition):
Note that for directed graphs a slightly different formulation is used, as
proposed by Leicht and Newman [2]:
.. math:: Q = \\sum_{ij} \\left(A_{ij} - \\gamma \\frac{k_i^\mathrm{out} k_j^\mathrm{in}}{m} \\right)\\delta(\\sigma_i, \\sigma_j),
.. math:: Q = \\sum_{ij} \\left(A_{ij} - \\gamma \\frac{k_i^\\mathrm{out} k_j^\\mathrm{in}}{m} \\right)\\delta(\\sigma_i, \\sigma_j),
where :math:`k_i^\\mathrm{out}` and :math:`k_i^\\mathrm{in}` refers to
respectively the outdegree and indegree of node :math:`i`, and :math:`A_{ij}`
Expand Down

0 comments on commit 4f66076

Please # to comment.