Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F102017196
function_taking_eigenbase.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
Sun, Feb 16, 05:46
Size
418 B
Mime Type
text/x-c++
Expires
Tue, Feb 18, 05:46 (2 d)
Engine
blob
Format
Raw Data
Handle
24249173
Attached To
rDLMA Diffusion limited mixed aggregation
function_taking_eigenbase.cpp
View Options
#include <iostream>
#include <Eigen/Core>
using
namespace
Eigen
;
template
<
typename
Derived
>
void
print_size
(
const
EigenBase
<
Derived
>&
b
)
{
std
::
cout
<<
"size (rows, cols): "
<<
b
.
size
()
<<
" ("
<<
b
.
rows
()
<<
", "
<<
b
.
cols
()
<<
")"
<<
std
::
endl
;
}
int
main
()
{
Vector3f
v
;
print_size
(
v
);
// v.asDiagonal() returns a 3x3 diagonal matrix pseudo-expression
print_size
(
v
.
asDiagonal
());
}
Event Timeline
Log In to Comment