lemon/lp_skeleton.cc
changeset 784 1a7fe3bef514
parent 576 745e182d0139
child 877 141f9c0db4a3
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/lemon/lp_skeleton.cc	Thu Nov 05 15:50:01 2009 +0100
     1.3 @@ -0,0 +1,141 @@
     1.4 +/* -*- mode: C++; indent-tabs-mode: nil; -*-
     1.5 + *
     1.6 + * This file is a part of LEMON, a generic C++ optimization library.
     1.7 + *
     1.8 + * Copyright (C) 2003-2008
     1.9 + * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
    1.10 + * (Egervary Research Group on Combinatorial Optimization, EGRES).
    1.11 + *
    1.12 + * Permission to use, modify and distribute this software is granted
    1.13 + * provided that this copyright notice appears in all copies. For
    1.14 + * precise terms see the accompanying LICENSE file.
    1.15 + *
    1.16 + * This software is provided "AS IS" with no warranty of any kind,
    1.17 + * express or implied, and with no claim as to its suitability for any
    1.18 + * purpose.
    1.19 + *
    1.20 + */
    1.21 +
    1.22 +#include <lemon/lp_skeleton.h>
    1.23 +
    1.24 +///\file
    1.25 +///\brief A skeleton file to implement LP solver interfaces
    1.26 +namespace lemon {
    1.27 +
    1.28 +  int SkeletonSolverBase::_addCol()
    1.29 +  {
    1.30 +    return ++col_num;
    1.31 +  }
    1.32 +
    1.33 +  int SkeletonSolverBase::_addRow()
    1.34 +  {
    1.35 +    return ++row_num;
    1.36 +  }
    1.37 +
    1.38 +  int SkeletonSolverBase::_addRow(Value, ExprIterator, ExprIterator, Value)
    1.39 +  {
    1.40 +    return ++row_num;
    1.41 +  }
    1.42 +
    1.43 +  void SkeletonSolverBase::_eraseCol(int) {}
    1.44 +  void SkeletonSolverBase::_eraseRow(int) {}
    1.45 +
    1.46 +  void SkeletonSolverBase::_getColName(int, std::string &) const {}
    1.47 +  void SkeletonSolverBase::_setColName(int, const std::string &) {}
    1.48 +  int SkeletonSolverBase::_colByName(const std::string&) const { return -1; }
    1.49 +
    1.50 +  void SkeletonSolverBase::_getRowName(int, std::string &) const {}
    1.51 +  void SkeletonSolverBase::_setRowName(int, const std::string &) {}
    1.52 +  int SkeletonSolverBase::_rowByName(const std::string&) const { return -1; }
    1.53 +
    1.54 +  void SkeletonSolverBase::_setRowCoeffs(int, ExprIterator, ExprIterator) {}
    1.55 +  void SkeletonSolverBase::_getRowCoeffs(int, InsertIterator) const {}
    1.56 +
    1.57 +  void SkeletonSolverBase::_setColCoeffs(int, ExprIterator, ExprIterator) {}
    1.58 +  void SkeletonSolverBase::_getColCoeffs(int, InsertIterator) const {}
    1.59 +
    1.60 +  void SkeletonSolverBase::_setCoeff(int, int, Value) {}
    1.61 +  SkeletonSolverBase::Value SkeletonSolverBase::_getCoeff(int, int) const
    1.62 +  { return 0; }
    1.63 +
    1.64 +  void SkeletonSolverBase::_setColLowerBound(int, Value) {}
    1.65 +  SkeletonSolverBase::Value SkeletonSolverBase::_getColLowerBound(int) const
    1.66 +  {  return 0; }
    1.67 +
    1.68 +  void SkeletonSolverBase::_setColUpperBound(int, Value) {}
    1.69 +  SkeletonSolverBase::Value SkeletonSolverBase::_getColUpperBound(int) const
    1.70 +  {  return 0; }
    1.71 +
    1.72 +  void SkeletonSolverBase::_setRowLowerBound(int, Value) {}
    1.73 +  SkeletonSolverBase::Value SkeletonSolverBase::_getRowLowerBound(int) const
    1.74 +  {  return 0; }
    1.75 +
    1.76 +  void SkeletonSolverBase::_setRowUpperBound(int, Value) {}
    1.77 +  SkeletonSolverBase::Value SkeletonSolverBase::_getRowUpperBound(int) const
    1.78 +  {  return 0; }
    1.79 +
    1.80 +  void SkeletonSolverBase::_setObjCoeffs(ExprIterator, ExprIterator) {}
    1.81 +  void SkeletonSolverBase::_getObjCoeffs(InsertIterator) const {};
    1.82 +
    1.83 +  void SkeletonSolverBase::_setObjCoeff(int, Value) {}
    1.84 +  SkeletonSolverBase::Value SkeletonSolverBase::_getObjCoeff(int) const
    1.85 +  {  return 0; }
    1.86 +
    1.87 +  void SkeletonSolverBase::_setSense(Sense) {}
    1.88 +  SkeletonSolverBase::Sense SkeletonSolverBase::_getSense() const
    1.89 +  { return MIN; }
    1.90 +
    1.91 +  void SkeletonSolverBase::_clear() {
    1.92 +    row_num = col_num = 0;
    1.93 +  }
    1.94 +
    1.95 +  void SkeletonSolverBase::_messageLevel(MessageLevel) {}
    1.96 +
    1.97 +  LpSkeleton::SolveExitStatus LpSkeleton::_solve() { return SOLVED; }
    1.98 +
    1.99 +  LpSkeleton::Value LpSkeleton::_getPrimal(int) const { return 0; }
   1.100 +  LpSkeleton::Value LpSkeleton::_getDual(int) const { return 0; }
   1.101 +  LpSkeleton::Value LpSkeleton::_getPrimalValue() const { return 0; }
   1.102 +
   1.103 +  LpSkeleton::Value LpSkeleton::_getPrimalRay(int) const { return 0; }
   1.104 +  LpSkeleton::Value LpSkeleton::_getDualRay(int) const { return 0; }
   1.105 +
   1.106 +  LpSkeleton::ProblemType LpSkeleton::_getPrimalType() const
   1.107 +  { return UNDEFINED; }
   1.108 +
   1.109 +  LpSkeleton::ProblemType LpSkeleton::_getDualType() const
   1.110 +  { return UNDEFINED; }
   1.111 +
   1.112 +  LpSkeleton::VarStatus LpSkeleton::_getColStatus(int) const
   1.113 +  { return BASIC; }
   1.114 +
   1.115 +  LpSkeleton::VarStatus LpSkeleton::_getRowStatus(int) const
   1.116 +  { return BASIC; }
   1.117 +
   1.118 +  LpSkeleton* LpSkeleton::newSolver() const
   1.119 +  { return static_cast<LpSkeleton*>(0); }
   1.120 +
   1.121 +  LpSkeleton* LpSkeleton::cloneSolver() const
   1.122 +  { return static_cast<LpSkeleton*>(0); }
   1.123 +
   1.124 +  const char* LpSkeleton::_solverName() const { return "LpSkeleton"; }
   1.125 +
   1.126 +  MipSkeleton::SolveExitStatus MipSkeleton::_solve()
   1.127 +  { return SOLVED; }
   1.128 +
   1.129 +  MipSkeleton::Value MipSkeleton::_getSol(int) const { return 0; }
   1.130 +  MipSkeleton::Value MipSkeleton::_getSolValue() const { return 0; }
   1.131 +
   1.132 +  MipSkeleton::ProblemType MipSkeleton::_getType() const
   1.133 +  { return UNDEFINED; }
   1.134 +
   1.135 +  MipSkeleton* MipSkeleton::newSolver() const
   1.136 +  { return static_cast<MipSkeleton*>(0); }
   1.137 +
   1.138 +  MipSkeleton* MipSkeleton::cloneSolver() const
   1.139 +  { return static_cast<MipSkeleton*>(0); }
   1.140 +
   1.141 +  const char* MipSkeleton::_solverName() const { return "MipSkeleton"; }
   1.142 +
   1.143 +} //namespace lemon
   1.144 +