Eigen 3.4.90
Main Page
Related Pages
Modules
Classes
Class List
Class Hierarchy
Class Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Variables
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
Typedefs
_
a
b
c
d
e
f
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
Enumerations
Enumerator
a
b
c
d
e
f
h
i
k
m
n
o
p
q
r
s
t
u
v
Related Functions
o
Files
File List
File Members
All
_
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
a
b
c
d
e
f
g
h
i
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Variables
a
b
c
d
e
g
h
i
j
l
m
n
o
p
q
r
s
t
v
w
x
y
Typedefs
a
b
c
d
e
f
i
l
m
n
r
s
t
u
Macros
_
a
b
c
d
e
f
g
h
l
m
p
s
u
v
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Modules
Pages
doc
examples
Tutorial_BlockOperations_block_assignment.cpp
Go to the documentation of this file.
1
#include <
Eigen/Dense
>
2
#include <iostream>
3
4
int
main
()
5
{
6
Eigen::Array22f
m
;
7
m
<< 1,2,
8
3,4;
9
Eigen::Array44f
a
=
Eigen::Array44f::Constant
(0.6);
10
std::cout <<
"Here is the array a:\n"
<<
a
<<
"\n\n"
;
11
a
.block<2,2>(1,1) =
m
;
12
std::cout <<
"Here is now a with m copied into its central 2x2 block:\n"
<<
a
<<
"\n\n"
;
13
a
.block(0,0,2,3) =
a
.block(2,1,2,3);
14
std::cout <<
"Here is now a with bottom-right 2x3 block copied into top-left 2x3 block:\n"
<<
a
<<
"\n\n"
;
15
}
m
Matrix3f m
Definition:
AngleAxis_mimic_euler.cpp:1
a
ArrayXXi a
Definition:
Array_initializer_list_23_cxx11.cpp:1
Dense
main
int main()
Definition:
Tutorial_BlockOperations_block_assignment.cpp:4
Eigen::Array
General-purpose arrays with easy API for coefficient-wise operations.
Definition:
Array.h:49
Eigen::DenseBase::Constant
static const ConstantReturnType Constant(Index rows, Index cols, const Scalar &value)
Definition:
CwiseNullaryOp.h:191
Code