MCPcopy Create free account
hub / github.com/PX4/eigen / test_is_same_dense

Function test_is_same_dense

test/is_same_dense.cpp:14–33  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

12using internal::is_same_dense;
13
14void test_is_same_dense()
15{
16 typedef Matrix<double,Dynamic,Dynamic,ColMajor> ColMatrixXd;
17 ColMatrixXd m1(10,10);
18 Ref<ColMatrixXd> ref_m1(m1);
19 Ref<const ColMatrixXd> const_ref_m1(m1);
20 VERIFY(is_same_dense(m1,m1));
21 VERIFY(is_same_dense(m1,ref_m1));
22 VERIFY(is_same_dense(const_ref_m1,m1));
23 VERIFY(is_same_dense(const_ref_m1,ref_m1));
24
25 VERIFY(is_same_dense(m1.block(0,0,m1.rows(),m1.cols()),m1));
26 VERIFY(!is_same_dense(m1.row(0),m1.col(0)));
27
28 Ref<const ColMatrixXd> const_ref_m1_row(m1.row(1));
29 VERIFY(!is_same_dense(m1.row(1),const_ref_m1_row));
30
31 Ref<const ColMatrixXd> const_ref_m1_col(m1.col(1));
32 VERIFY(is_same_dense(m1.col(1),const_ref_m1_col));
33}

Callers

nothing calls this directly

Calls 5

is_same_denseFunction · 0.85
rowsMethod · 0.45
colsMethod · 0.45
rowMethod · 0.45
colMethod · 0.45

Tested by

no test coverage detected