Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
CoMISo
CoMISo
Commits
295188fe
Commit
295188fe
authored
Aug 16, 2017
by
Max Lyon
Browse files
Merge from ReForm
parents
49e4334c
d4ad1599
Pipeline
#5572
failed with stages
in 2 minutes and 29 seconds
Changes
52
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
NSolver/SuperSparseMatrixT.hh
View file @
295188fe
...
...
@@ -81,9 +81,6 @@ public:
:
n_rows_
(
_n_rows
),
n_cols_
(
_n_cols
)
{}
/// Destructor
~
SuperSparseMatrixT
()
{}
// iterate over non-zeros
iterator
begin
()
{
return
iterator
(
data_
.
begin
());
}
iterator
end
()
{
return
iterator
(
data_
.
end
());
}
...
...
NSolver/TAOSolver.hh
View file @
295188fe
...
...
@@ -42,14 +42,6 @@ namespace COMISO {
class
COMISODLLEXPORT
TAOSolver
{
public:
/// Default constructor
TAOSolver
()
{}
/// Destructor
~
TAOSolver
()
{}
// solve problem
static
int
solve
(
NProblemInterface
*
_base
);
static
int
solve
(
NProblemGmmInterface
*
_base
);
...
...
NSolver/TestInterface.hh
View file @
295188fe
...
...
@@ -36,13 +36,6 @@ namespace COMISO {
class
COMISODLLEXPORT
TestInterface
:
public
NProblemGmmInterface
{
public:
/// Default constructor
TestInterface
()
{}
/// Destructor
~
TestInterface
()
{}
// minimize (x-2.4)^2
virtual
int
n_unknowns
(
)
...
...
QtWidgets/MISolverDialogUI.hh
deleted
100644 → 0
View file @
49e4334c
/*===========================================================================*\
* *
* CoMISo *
* Copyright (C) 2008-2009 by Computer Graphics Group, RWTH Aachen *
* www.rwth-graphics.de *
* *
*---------------------------------------------------------------------------*
* This file is part of CoMISo. *
* *
* CoMISo is free software: you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation, either version 3 of the License, or *
* (at your option) any later version. *
* *
* CoMISo is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with CoMISo. If not, see <http://www.gnu.org/licenses/>. *
* *
\*===========================================================================*/
//=============================================================================
//
// CLASS MiSolverDialog
//
//=============================================================================
#ifndef COMISO_MISOLVERDIALOG_HH
#define COMISO_MISOLVERDIALOG_HH
#include
<QObject>
#include
<CoMISo/Config/config.hh>
//== BUILD-TIME DEPENDENCIES =================================================================
#if COMISO_QT_AVAILABLE
//============================================================================================
//== INCLUDES =================================================================
#include
"ui_QtMISolverDialogBaseUI.hh"
// ACGMake users have to include
// #include "QtMISolverDialogBase.hh"
#include
<Solver/MISolver.hh>
//== FORWARDDECLARATIONS ======================================================
//== NAMESPACES ===============================================================
namespace
COMISO
{
//== CLASS DEFINITION =========================================================
/** \class MISolverDialog MISolverDialog.hh <COMISO/.../MISolverDialog.hh>
Brief Description.
A more elaborate description follows.
*/
class
MISolverDialog
:
public
QDialog
,
public
Ui
::
QtMISolverDialogBaseUI
{
Q_OBJECT
public:
/// Default constructor
MISolverDialog
(
MISolver
&
_misolver
,
QWidget
*
_parent
=
0
)
:
QDialog
(
_parent
),
Ui
::
QtMISolverDialogBaseUI
(),
misolver_
(
_misolver
)
{
setupUi
(
this
);
get_parameters
();
connect
(
okPB
,
SIGNAL
(
clicked
()
),
this
,
SLOT
(
slotOkButton
()
)
);
connect
(
cancelPB
,
SIGNAL
(
clicked
()
),
this
,
SLOT
(
slotCancelButton
()
)
);
}
/// Destructor
~
MISolverDialog
()
{}
void
get_parameters
();
void
set_parameters
();
public
slots
:
virtual
void
slotOkButton
();
virtual
void
slotCancelButton
();
private:
MISolver
&
misolver_
;
};
//=============================================================================
}
// namespace COMISO
//=============================================================================
#endif // COMISO_MISOLVERDIALOG_HH defined
//=============================================================================
#endif
Solver/ConstrainedSolver.cc
View file @
295188fe
...
...
@@ -127,6 +127,9 @@ using namespace COMISO_STD;
template
void
ConstrainedSolver
::
solve
(
WSRowMatrix
&
,
WSColMatrix
&
,
DoubleVector
&
,
DoubleVector
&
,
IntVector
&
,
double
,
bool
,
bool
);
template
void
ConstrainedSolver
::
solve
(
WSRowMatrix
&
,
WSRowMatrix
&
,
DoubleVector
&
,
IntVector
&
,
double
,
bool
,
bool
);
template
void
ConstrainedSolver
::
solve_const
(
const
WSRowMatrix
&
,
const
WSColMatrix
&
,
DoubleVector
&
,
const
DoubleVector
&
,
const
IntVector
&
,
double
,
bool
,
bool
);
...
...
Solver/ConstrainedSolver.hh
View file @
295188fe
...
...
@@ -67,9 +67,6 @@ public:
ConstrainedSolver
(
bool
_do_gcd
=
true
)
:
do_gcd_
(
_do_gcd
)
{
epsilon_
=
1e-8
;
noisy_
=
1
;
}
/// Destructor
~
ConstrainedSolver
()
{
}
/** @name Contrained solvers
* Functions to solve constrained linear systems of the form Ax=b (stemming from quadratic energies).
* The constraints can be linear constraints of the form \f$ x_1*c_1+ \cdots +x_n*c_n=c \f$ as well as integer constraints \f$x_i\in \mathbf{Z}\f$.
...
...
Solver/EigenLDLTSolver.cc
View file @
295188fe
...
...
@@ -30,20 +30,6 @@
namespace
COMISO
{
EigenLDLTSolver
::
EigenLDLTSolver
()
:
n_
(
0
)
{
}
//-----------------------------------------------------------------------------
EigenLDLTSolver
::~
EigenLDLTSolver
()
{
}
//-----------------------------------------------------------------------------
...
...
@@ -56,7 +42,7 @@ bool EigenLDLTSolver::calc_system( const std::vector<int>& _colptr,
}
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
bool
EigenLDLTSolver
::
update_system
(
const
std
::
vector
<
int
>&
_colptr
,
...
...
Solver/EigenLDLTSolver.hh
View file @
295188fe
...
...
@@ -4,7 +4,7 @@
* Copyright (C) 2008-2009 by Computer Graphics Group, RWTH Aachen *
* www.rwth-graphics.de *
* *
*---------------------------------------------------------------------------*
*---------------------------------------------------------------------------*
* This file is part of CoMISo. *
* *
* CoMISo is free software: you can redistribute it and/or modify *
...
...
@@ -20,7 +20,7 @@
* You should have received a copy of the GNU General Public License *
* along with CoMISo. If not, see <http://www.gnu.org/licenses/>. *
* *
\*===========================================================================*/
\*===========================================================================*/
//=============================================================================
...
...
@@ -58,59 +58,54 @@ LOW_CODE_QUALITY_SECTION_END
namespace
COMISO
{
//== CLASS DEFINITION =========================================================
class
EigenLDLTSolver
class
COMISODLLEXPORT
EigenLDLTSolver
{
public:
EigenLDLTSolver
()
:
n_
(
0
)
{}
// _size is maximal size this instance can handle (smaller problems are possible!!!)
COMISODLLEXPORT
EigenLDLTSolver
();
COMISODLLEXPORT
~
EigenLDLTSolver
(
);
bool
calc_system
(
const
std
::
vector
<
int
>&
_colptr
,
const
std
::
vector
<
int
>&
_rowind
,
const
std
::
vector
<
double
>&
_values
);
COMISODLLEXPORT
bool
calc_system
(
const
std
::
vector
<
int
>&
_colptr
,
const
std
::
vector
<
int
>&
_rowind
,
const
std
::
vector
<
double
>&
_values
);
template
<
class
GMM_MatrixT
>
bool
calc_system_gmm
(
const
GMM_MatrixT
&
_mat
);
template
<
class
GMM
_MatrixT
>
bool
calc_system_
gmm
(
const
GMM
_MatrixT
&
_mat
);
template
<
class
Eigen
_MatrixT
>
bool
calc_system_
eigen
(
const
Eigen
_MatrixT
&
_mat
);
template
<
class
Eigen_MatrixT
>
bool
calc_system_eigen
(
const
Eigen_MatrixT
&
_mat
);
bool
update_system
(
const
std
::
vector
<
int
>&
_colptr
,
const
std
::
vector
<
int
>&
_rowind
,
const
std
::
vector
<
double
>&
_values
);
COMISODLLEXPORT
bool
update_system
(
const
std
::
vector
<
int
>&
_colptr
,
const
std
::
vector
<
int
>&
_rowind
,
const
std
::
vector
<
double
>&
_values
);
template
<
class
GMM_MatrixT
>
bool
update_system_gmm
(
const
GMM_MatrixT
&
_mat
);
template
<
class
GMM
_MatrixT
>
bool
update_system_
gmm
(
const
GMM
_MatrixT
&
_mat
);
template
<
class
Eigen
_MatrixT
>
bool
update_system_
eigen
(
const
Eigen
_MatrixT
&
_mat
);
template
<
class
Eigen_MatrixT
>
bool
update_system_eigen
(
const
Eigen_MatrixT
&
_mat
);
COMISODLLEXPORT
bool
solve
(
double
*
_x0
,
double
*
_b
);
bool
solve
(
double
*
_x0
,
double
*
_b
);
COMISODLLEXPORT
bool
solve
(
std
::
vector
<
double
>&
_x0
,
std
::
vector
<
double
>&
_b
);
COMISODLLEXPORT
bool
&
show_timings
();
COMISODLLEXPORT
int
dimension
();
bool
solve
(
std
::
vector
<
double
>&
_x0
,
std
::
vector
<
double
>&
_b
);
bool
&
show_timings
();
int
dimension
();
private:
// dimension n_
unsigned
int
n_
;
// dimension n_
unsigned
int
n_
;
Eigen
::
SimplicialLDLT
<
Eigen
::
SparseMatrix
<
double
>
>
ldlt_
;
Eigen
::
SimplicialLDLT
<
Eigen
::
SparseMatrix
<
double
>
>
ldlt_
;
bool
show_timings_
;
bool
show_timings_
;
};
//=============================================================================
//=============================================================================
}
// namespace COMISO
//=============================================================================
#if defined(INCLUDE_TEMPLATES) && !defined(COMISO_EIGEN_LDLT_SOLVER_TEMPLATES_C)
...
...
Solver/IterativeSolverT.hh
View file @
295188fe
...
...
@@ -38,16 +38,8 @@ template <class RealT>
class
IterativeSolverT
{
public:
typedef
RealT
Real
;
/// Constructor
IterativeSolverT
()
{}
/// Destructor
~
IterativeSolverT
()
{}
// local gauss_seidel
bool
gauss_seidel_local
(
typename
gmm
::
csc_matrix
<
Real
>&
_A
,
std
::
vector
<
Real
>&
_x
,
...
...
Solver/MISolver.cc
View file @
295188fe
...
...
@@ -82,14 +82,6 @@ MISolver::MISolver()
}
//-----------------------------------------------------------------------------
MISolver
::~
MISolver
()
{
}
//-----------------------------------------------------------------------------
void
...
...
@@ -211,10 +203,12 @@ MISolver::solve_cplex(
}
catch
(
IloException
&
e
)
{
PROGRESS_RESUME_ABORT
;
// resume a processed abort request
DEB_warning
(
2
,
"CPLEX Concert exception caught: "
<<
e
.
getMessage
()
)
}
catch
(...)
{
PROGRESS_RESUME_ABORT
;
// resume a processed abort request
DEB_warning
(
1
,
"CPLEX Unknown exception caught"
)
}
...
...
@@ -844,10 +838,12 @@ MISolver::solve_gurobi(
}
catch
(
GRBException
&
e
)
{
PROGRESS_RESUME_ABORT
;
// resume a processed abort request
DEB_warning
(
2
,
"Error code = "
<<
e
.
getErrorCode
()
<<
"["
<<
e
.
getMessage
()
<<
"]
\n
"
)
}
catch
(...)
{
PROGRESS_RESUME_ABORT
;
// resume a processed abort request
DEB_warning
(
1
,
"Exception during optimization"
)
}
...
...
Solver/MISolver.hh
View file @
295188fe
...
...
@@ -96,10 +96,6 @@ public:
/// default Constructor
MISolver
();
/// Destructor
~
MISolver
();
/// Compute greedy approximation to a mixed integer problem.
/** @param _A symmetric positive semi-definite CSC matrix (Will be \b destroyed!)
* @param _x vector holding solution at the end
...
...
Utils/MutablePriorityQueueT.hh
View file @
295188fe
...
...
@@ -56,16 +56,8 @@ template<class VType, class IType>
class
MutablePriorityQueueT
{
public:
typedef
Triple
<
VType
,
IType
,
unsigned
int
>
TripleVII
;
/// Default constructor
MutablePriorityQueueT
()
{}
/// Destructor
~
MutablePriorityQueueT
()
{}
// reset timestamps
void
clear
(
size_t
_n
)
{
...
...
Prev
1
2
3
Next
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment