# HG changeset patch # User alpar # Date 1112855936 0 # Node ID 96b74270c3a113071cf25f40915fa1d86169d6dc # Parent 48f9299b390d145d363628e04368cc1bff309336 LpSolverSkeleton -> LpSkeleton lp_solver_skeleton* -> lp_skeleton* diff -r 48f9299b390d -r 96b74270c3a1 src/lemon/Makefile.am --- a/src/lemon/Makefile.am Thu Apr 07 06:31:03 2005 +0000 +++ b/src/lemon/Makefile.am Thu Apr 07 06:38:56 2005 +0000 @@ -7,7 +7,7 @@ libemon_la_SOURCES = \ lp_base.cc \ lp_glpk.cc \ - lp_solver_skeleton.cc + lp_skeleton.cc pkginclude_HEADERS = \ bezier.h \ @@ -56,7 +56,7 @@ noinst_HEADERS = \ lp_base.h \ lp_glpk.h \ - lp_solver_skeleton.h \ + lp_skeleton.h \ concept/graph.h \ concept/graph_component.h \ concept/undir_graph.h \ diff -r 48f9299b390d -r 96b74270c3a1 src/lemon/lp_skeleton.cc --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/lemon/lp_skeleton.cc Thu Apr 07 06:38:56 2005 +0000 @@ -0,0 +1,96 @@ +/* -*- C++ -*- + * src/lemon/lp_skeleton.cc + * - Part of LEMON, a generic C++ optimization library + * + * Copyright (C) 2005 Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport + * (Egervary Combinatorial Optimization Research Group, EGRES). + * + * Permission to use, modify and distribute this software is granted + * provided that this copyright notice appears in all copies. For + * precise terms see the accompanying LICENSE file. + * + * This software is provided "AS IS" with no warranty of any kind, + * express or implied, and with no claim as to its suitability for any + * purpose. + * + */ + +#include + +///\file +///\brief A skeleton file to implement LP solver interfaces +namespace lemon { + + int LpSkeleton::_addCol() + { + return ++col_num; + } + + int LpSkeleton::_addRow() + { + return ++row_num; + } + + void LpSkeleton::_setRowCoeffs(int i, + int length, + int const * indices, + Value const * values ) + { + } + + void LpSkeleton::_setColCoeffs(int i, + int length, + int const * indices, + Value const * values) + { + } + + void LpSkeleton::_setColLowerBound(int i, Value value) + { + } + + void LpSkeleton::_setColUpperBound(int i, Value value) + { + } + + void LpSkeleton::_setRowLowerBound(int i, Value value) + { + } + + void LpSkeleton::_setRowUpperBound(int i, Value value) + { + } + + void LpSkeleton::_setObjCoeff(int i, Value obj_coef) + { + } + + void LpSkeleton::_setMax() + { + } + void LpSkeleton::_setMin() + { + } + + LpSkeleton::SolveExitStatus LpSkeleton::_solve() + { + return SOLVED; + } + + LpSkeleton::Value LpSkeleton::_getPrimal(int i) + { + return 0; + } + + LpSkeleton::Value LpSkeleton::_getPrimalValue() + { + return 0; + } + + LpSkeleton::SolutionStatus LpSkeleton::_getPrimalStatus() + { + return OPTIMAL; + } + +} //namespace lemon + diff -r 48f9299b390d -r 96b74270c3a1 src/lemon/lp_skeleton.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/lemon/lp_skeleton.h Thu Apr 07 06:38:56 2005 +0000 @@ -0,0 +1,115 @@ +/* -*- C++ -*- + * src/lemon/lp_skeleton.h + * - Part of LEMON, a generic C++ optimization library + * + * Copyright (C) 2005 Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport + * (Egervary Combinatorial Optimization Research Group, EGRES). + * + * Permission to use, modify and distribute this software is granted + * provided that this copyright notice appears in all copies. For + * precise terms see the accompanying LICENSE file. + * + * This software is provided "AS IS" with no warranty of any kind, + * express or implied, and with no claim as to its suitability for any + * purpose. + * + */ + +#ifndef LEMON_LP_SKELETON +#define LEMON_LP_SKELETON + +#include"lp_base.h" + +///\file +///\brief A skeleton file to implement LP solver interfaces +namespace lemon { + + ///A skeleton class to implement LP solver interfaces + class LpSkeleton :public LpSolverBase { + int col_num,row_num; + + protected: + /// \e + virtual int _addCol(); + /// \e + virtual int _addRow(); + /// \e + + /// \warning Arrays are indexed from 1 (datum at index 0 is ignored) + /// + virtual void _setRowCoeffs(int i, + int length, + int const * indices, + Value const * values ); + /// \e + + /// \warning Arrays are indexed from 1 (datum at index 0 is ignored) + /// + virtual void _setColCoeffs(int i, + int length, + int const * indices, + Value const * values ); + + /// \e + + /// The lower bound of a variable (column) have to be given by an + /// extended number of type Value, i.e. a finite number of type + /// Value or -\ref INF. + virtual void _setColLowerBound(int i, Value value); + /// \e + + /// The upper bound of a variable (column) have to be given by an + /// extended number of type Value, i.e. a finite number of type + /// Value or \ref INF. + virtual void _setColUpperBound(int i, Value value); + /// \e + + /// The lower bound of a linear expression (row) have to be given by an + /// extended number of type Value, i.e. a finite number of type + /// Value or -\ref INF. + virtual void _setRowLowerBound(int i, Value value); + /// \e + + /// The upper bound of a linear expression (row) have to be given by an + /// extended number of type Value, i.e. a finite number of type + /// Value or \ref INF. + virtual void _setRowUpperBound(int i, Value value); + + /// \e + virtual void _setObjCoeff(int i, Value obj_coef); + + ///\e + + ///\bug Wrong interface + /// + virtual SolveExitStatus _solve(); + + ///\e + + ///\bug Wrong interface + /// + virtual Value _getPrimal(int i); + ///\e + + ///\bug Wrong interface + /// + virtual Value _getPrimalValue(); + ///\e + + ///\bug Wrong interface + /// + virtual SolutionStatus _getPrimalStatus(); + + ///\e + virtual void _setMax(); + ///\e + virtual void _setMin(); + + + public: + LpSkeleton() : LpSolverBase(), col_num(0), row_num(0) {} + }; + +} //namespace lemon + +#endif // LEMON_LP_SKELETON diff -r 48f9299b390d -r 96b74270c3a1 src/lemon/lp_solver_skeleton.cc --- a/src/lemon/lp_solver_skeleton.cc Thu Apr 07 06:31:03 2005 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,96 +0,0 @@ -/* -*- C++ -*- - * src/lemon/lp_solver_skeleton.cc - * - Part of LEMON, a generic C++ optimization library - * - * Copyright (C) 2005 Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport - * (Egervary Combinatorial Optimization Research Group, EGRES). - * - * Permission to use, modify and distribute this software is granted - * provided that this copyright notice appears in all copies. For - * precise terms see the accompanying LICENSE file. - * - * This software is provided "AS IS" with no warranty of any kind, - * express or implied, and with no claim as to its suitability for any - * purpose. - * - */ - -#include - -///\file -///\brief A skeleton file to implement LP solver interfaces -namespace lemon { - - int LpSolverSkeleton::_addCol() - { - return ++col_num; - } - - int LpSolverSkeleton::_addRow() - { - return ++row_num; - } - - void LpSolverSkeleton::_setRowCoeffs(int i, - int length, - int const * indices, - Value const * values ) - { - } - - void LpSolverSkeleton::_setColCoeffs(int i, - int length, - int const * indices, - Value const * values) - { - } - - void LpSolverSkeleton::_setColLowerBound(int i, Value value) - { - } - - void LpSolverSkeleton::_setColUpperBound(int i, Value value) - { - } - - void LpSolverSkeleton::_setRowLowerBound(int i, Value value) - { - } - - void LpSolverSkeleton::_setRowUpperBound(int i, Value value) - { - } - - void LpSolverSkeleton::_setObjCoeff(int i, Value obj_coef) - { - } - - void LpSolverSkeleton::_setMax() - { - } - void LpSolverSkeleton::_setMin() - { - } - - LpSolverSkeleton::SolveExitStatus LpSolverSkeleton::_solve() - { - return SOLVED; - } - - LpSolverSkeleton::Value LpSolverSkeleton::_getPrimal(int i) - { - return 0; - } - - LpSolverSkeleton::Value LpSolverSkeleton::_getPrimalValue() - { - return 0; - } - - LpSolverSkeleton::SolutionStatus LpSolverSkeleton::_getPrimalStatus() - { - return OPTIMAL; - } - -} //namespace lemon - diff -r 48f9299b390d -r 96b74270c3a1 src/lemon/lp_solver_skeleton.h --- a/src/lemon/lp_solver_skeleton.h Thu Apr 07 06:31:03 2005 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,115 +0,0 @@ -/* -*- C++ -*- - * src/lemon/lp_solver_skeleton.h - * - Part of LEMON, a generic C++ optimization library - * - * Copyright (C) 2005 Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport - * (Egervary Combinatorial Optimization Research Group, EGRES). - * - * Permission to use, modify and distribute this software is granted - * provided that this copyright notice appears in all copies. For - * precise terms see the accompanying LICENSE file. - * - * This software is provided "AS IS" with no warranty of any kind, - * express or implied, and with no claim as to its suitability for any - * purpose. - * - */ - -#ifndef LEMON_LP_SOLVER_SKELETON -#define LEMON_LP_SOLVER_SKELETON - -#include"lp_base.h" - -///\file -///\brief A skeleton file to implement LP solver interfaces -namespace lemon { - - ///A skeleton class to implement LP solver interfaces - class LpSolverSkeleton :public LpSolverBase { - int col_num,row_num; - - protected: - /// \e - virtual int _addCol(); - /// \e - virtual int _addRow(); - /// \e - - /// \warning Arrays are indexed from 1 (datum at index 0 is ignored) - /// - virtual void _setRowCoeffs(int i, - int length, - int const * indices, - Value const * values ); - /// \e - - /// \warning Arrays are indexed from 1 (datum at index 0 is ignored) - /// - virtual void _setColCoeffs(int i, - int length, - int const * indices, - Value const * values ); - - /// \e - - /// The lower bound of a variable (column) have to be given by an - /// extended number of type Value, i.e. a finite number of type - /// Value or -\ref INF. - virtual void _setColLowerBound(int i, Value value); - /// \e - - /// The upper bound of a variable (column) have to be given by an - /// extended number of type Value, i.e. a finite number of type - /// Value or \ref INF. - virtual void _setColUpperBound(int i, Value value); - /// \e - - /// The lower bound of a linear expression (row) have to be given by an - /// extended number of type Value, i.e. a finite number of type - /// Value or -\ref INF. - virtual void _setRowLowerBound(int i, Value value); - /// \e - - /// The upper bound of a linear expression (row) have to be given by an - /// extended number of type Value, i.e. a finite number of type - /// Value or \ref INF. - virtual void _setRowUpperBound(int i, Value value); - - /// \e - virtual void _setObjCoeff(int i, Value obj_coef); - - ///\e - - ///\bug Wrong interface - /// - virtual SolveExitStatus _solve(); - - ///\e - - ///\bug Wrong interface - /// - virtual Value _getPrimal(int i); - ///\e - - ///\bug Wrong interface - /// - virtual Value _getPrimalValue(); - ///\e - - ///\bug Wrong interface - /// - virtual SolutionStatus _getPrimalStatus(); - - ///\e - virtual void _setMax(); - ///\e - virtual void _setMin(); - - - public: - LpSolverSkeleton() : LpSolverBase(), col_num(0), row_num(0) {} - }; - -} //namespace lemon - -#endif // LEMON_LP_SOLVER_SKELETON diff -r 48f9299b390d -r 96b74270c3a1 src/test/lp_test.cc --- a/src/test/lp_test.cc Thu Apr 07 06:31:03 2005 +0000 +++ b/src/test/lp_test.cc Thu Apr 07 06:38:56 2005 +0000 @@ -1,4 +1,4 @@ -#include +#include #include using namespace lemon; @@ -129,7 +129,7 @@ int main() { - LpSolverSkeleton lp_skel; + LpSkeleton lp_skel; LpGlpk lp_glpk; lpTest(lp_skel);