parameters: (self)
return_statement: return (self.is_dcp() and self.objective.args[0].is_qpwa())
docstring: Is problem a quadratic program?
docstring_summary: Is problem a quadratic program?
docstring_tokens: Is problem a quadratic program?
function: def is_qp(self) -> bool:
          """Is problem a quadratic program?
          """
          for c in self.constraints:
              if not (isinstance(c, (Equality, Zero)) or c.args[0].is_pwl()):
                  return False
          for var in self.variables():
              if var.is_psd() or var.is_nsd():
                  return False
          return (self.is_dcp() and self.objective.args[0].is_qpwa())
function_tokens: def is_qp ( self ) -> bool : for c in self . constraints : if not ( isinstance ( c , ( Equality , Zero ) ) or c . args [ 0 ] . is_pwl ( ) ) : return False for var in self . variables ( ) : if var . is_psd ( ) or var . is_nsd ( ) : return False return ( self . is_dcp ( ) and self . objective . args [ 0 ] . is_qpwa ( ) )