Skip to content

Commit

Permalink
improved docstrings for lava 0.5.1 release (#115)
Browse files Browse the repository at this point in the history
* improved docstrings for lava 0.5.1 release

* lint

Co-authored-by: GaboFGuerra <83413252+GaboFGuerra@users.noreply.github.com>
  • Loading branch information
weidel-p and GaboFGuerra committed Oct 28, 2022
1 parent 7b79b08 commit 8ec2da5
Show file tree
Hide file tree
Showing 3 changed files with 186 additions and 167 deletions.
18 changes: 12 additions & 6 deletions src/lava/lib/optimization/problems/constraints.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,15 +111,17 @@ class EqualityConstraints(CoefficientTensorsMixin):
h(x) = 0
where the terms of :math:`h(x)` have the form:
.. math::
g(x)= \sum_{ijk...} \epsilon_{ijk...} \cdot x_i \cdot x_j
\cdot x_k \cdot ...
Parameters
----------
coefficients: tensor coefficients defining the constraints.
"""
coefficients: tensor
coefficients defining the constraints.
"""
def __init__(self, *coefficients: CTType):
super().__init__(*coefficients)

Expand All @@ -131,16 +133,20 @@ class InequalityConstraints(CoefficientTensorsMixin):
.. math::
g(x) \leq 0
where the terms of :math:`g(x)` have the form:
.. math::
\sum_{ijk...} \epsilon_{ijk...} \cdot x_i \cdot x_j \cdot x_k \cdot
...
\sum_{ijk...} \epsilon_{ijk...} \cdot x_i \cdot x_j \cdot x_k
\cdot ...
Parameters
----------
coefficients: tensor coefficients defining the constraints.
"""
coefficients: tensor
coefficients defining the constraints.
"""
def __init__(self, *coefficients: CTType):
super().__init__(*coefficients)

Expand Down
Loading

0 comments on commit 8ec2da5

Please sign in to comment.