Skip to content
Snippets Groups Projects
Commit a0250b2a authored by Tobias Leibner's avatar Tobias Leibner
Browse files

[lpsolve] add default constructor

parent 945de50d
No related branches found
No related tags found
No related merge requests found
......@@ -37,6 +37,11 @@ namespace lp_solve {
#if HAVE_LPSOLVE
LinearProgram::LinearProgram()
: lp_(nullptr)
{
}
LinearProgram::LinearProgram(int rows, int cols)
: lp_(::make_lp(rows, cols))
{
......@@ -55,6 +60,11 @@ lprec* LinearProgram::data()
}
#else // HAVE_LPSOLVE
LinearProgram::LinearProgram()
{
DUNE_THROW(Exceptions::dependency_missing, "You are missing lp_solve, check available() first!");
}
LinearProgram::LinearProgram(int /*rows*/, int /*cols*/)
{
DUNE_THROW(Exceptions::dependency_missing, "You are missing lp_solve, check available() first!");
......
......@@ -28,6 +28,7 @@ namespace lp_solve {
struct LinearProgram
{
LinearProgram();
LinearProgram(int rows, int cols);
~LinearProgram();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment