[Lemon-commits] [lemon_svn] alpar: r1681 - hugo/trunk/src/work/athos/lp
Lemon SVN
svn at lemon.cs.elte.hu
Mon Nov 6 20:46:57 CET 2006
Author: alpar
Date: Thu Mar 24 13:15:50 2005
New Revision: 1681
Added:
hugo/trunk/src/work/athos/lp/lp_solver_skeleton.cc
hugo/trunk/src/work/athos/lp/lp_solver_skeleton.h
hugo/trunk/src/work/athos/lp/lp_test (contents, props changed)
hugo/trunk/src/work/athos/lp/lp_test.cc
Modified:
hugo/trunk/src/work/athos/lp/Makefile
Log:
- lp_solver_skeleton.h/cc: skeleton for actual lp implenetations
- lp_test.cc: test file
- updated Makefile
Modified: hugo/trunk/src/work/athos/lp/Makefile
==============================================================================
--- hugo/trunk/src/work/athos/lp/Makefile (original)
+++ hugo/trunk/src/work/athos/lp/Makefile Thu Mar 24 13:15:50 2005
@@ -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
Added: hugo/trunk/src/work/athos/lp/lp_solver_skeleton.cc
==============================================================================
--- (empty file)
+++ hugo/trunk/src/work/athos/lp/lp_solver_skeleton.cc Thu Mar 24 13:15:50 2005
@@ -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
+
Added: hugo/trunk/src/work/athos/lp/lp_solver_skeleton.h
==============================================================================
--- (empty file)
+++ hugo/trunk/src/work/athos/lp/lp_solver_skeleton.h Thu Mar 24 13:15:50 2005
@@ -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
Added: hugo/trunk/src/work/athos/lp/lp_test
==============================================================================
Binary file. No diff available.
Added: hugo/trunk/src/work/athos/lp/lp_test.cc
==============================================================================
--- (empty file)
+++ hugo/trunk/src/work/athos/lp/lp_test.cc Thu Mar 24 13:15:50 2005
@@ -0,0 +1,8 @@
+#include"lp_solver_skeleton.h"
+
+using namespace lemon;
+
+int main()
+{
+ LpSolverSkeleton lp;
+}
More information about the Lemon-commits
mailing list