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