summaryrefslogtreecommitdiffstats
path: root/Wrappers/Python/ccpi/optimisation/functions/IndicatorBox.py
diff options
context:
space:
mode:
Diffstat (limited to 'Wrappers/Python/ccpi/optimisation/functions/IndicatorBox.py')
-rwxr-xr-xWrappers/Python/ccpi/optimisation/functions/IndicatorBox.py17
1 files changed, 11 insertions, 6 deletions
diff --git a/Wrappers/Python/ccpi/optimisation/functions/IndicatorBox.py b/Wrappers/Python/ccpi/optimisation/functions/IndicatorBox.py
index ac8978a..9e9e55c 100755
--- a/Wrappers/Python/ccpi/optimisation/functions/IndicatorBox.py
+++ b/Wrappers/Python/ccpi/optimisation/functions/IndicatorBox.py
@@ -30,20 +30,25 @@ class IndicatorBox(Function):
r'''Indicator function for box constraint
.. math::
- f(x) = \mathbb{I}_{[a, b]} = \begin{cases}
-
- 0, if x\in[a, b]
- \infty, otherwise
- \end{cases}
+
+ f(x) = \mathbb{I}_{[a, b]} = \begin{cases}
+ 0, \text{ if } x \in [a, b] \\
+ \infty, \text{otherwise}
+ \end{cases}
'''
def __init__(self,lower=-numpy.inf,upper=numpy.inf):
+ '''creator
+ :param lower: lower bound
+ :type lower: float, default = :code:`-numpy.inf`
+ :param upper: upper bound
+ :type upper: float, optional, default = :code:`numpy.inf`
super(IndicatorBox, self).__init__()
self.lower = lower
self.upper = upper
-
+ '''
def __call__(self,x):