def __init__(self,c,A,b,l,u,x=None,lam=None,mu=None,pi=None):
        """
        Linear program class.
        
        Parameters
        ----------
        c : vector
        A : matrix
        l : vector
        u : vector
        x : vector
        """

        OptProblem.__init__(self)

        self.c = c
        self.A = coo_matrix(A)
        self.b = b
        self.u = u
        self.l = l

        self.n = self.get_num_primal_variables()

        self.f = np.zeros(0)
        self.J = coo_matrix((0,self.n))
        self.H_combined = coo_matrix((self.n,self.n))
        self.Hphi = coo_matrix((self.n,self.n))
        self.gphi = self.c

        self.x = x
        
        self.lam = lam
        self.mu = mu
        self.pi = pi

        # Check data
        assert(c.size == self.n)
        assert(c.size == A.shape[1])
        assert(b.size == A.shape[0])
        assert(u.size == l.size)
        assert(u.size == c.size)
        if x is not None:
            assert(x.size == A.shape[1])
        if lam is not None:
            assert(lam.size == A.shape[0])
        if mu is not None:
            assert(mu.size == u.size)
        if pi is not None:
            assert(pi.size == u.size)
def __init__ ( self , c , A , b , l , u , x = None , lam = None , mu = None , pi = None ) : OptProblem . __init__ ( self ) self . c = c self . A = coo_matrix ( A ) self . b = b self . u = u self . l = l self . n = self . get_num_primal_variables ( ) self . f = np . zeros ( 0 ) self . J = coo_matrix ( ( 0 , self . n ) ) self . H_combined = coo_matrix ( ( self . n , self . n ) ) self . Hphi = coo_matrix ( ( self . n , self . n ) ) self . gphi = self . c self . x = x self . lam = lam self . mu = mu self . pi = pi assert ( c . size == self . n ) assert ( c . size == A . shape [ 1 ] ) assert ( b . size == A . shape [ 0 ] ) assert ( u . size == l . size ) assert ( u . size == c . size ) if x is not None : assert ( x . size == A . shape [ 1 ] ) if lam is not None : assert ( lam . size == A . shape [ 0 ] ) if mu is not None : assert ( mu . size == u . size ) if pi is not None : assert ( pi . size == u . size )
Linear program class.
        
        Parameters
        ----------
        c : vector
        A : matrix
        l : vector
        u : vector
        x : vector