lemon/lp_skeleton.cc
author kpeter
Thu, 13 Nov 2008 16:17:50 +0000
changeset 2630 d239741cfd44
parent 2553 bfced05fa852
permissions -rw-r--r--
Various improvements in NetworkSimplex.

- Faster variant of "Altering Candidate List" pivot rule using make_heap
instead of partial_sort.
- Doc improvements.
- Removing unecessary inline keywords.
alpar@1254
     1
/* -*- C++ -*-
alpar@1254
     2
 *
alpar@1956
     3
 * This file is a part of LEMON, a generic C++ optimization library
alpar@1956
     4
 *
alpar@2553
     5
 * Copyright (C) 2003-2008
alpar@1956
     6
 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
alpar@1359
     7
 * (Egervary Research Group on Combinatorial Optimization, EGRES).
alpar@1254
     8
 *
alpar@1254
     9
 * Permission to use, modify and distribute this software is granted
alpar@1254
    10
 * provided that this copyright notice appears in all copies. For
alpar@1254
    11
 * precise terms see the accompanying LICENSE file.
alpar@1254
    12
 *
alpar@1254
    13
 * This software is provided "AS IS" with no warranty of any kind,
alpar@1254
    14
 * express or implied, and with no claim as to its suitability for any
alpar@1254
    15
 * purpose.
alpar@1254
    16
 *
alpar@1254
    17
 */
alpar@1254
    18
alpar@1313
    19
#include <lemon/lp_skeleton.h>
alpar@1254
    20
alpar@1254
    21
///\file
alpar@1254
    22
///\brief A skeleton file to implement LP solver interfaces
alpar@1254
    23
namespace lemon {
alpar@1254
    24
  
deba@2605
    25
  LpSolverBase* LpSkeleton::_newLp()
alpar@1364
    26
  {
alpar@1368
    27
    LpSolverBase *tmp=0;
deba@2605
    28
    return tmp;
alpar@1364
    29
  }
alpar@1364
    30
  
deba@2605
    31
  LpSolverBase* LpSkeleton::_copyLp()
alpar@1364
    32
  {
alpar@1368
    33
    LpSolverBase *tmp=0;
deba@2605
    34
    return tmp;
alpar@1364
    35
  }
alpar@1364
    36
alpar@1313
    37
  int LpSkeleton::_addCol()
alpar@1254
    38
  {
alpar@1273
    39
    return ++col_num;
alpar@1254
    40
  }
alpar@1254
    41
  
alpar@1313
    42
  int LpSkeleton::_addRow() 
alpar@1254
    43
  {
alpar@1273
    44
    return ++row_num;
alpar@1254
    45
  }
alpar@1254
    46
  
athos@1432
    47
  void LpSkeleton::_eraseCol(int ) {
athos@1432
    48
  }
athos@1432
    49
  
athos@1432
    50
  void LpSkeleton::_eraseRow(int) {
athos@1432
    51
  }
athos@1432
    52
deba@2366
    53
  void LpSkeleton::_getColName(int, std::string &) const {
alpar@1895
    54
  }
alpar@1895
    55
  
alpar@1895
    56
  
alpar@1895
    57
  void LpSkeleton::_setColName(int, const std::string &) {
alpar@1895
    58
  }
deba@2366
    59
deba@2366
    60
  int LpSkeleton::_colByName(const std::string&) const { return -1; }
alpar@1895
    61
  
alpar@1895
    62
  
deba@2364
    63
  void LpSkeleton::_setRowCoeffs(int, ConstRowIterator, ConstRowIterator) {
deba@2364
    64
  }
deba@2364
    65
deba@2366
    66
  void LpSkeleton::_getRowCoeffs(int, RowIterator) const {
alpar@1254
    67
  }
alpar@1254
    68
  
deba@2364
    69
  void LpSkeleton::_setColCoeffs(int, ConstColIterator, ConstColIterator) {
deba@2364
    70
  }
deba@2364
    71
deba@2366
    72
  void LpSkeleton::_getColCoeffs(int, ColIterator) const {
alpar@1254
    73
  }
athos@1431
    74
athos@1431
    75
  void LpSkeleton::_setCoeff(int, int, Value )
athos@1431
    76
  {
athos@1431
    77
  }
athos@1431
    78
deba@2366
    79
  LpSkeleton::Value LpSkeleton::_getCoeff(int, int) const
athos@2324
    80
  {
athos@2324
    81
    return 0;
athos@2324
    82
  }
athos@2324
    83
athos@1431
    84
alpar@1362
    85
  void LpSkeleton::_setColLowerBound(int, Value)
alpar@1254
    86
  {
alpar@1254
    87
  }
alpar@1254
    88
  
deba@2366
    89
  LpSkeleton::Value LpSkeleton::_getColLowerBound(int) const
athos@2328
    90
  {
athos@2328
    91
    return 0;
athos@2328
    92
  }
athos@2328
    93
  
alpar@1362
    94
  void LpSkeleton::_setColUpperBound(int, Value)
alpar@1254
    95
  {
alpar@1254
    96
  }
athos@2328
    97
deba@2366
    98
  LpSkeleton::Value LpSkeleton::_getColUpperBound(int) const
athos@2328
    99
  {
athos@2328
   100
    return 0;
athos@2328
   101
  }
alpar@1254
   102
  
athos@1405
   103
//   void LpSkeleton::_setRowLowerBound(int, Value)
athos@1405
   104
//   {
athos@1405
   105
//   }
alpar@1254
   106
  
athos@1405
   107
//   void LpSkeleton::_setRowUpperBound(int, Value)
athos@1405
   108
//   {
athos@1405
   109
//   }
athos@1389
   110
alpar@1390
   111
  void LpSkeleton::_setRowBounds(int, Value, Value)
athos@1389
   112
  {
athos@1389
   113
  }
athos@2328
   114
deba@2366
   115
  void LpSkeleton::_getRowBounds(int, Value&, Value&) const
athos@2328
   116
  {
athos@2328
   117
  }
alpar@1254
   118
  
alpar@1362
   119
  void LpSkeleton::_setObjCoeff(int, Value)
alpar@1254
   120
  {
alpar@1254
   121
  }
alpar@1263
   122
deba@2366
   123
  LpSkeleton::Value LpSkeleton::_getObjCoeff(int) const
deba@2366
   124
  {
athos@2324
   125
    return 0;
athos@2324
   126
  }
athos@2324
   127
alpar@1313
   128
  void LpSkeleton::_setMax()
alpar@1312
   129
  {
alpar@1312
   130
  }
alpar@1390
   131
alpar@1313
   132
  void LpSkeleton::_setMin()
alpar@1312
   133
  {
alpar@1312
   134
  }
alpar@1312
   135
deba@2366
   136
  bool LpSkeleton::_isMax() const
athos@2324
   137
  {
athos@2324
   138
    return true;
athos@2324
   139
  }
athos@2324
   140
athos@2324
   141
alpar@1390
   142
  void LpSkeleton::_clearObj()
alpar@1390
   143
  {
alpar@1390
   144
  }
alpar@1390
   145
  
alpar@1313
   146
  LpSkeleton::SolveExitStatus LpSkeleton::_solve()
alpar@1263
   147
  {
alpar@1293
   148
    return SOLVED;
alpar@1263
   149
  }
alpar@1263
   150
deba@2366
   151
  LpSkeleton::Value LpSkeleton::_getPrimal(int) const
alpar@1263
   152
  {
alpar@1263
   153
    return 0;
alpar@1263
   154
  }
alpar@1254
   155
  
deba@2366
   156
  LpSkeleton::Value LpSkeleton::_getDual(int) const
klao@1796
   157
  {
klao@1796
   158
    return 0;
klao@1796
   159
  }
klao@1796
   160
  
deba@2366
   161
  LpSkeleton::Value LpSkeleton::_getPrimalValue() const
alpar@1312
   162
  {
alpar@1312
   163
    return 0;
alpar@1312
   164
  }
alpar@1312
   165
  
deba@2366
   166
  LpSkeleton::SolutionStatus LpSkeleton::_getPrimalStatus() const
alpar@1294
   167
  {
athos@1460
   168
    return UNDEFINED;
athos@1460
   169
  }
athos@1460
   170
deba@2366
   171
  LpSkeleton::SolutionStatus LpSkeleton::_getDualStatus() const
athos@1460
   172
  {
athos@1460
   173
    return UNDEFINED;
athos@1460
   174
  }
athos@1460
   175
deba@2366
   176
  LpSkeleton::ProblemTypes LpSkeleton::_getProblemType() const
athos@1460
   177
  {
athos@1460
   178
    return UNKNOWN;
alpar@1294
   179
  }
alpar@1843
   180
deba@2366
   181
  bool LpSkeleton::_isBasicCol(int) const
alpar@1843
   182
  {
alpar@1843
   183
    return true;
alpar@1843
   184
  }
alpar@1843
   185
alpar@1254
   186
} //namespace lemon
alpar@1254
   187