declearn.main.utils.ConstraintSet
Utility class to wrap sets of Constraint instances.
Source code in declearn/main/utils/_constraints.py
125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 |
|
saturated: bool
property
Return whether any wrapped constraint is saturated.
__init__(*constraints)
Wrap an ensemble of Constraint objects.
Source code in declearn/main/utils/_constraints.py
128 129 130 131 132 133 |
|
get_values()
Return the wrapped constraints' current values, as a dict.
Returns:
Name | Type | Description |
---|---|---|
values |
dict[str, float]
|
{constraint.name: constraint.value} dictionary. If multiple constraints have the same name, suffixes will be appended in order to disambiguate them. |
Source code in declearn/main/utils/_constraints.py
149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 |
|
increment()
Increment each and every wrapped constraint.
Source code in declearn/main/utils/_constraints.py
135 136 137 138 139 140 |
|