| 
deba@481
 | 
     1  | 
/* -*- mode: C++; indent-tabs-mode: nil; -*-
  | 
| 
deba@481
 | 
     2  | 
 *
  | 
| 
deba@481
 | 
     3  | 
 * This file is a part of LEMON, a generic C++ optimization library.
  | 
| 
deba@481
 | 
     4  | 
 *
  | 
| 
alpar@1270
 | 
     5  | 
 * Copyright (C) 2003-2013
  | 
| 
deba@481
 | 
     6  | 
 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
  | 
| 
deba@481
 | 
     7  | 
 * (Egervary Research Group on Combinatorial Optimization, EGRES).
  | 
| 
deba@481
 | 
     8  | 
 *
  | 
| 
deba@481
 | 
     9  | 
 * Permission to use, modify and distribute this software is granted
  | 
| 
deba@481
 | 
    10  | 
 * provided that this copyright notice appears in all copies. For
  | 
| 
deba@481
 | 
    11  | 
 * precise terms see the accompanying LICENSE file.
  | 
| 
deba@481
 | 
    12  | 
 *
  | 
| 
deba@481
 | 
    13  | 
 * This software is provided "AS IS" with no warranty of any kind,
  | 
| 
deba@481
 | 
    14  | 
 * express or implied, and with no claim as to its suitability for any
  | 
| 
deba@481
 | 
    15  | 
 * purpose.
  | 
| 
deba@481
 | 
    16  | 
 *
  | 
| 
deba@481
 | 
    17  | 
 */
  | 
| 
deba@481
 | 
    18  | 
  | 
| 
deba@481
 | 
    19  | 
#include <lemon/lp_skeleton.h>
  | 
| 
deba@481
 | 
    20  | 
  | 
| 
deba@481
 | 
    21  | 
///\file
  | 
| 
deba@481
 | 
    22  | 
///\brief A skeleton file to implement LP solver interfaces
  | 
| 
deba@481
 | 
    23  | 
namespace lemon {
 | 
| 
deba@481
 | 
    24  | 
  | 
| 
deba@482
 | 
    25  | 
  int SkeletonSolverBase::_addCol()
  | 
| 
deba@481
 | 
    26  | 
  {
 | 
| 
deba@481
 | 
    27  | 
    return ++col_num;
  | 
| 
deba@481
 | 
    28  | 
  }
  | 
| 
deba@481
 | 
    29  | 
  | 
| 
deba@482
 | 
    30  | 
  int SkeletonSolverBase::_addRow()
  | 
| 
deba@481
 | 
    31  | 
  {
 | 
| 
deba@481
 | 
    32  | 
    return ++row_num;
  | 
| 
deba@481
 | 
    33  | 
  }
  | 
| 
deba@481
 | 
    34  | 
  | 
| 
deba@793
 | 
    35  | 
  int SkeletonSolverBase::_addRow(Value, ExprIterator, ExprIterator, Value)
  | 
| 
deba@793
 | 
    36  | 
  {
 | 
| 
deba@793
 | 
    37  | 
    return ++row_num;
  | 
| 
deba@793
 | 
    38  | 
  }
  | 
| 
deba@793
 | 
    39  | 
  | 
| 
deba@482
 | 
    40  | 
  void SkeletonSolverBase::_eraseCol(int) {}
 | 
| 
deba@482
 | 
    41  | 
  void SkeletonSolverBase::_eraseRow(int) {}
 | 
| 
deba@482
 | 
    42  | 
  | 
| 
deba@482
 | 
    43  | 
  void SkeletonSolverBase::_getColName(int, std::string &) const {}
 | 
| 
deba@482
 | 
    44  | 
  void SkeletonSolverBase::_setColName(int, const std::string &) {}
 | 
| 
deba@482
 | 
    45  | 
  int SkeletonSolverBase::_colByName(const std::string&) const { return -1; }
 | 
| 
deba@482
 | 
    46  | 
  | 
| 
deba@482
 | 
    47  | 
  void SkeletonSolverBase::_getRowName(int, std::string &) const {}
 | 
| 
deba@482
 | 
    48  | 
  void SkeletonSolverBase::_setRowName(int, const std::string &) {}
 | 
| 
deba@482
 | 
    49  | 
  int SkeletonSolverBase::_rowByName(const std::string&) const { return -1; }
 | 
| 
deba@482
 | 
    50  | 
  | 
| 
deba@482
 | 
    51  | 
  void SkeletonSolverBase::_setRowCoeffs(int, ExprIterator, ExprIterator) {}
 | 
| 
deba@482
 | 
    52  | 
  void SkeletonSolverBase::_getRowCoeffs(int, InsertIterator) const {}
 | 
| 
deba@482
 | 
    53  | 
  | 
| 
deba@482
 | 
    54  | 
  void SkeletonSolverBase::_setColCoeffs(int, ExprIterator, ExprIterator) {}
 | 
| 
deba@482
 | 
    55  | 
  void SkeletonSolverBase::_getColCoeffs(int, InsertIterator) const {}
 | 
| 
deba@482
 | 
    56  | 
  | 
| 
deba@482
 | 
    57  | 
  void SkeletonSolverBase::_setCoeff(int, int, Value) {}
 | 
| 
deba@482
 | 
    58  | 
  SkeletonSolverBase::Value SkeletonSolverBase::_getCoeff(int, int) const
  | 
| 
deba@482
 | 
    59  | 
  { return 0; }
 | 
| 
deba@482
 | 
    60  | 
  | 
| 
deba@482
 | 
    61  | 
  void SkeletonSolverBase::_setColLowerBound(int, Value) {}
 | 
| 
deba@482
 | 
    62  | 
  SkeletonSolverBase::Value SkeletonSolverBase::_getColLowerBound(int) const
  | 
| 
deba@482
 | 
    63  | 
  {  return 0; }
 | 
| 
deba@482
 | 
    64  | 
  | 
| 
deba@482
 | 
    65  | 
  void SkeletonSolverBase::_setColUpperBound(int, Value) {}
 | 
| 
deba@482
 | 
    66  | 
  SkeletonSolverBase::Value SkeletonSolverBase::_getColUpperBound(int) const
  | 
| 
deba@482
 | 
    67  | 
  {  return 0; }
 | 
| 
deba@482
 | 
    68  | 
  | 
| 
deba@482
 | 
    69  | 
  void SkeletonSolverBase::_setRowLowerBound(int, Value) {}
 | 
| 
deba@482
 | 
    70  | 
  SkeletonSolverBase::Value SkeletonSolverBase::_getRowLowerBound(int) const
  | 
| 
deba@482
 | 
    71  | 
  {  return 0; }
 | 
| 
deba@482
 | 
    72  | 
  | 
| 
deba@482
 | 
    73  | 
  void SkeletonSolverBase::_setRowUpperBound(int, Value) {}
 | 
| 
deba@482
 | 
    74  | 
  SkeletonSolverBase::Value SkeletonSolverBase::_getRowUpperBound(int) const
  | 
| 
deba@482
 | 
    75  | 
  {  return 0; }
 | 
| 
deba@482
 | 
    76  | 
  | 
| 
deba@482
 | 
    77  | 
  void SkeletonSolverBase::_setObjCoeffs(ExprIterator, ExprIterator) {}
 | 
| 
deba@482
 | 
    78  | 
  void SkeletonSolverBase::_getObjCoeffs(InsertIterator) const {};
 | 
| 
deba@482
 | 
    79  | 
  | 
| 
deba@482
 | 
    80  | 
  void SkeletonSolverBase::_setObjCoeff(int, Value) {}
 | 
| 
deba@482
 | 
    81  | 
  SkeletonSolverBase::Value SkeletonSolverBase::_getObjCoeff(int) const
  | 
| 
deba@482
 | 
    82  | 
  {  return 0; }
 | 
| 
deba@482
 | 
    83  | 
  | 
| 
deba@482
 | 
    84  | 
  void SkeletonSolverBase::_setSense(Sense) {}
 | 
| 
deba@482
 | 
    85  | 
  SkeletonSolverBase::Sense SkeletonSolverBase::_getSense() const
  | 
| 
deba@482
 | 
    86  | 
  { return MIN; }
 | 
| 
deba@482
 | 
    87  | 
  | 
| 
deba@482
 | 
    88  | 
  void SkeletonSolverBase::_clear() {
 | 
| 
deba@482
 | 
    89  | 
    row_num = col_num = 0;
  | 
| 
deba@481
 | 
    90  | 
  }
  | 
| 
deba@481
 | 
    91  | 
  | 
| 
deba@623
 | 
    92  | 
  void SkeletonSolverBase::_messageLevel(MessageLevel) {}
 | 
| 
deba@623
 | 
    93  | 
  | 
| 
alpar@1231
 | 
    94  | 
  void SkeletonSolverBase::_write(std::string, std::string) const {}
 | 
| 
alpar@1231
 | 
    95  | 
  | 
| 
deba@482
 | 
    96  | 
  LpSkeleton::SolveExitStatus LpSkeleton::_solve() { return SOLVED; }
 | 
| 
deba@481
 | 
    97  | 
  | 
| 
deba@482
 | 
    98  | 
  LpSkeleton::Value LpSkeleton::_getPrimal(int) const { return 0; }
 | 
| 
deba@482
 | 
    99  | 
  LpSkeleton::Value LpSkeleton::_getDual(int) const { return 0; }
 | 
| 
deba@482
 | 
   100  | 
  LpSkeleton::Value LpSkeleton::_getPrimalValue() const { return 0; }
 | 
| 
deba@481
 | 
   101  | 
  | 
| 
deba@482
 | 
   102  | 
  LpSkeleton::Value LpSkeleton::_getPrimalRay(int) const { return 0; }
 | 
| 
deba@482
 | 
   103  | 
  LpSkeleton::Value LpSkeleton::_getDualRay(int) const { return 0; }
 | 
| 
deba@481
 | 
   104  | 
  | 
| 
deba@482
 | 
   105  | 
  LpSkeleton::ProblemType LpSkeleton::_getPrimalType() const
  | 
| 
deba@482
 | 
   106  | 
  { return UNDEFINED; }
 | 
| 
deba@481
 | 
   107  | 
  | 
| 
deba@482
 | 
   108  | 
  LpSkeleton::ProblemType LpSkeleton::_getDualType() const
  | 
| 
deba@482
 | 
   109  | 
  { return UNDEFINED; }
 | 
| 
deba@481
 | 
   110  | 
  | 
| 
deba@482
 | 
   111  | 
  LpSkeleton::VarStatus LpSkeleton::_getColStatus(int) const
  | 
| 
deba@482
 | 
   112  | 
  { return BASIC; }
 | 
| 
deba@481
 | 
   113  | 
  | 
| 
deba@482
 | 
   114  | 
  LpSkeleton::VarStatus LpSkeleton::_getRowStatus(int) const
  | 
| 
deba@482
 | 
   115  | 
  { return BASIC; }
 | 
| 
deba@481
 | 
   116  | 
  | 
| 
alpar@587
 | 
   117  | 
  LpSkeleton* LpSkeleton::newSolver() const
  | 
| 
deba@482
 | 
   118  | 
  { return static_cast<LpSkeleton*>(0); }
 | 
| 
deba@481
 | 
   119  | 
  | 
| 
alpar@587
 | 
   120  | 
  LpSkeleton* LpSkeleton::cloneSolver() const
  | 
| 
deba@482
 | 
   121  | 
  { return static_cast<LpSkeleton*>(0); }
 | 
| 
deba@481
 | 
   122  | 
  | 
| 
deba@482
 | 
   123  | 
  const char* LpSkeleton::_solverName() const { return "LpSkeleton"; }
 | 
| 
deba@481
 | 
   124  | 
  | 
| 
deba@482
 | 
   125  | 
  MipSkeleton::SolveExitStatus MipSkeleton::_solve()
  | 
| 
deba@482
 | 
   126  | 
  { return SOLVED; }
 | 
| 
deba@481
 | 
   127  | 
  | 
| 
deba@482
 | 
   128  | 
  MipSkeleton::Value MipSkeleton::_getSol(int) const { return 0; }
 | 
| 
deba@482
 | 
   129  | 
  MipSkeleton::Value MipSkeleton::_getSolValue() const { return 0; }
 | 
| 
deba@481
 | 
   130  | 
  | 
| 
deba@482
 | 
   131  | 
  MipSkeleton::ProblemType MipSkeleton::_getType() const
  | 
| 
deba@482
 | 
   132  | 
  { return UNDEFINED; }
 | 
| 
deba@481
 | 
   133  | 
  | 
| 
alpar@587
 | 
   134  | 
  MipSkeleton* MipSkeleton::newSolver() const
  | 
| 
deba@482
 | 
   135  | 
  { return static_cast<MipSkeleton*>(0); }
 | 
| 
deba@481
 | 
   136  | 
  | 
| 
alpar@587
 | 
   137  | 
  MipSkeleton* MipSkeleton::cloneSolver() const
  | 
| 
deba@482
 | 
   138  | 
  { return static_cast<MipSkeleton*>(0); }
 | 
| 
deba@481
 | 
   139  | 
  | 
| 
deba@482
 | 
   140  | 
  const char* MipSkeleton::_solverName() const { return "MipSkeleton"; }
 | 
| 
deba@481
 | 
   141  | 
  | 
| 
deba@481
 | 
   142  | 
} //namespace lemon
  | 
| 
deba@481
 | 
   143  | 
  |