source: sasview/src/sas/qtgui/Perspectives/Fitting/Constraints.py @ d3c0b95

ESS_GUIESS_GUI_DocsESS_GUI_batch_fittingESS_GUI_bumps_abstractionESS_GUI_iss1116ESS_GUI_iss879ESS_GUI_iss959ESS_GUI_openclESS_GUI_orderingESS_GUI_sync_sascalc
Last change on this file since d3c0b95 was eae226b, checked in by Piotr Rozyczko <rozyczko@…>, 7 years ago

More functionality for single model constraints SASVIEW-843

  • Property mode set to 100755
File size: 1.3 KB
Line 
1class Constraint(object):
2    """
3    Internal representation of a single parameter constraint
4    """
5    def __init__(self, parent=None, param=None, value=0.0, min=None, max=None, func=None):
6        self._value = value
7        self._param = param
8        self._func = func
9        self.active = False
10        self._min = min
11        self._max = max
12
13    @property
14    def value(self):
15        return self._value
16
17    @value.setter
18    def value(self, val):
19        self._value = val
20
21    @property
22    def param(self):
23        return self._param
24
25    @param.setter
26    def param(self, val):
27        self._param = val
28
29    @property
30    def func(self):
31        return self._func
32
33    @func.setter
34    def func(self, val):
35        self._func = val
36
37    @property
38    def min(self):
39        return self._min
40
41    @min.setter
42    def min(self, val):
43        self._min = val
44
45    @property
46    def max(self):
47        return self._max
48
49    @max.setter
50    def max(self, val):
51        self._max = val
52
53    def delete(self, constraint=None):
54        pass
55
56
57class ConstrainedParameters(object):
58    """
59    Representation of two constrained parameters
60    """
61    def __init__(self, parent=None):
62        pass
63
64    def add(self, constraint=None):
65        pass
66
67    def delete(self, constraint=None):
68        pass
69
Note: See TracBrowser for help on using the repository browser.