# HG changeset patch # User alpar # Date 1111666550 0 # Node ID c9558638fe42f394cd031057bbe61b9e04a1bfe5 # Parent 609fe893df8c6c7c877f24e6bfe3e26c2db6a4cf - lp_solver_skeleton.h/cc: skeleton for actual lp implenetations - lp_test.cc: test file - updated Makefile diff -r 609fe893df8c -r c9558638fe42 src/work/athos/lp/Makefile --- a/src/work/athos/lp/Makefile Thu Mar 24 11:44:25 2005 +0000 +++ b/src/work/athos/lp/Makefile Thu Mar 24 12:15:50 2005 +0000 @@ -1,3 +1,12 @@ +CXXFLAGS = -Wall -ggdb --no-inline -I../../.. + +all: lp_test + lp_base.o: lp_base.cc lp_base.h lin_expr.h +lp_solver_skeleton.o: lp_solver_skeleton.cc lp_solver_skeleton.h lp_base.h \ + lin_expr.h +lp_test.o: lp_test.cc lp_base.h lin_expr.h lp_solver_skeleton.h lp_base.h \ + lin_expr.h - g++ -Wall -ggdb --no-inline -I../../.. -c $< \ No newline at end of file +lp_test: lp_test.o lp_base.o lp_solver_skeleton.o + g++ -o $@ $^ \ No newline at end of file diff -r 609fe893df8c -r c9558638fe42 src/work/athos/lp/lp_solver_skeleton.cc --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/work/athos/lp/lp_solver_skeleton.cc Thu Mar 24 12:15:50 2005 +0000 @@ -0,0 +1,69 @@ +/* -*- 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"lp_solver_skeleton.h" + +///\file +///\brief A skeleton file to implement LP solver interfaces +namespace lemon { + + int LpSolverSkeleton::_addCol() + { + return 1; + } + + int LpSolverSkeleton::_addRow() + { + return 1; + } + + 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) + { + } + +} //namespace lemon + diff -r 609fe893df8c -r c9558638fe42 src/work/athos/lp/lp_solver_skeleton.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/work/athos/lp/lp_solver_skeleton.h Thu Mar 24 12:15:50 2005 +0000 @@ -0,0 +1,50 @@ +/* -*- 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 { + + protected: + virtual int _addCol(); + virtual int _addRow(); + virtual void _setRowCoeffs(int i, + int length, + int const * indices, + Value const * values ); + virtual void _setColCoeffs(int i, + int length, + int const * indices, + Value const * values); + virtual void _setColLowerBound(int i, Value value); + virtual void _setColUpperBound(int i, Value value); + virtual void _setRowLowerBound(int i, Value value); + virtual void _setRowUpperBound(int i, Value value); + virtual void _setObjCoeff(int i, Value obj_coef); + }; + +} //namespace lemon + +#endif // LEMON_LP_SOLVER_SKELETON diff -r 609fe893df8c -r c9558638fe42 src/work/athos/lp/lp_test Binary file src/work/athos/lp/lp_test has changed diff -r 609fe893df8c -r c9558638fe42 src/work/athos/lp/lp_test.cc --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/work/athos/lp/lp_test.cc Thu Mar 24 12:15:50 2005 +0000 @@ -0,0 +1,8 @@ +#include"lp_solver_skeleton.h" + +using namespace lemon; + +int main() +{ + LpSolverSkeleton lp; +}