Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F102322547
Tutorial_BlockOperations_vector.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:20
Size
348 B
Mime Type
text/x-c
Expires
Fri, Feb 21, 12:20 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
24330624
Attached To
rDLMA Diffusion limited mixed aggregation
Tutorial_BlockOperations_vector.cpp
View Options
#include <Eigen/Dense>
#include <iostream>
using
namespace
std
;
int
main
()
{
Eigen
::
ArrayXf
v
(
6
);
v
<<
1
,
2
,
3
,
4
,
5
,
6
;
cout
<<
"v.head(3) ="
<<
endl
<<
v
.
head
(
3
)
<<
endl
<<
endl
;
cout
<<
"v.tail<3>() = "
<<
endl
<<
v
.
tail
<
3
>
()
<<
endl
<<
endl
;
v
.
segment
(
1
,
4
)
*=
2
;
cout
<<
"after 'v.segment(1,4) *= 2', v ="
<<
endl
<<
v
<<
endl
;
}
Event Timeline
Log In to Comment