Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
CoMISo
CoMISo
Commits
20123f2f
Commit
20123f2f
authored
Jul 23, 2020
by
Max Lyon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
small improvements to ExactConstraintSatisfaction
parent
b06f0747
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
6 deletions
+13
-6
Utils/ExactConstraintSatisfaction.cc
Utils/ExactConstraintSatisfaction.cc
+7
-3
Utils/ExactConstraintSatisfaction.hh
Utils/ExactConstraintSatisfaction.hh
+6
-3
No files found.
Utils/ExactConstraintSatisfaction.cc
View file @
20123f2f
...
...
@@ -6,6 +6,8 @@
#include <CoMISo/Utils/CoMISoError.hh>
#include <vector>
namespace
COMISO
{
ExactConstraintSatisfaction
::
ExactConstraintSatisfaction
()
{
...
...
@@ -164,7 +166,7 @@ double ExactConstraintSatisfaction::get_delta()
}
// ----------------------Matrix transformation-----------------------------------
void
ExactConstraintSatisfaction
::
IREF_Gaussian
(
SP_Matrix_R
&
A
,
Eigen
::
VectorXi
&
b
,
const
Eigen
::
VectorXd
x
){
void
ExactConstraintSatisfaction
::
IREF_Gaussian
(
SP_Matrix_R
&
A
,
Eigen
::
VectorXi
&
b
,
const
Eigen
::
VectorXd
&
x
){
number_pivots_
=
0
;
int
rows
=
A
.
rows
();
//number of rows
...
...
@@ -253,7 +255,7 @@ void ExactConstraintSatisfaction::IRREF_Jordan(SP_Matrix_R& A, Eigen::VectorXi&
//-------------------------------------Evaluation--------------------------------------------------------------------
void
ExactConstraintSatisfaction
::
evaluation
(
SP_Matrix_R
&
_A
,
Eigen
::
VectorXi
&
b
,
Eigen
::
VectorXd
&
x
,
const
Eigen
::
VectorXd
&
values
)
void
ExactConstraintSatisfaction
::
evaluation
(
SP_Matrix_R
&
_A
,
Eigen
::
VectorXi
&
b
,
Eigen
::
VectorXd
&
x
)
{
//debug
double
time_G
=
0.0
;
...
...
@@ -290,7 +292,7 @@ void ExactConstraintSatisfaction::evaluation(SP_Matrix_R& _A, Eigen::VectorXi& b
//debug
std
::
cout
<<
"largest Expo"
<<
std
::
endl
;
largest_exponent
(
values
);
largest_exponent
(
x
);
evaluate
(
_A
,
b
,
x
);
...
...
@@ -573,3 +575,5 @@ std::vector<std::pair<int, double> > ExactConstraintSatisfaction::get_dot_produc
return
S
;
}
}
Utils/ExactConstraintSatisfaction.hh
View file @
20123f2f
...
...
@@ -6,9 +6,10 @@
#include <CoMISo/NSolver/NProblemInterface.hh>
#include <vector>
#include <list>
#include <time.h>
namespace
COMISO
{
class
COMISODLLEXPORT
ExactConstraintSatisfaction
{
public:
...
...
@@ -39,12 +40,12 @@ public:
//--------------------matrix transformation-------------------------------
void
IREF_Gaussian
(
SP_Matrix_R
&
A
,
Eigen
::
VectorXi
&
b
,
const
Eigen
::
VectorXd
x
);
void
IREF_Gaussian
(
SP_Matrix_R
&
A
,
Eigen
::
VectorXi
&
b
,
const
Eigen
::
VectorXd
&
x
);
void
IRREF_Jordan
(
SP_Matrix_R
&
A
,
Eigen
::
VectorXi
&
b
);
//-------------------Evaluation--------------------------------------------
void
evaluation
(
SP_Matrix_R
&
_A
,
Eigen
::
VectorXi
&
b
,
Eigen
::
VectorXd
&
x
,
const
Eigen
::
VectorXd
&
values
);
void
evaluation
(
SP_Matrix_R
&
_A
,
Eigen
::
VectorXi
&
b
,
Eigen
::
VectorXd
&
x
);
double
makeDiv
(
const
std
::
vector
<
int
>&
D
,
double
x
);
double
safeDot
(
const
std
::
vector
<
std
::
pair
<
int
,
double
>
>&
S
);
void
evaluate
(
const
SP_Matrix_R
&
_A
,
const
Eigen
::
VectorXi
&
b
,
Eigen
::
VectorXd
&
x
);
...
...
@@ -73,4 +74,6 @@ private:
double
delta_
=
0
;
};
}
#endif // EXACTCONSTRAINTSATISFACTION_HH
Write
Preview
Markdown
is supported
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