Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F102322833
TutorialLinAlgSetThreshold.cpp
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Wed, Feb 19, 12:25
Size
377 B
Mime Type
text/x-c
Expires
Fri, Feb 21, 12:25 (2 d)
Engine
blob
Format
Raw Data
Handle
24330711
Attached To
rDLMA Diffusion limited mixed aggregation
TutorialLinAlgSetThreshold.cpp
View Options
#include <iostream>
#include <Eigen/Dense>
using
namespace
std
;
using
namespace
Eigen
;
int
main
()
{
Matrix2d
A
;
A
<<
2
,
1
,
2
,
0.9999999999
;
FullPivLU
<
Matrix2d
>
lu
(
A
);
cout
<<
"By default, the rank of A is found to be "
<<
lu
.
rank
()
<<
endl
;
lu
.
setThreshold
(
1e-5
);
cout
<<
"With threshold 1e-5, the rank of A is found to be "
<<
lu
.
rank
()
<<
endl
;
}
Event Timeline
Log In to Comment