src/work/athos/lp/lp_solver_skeleton.h
author hegyi
Fri, 01 Apr 2005 09:44:29 +0000
changeset 1289 142633fc5014
parent 1263 a490938ad0aa
child 1293 8ede2a6b2594
permissions -rw-r--r--
Graph displayer is now displaying nodes. Edges remain still undisplayed yet.
     1 /* -*- C++ -*-
     2  * src/lemon/lp_solver_skeleton.h
     3  * - Part of LEMON, a generic C++ optimization library
     4  *
     5  * Copyright (C) 2005 Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
     6  * (Egervary Combinatorial Optimization Research Group, EGRES).
     7  *
     8  * Permission to use, modify and distribute this software is granted
     9  * provided that this copyright notice appears in all copies. For
    10  * precise terms see the accompanying LICENSE file.
    11  *
    12  * This software is provided "AS IS" with no warranty of any kind,
    13  * express or implied, and with no claim as to its suitability for any
    14  * purpose.
    15  *
    16  */
    17 
    18 #ifndef LEMON_LP_SOLVER_SKELETON
    19 #define LEMON_LP_SOLVER_SKELETON
    20 
    21 #include"lp_base.h"
    22 
    23 ///\file
    24 ///\brief A skeleton file to implement LP solver interfaces
    25 namespace lemon {
    26   
    27   ///A skeleton class to implement LP solver interfaces
    28   class LpSolverSkeleton :public LpSolverBase {
    29     int col_num,row_num;
    30     
    31   protected:
    32     virtual int _addCol();
    33     virtual int _addRow();
    34     virtual void _setRowCoeffs(int i, 
    35 			       int length,
    36                                int  const * indices, 
    37                                Value  const * values );
    38     virtual void _setColCoeffs(int i, 
    39 			       int length,
    40                                int  const * indices, 
    41                                Value  const * values);
    42     virtual void _setColLowerBound(int i, Value value);
    43     virtual void _setColUpperBound(int i, Value value);
    44     virtual void _setRowLowerBound(int i, Value value);
    45     virtual void _setRowUpperBound(int i, Value value);
    46     virtual void _setObjCoeff(int i, Value obj_coef);
    47     virtual SolutionType _solve();
    48     virtual Value _getSolution(int i);
    49   public:
    50     LpSolverSkeleton() : LpSolverBase(), col_num(0), row_num(0) {}
    51   };  
    52 
    53 } //namespace lemon
    54 
    55 #endif // LEMON_LP_SOLVER_SKELETON