def _compute_equations(self, x, verbose=False):
<EOL>normals = []<EOL>values = []<EOL>signs = []<EOL>error = <NUM_LIT:0.0><EOL>if verbose:<EOL><INDENT>print()<EOL>print('<STR_LIT:U+0020>'.join('<STR_LIT>' % val for val in x), end='<STR_LIT:U+0020>')<EOL>active_str = '<STR_LIT>'<EOL><DEDENT>for i, (sign, equation) in enumerate(self.equations):<EOL><INDENT>value, normal = equation(x)<EOL>if (i < len(self.lock) and self.lock[i]) or(sign==-<NUM_LIT:1> and value > -self.threshold) or(sign==<NUM_LIT:0>) or (sign==<NUM_LIT:1> and value < self.threshold):<EOL><INDENT>values.append(value)<EOL>normals.append(normal)<EOL>signs.append(sign)<EOL>error += value**<NUM_LIT:2><EOL>if verbose:<EOL><INDENT>active_str += '<STR_LIT:X>'<EOL><DEDENT>if i < len(self.lock):<EOL><INDENT>self.lock[i] = True<EOL><DEDENT><DEDENT>elif verbose:<EOL><INDENT>active_str += '<STR_LIT:->'<EOL><DEDENT><DEDENT>error = np.sqrt(error)<EOL>normals = np.array(normals, float)<EOL>values = np.array(values, float)<EOL>signs = np.array(signs, int)<EOL>if verbose:<EOL><INDENT>print('<STR_LIT>' % active_str, end='<STR_LIT:U+0020>')<EOL>if error < self.threshold:<EOL><INDENT>print('<STR_LIT:OK>')<EOL><DEDENT>else:<EOL><INDENT>print('<STR_LIT>' % error)<EOL><DEDENT><DEDENT>return normals, values, error, signs<EOL>
Compute the values and the normals (gradients) of active constraints.

           Arguments:
            | ``x`` -- The unknowns.