Ejemplo n.º 1
0
    def residual(self):
       """The residual of the constraint.

       Returns
       -------
       Expression
       """
       min_eig = cvxtypes.lambda_min()(self._expr + self._expr.T)/2
       return cvxtypes.neg()(min_eig)
Ejemplo n.º 2
0
    def residual(self):
        """The residual of the constraint.

        Returns
        -------
        Expression
        """
        # TODO wrong. Also requires symmetry.
        min_eig = cvxtypes.lambda_min()(self.args[0] + self.args[0].T) / 2
        return cvxtypes.neg()(min_eig)
Ejemplo n.º 3
0
    def residual(self):
        """The residual of the constraint.

        Returns
        -------
        NumPy.ndarray
        """
        if self.expr.value is None:
            return None
        min_eig = cvxtypes.lambda_min()(self.args[0] + self.args[0].T) / 2
        return cvxtypes.neg()(min_eig).value