block.cpp
Go to the documentation of this file.
1 // This file is part of Eigen, a lightweight C++ template library
2 // for linear algebra.
3 //
4 // Copyright (C) 2006-2010 Benoit Jacob <jacob.benoit.1@gmail.com>
5 //
6 // This Source Code Form is subject to the terms of the Mozilla
7 // Public License v. 2.0. If a copy of the MPL was not distributed
8 // with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 
10 #define EIGEN_NO_STATIC_ASSERT // otherwise we fail at compile time on unused paths
11 #include "main.h"
12 
13 template<typename MatrixType, typename Index, typename Scalar>
16  // check cwise-Functions:
17  VERIFY_IS_APPROX(m1.row(r1).cwiseMax(s1), m1.cwiseMax(s1).row(r1));
18  VERIFY_IS_APPROX(m1.col(c1).cwiseMin(s1), m1.cwiseMin(s1).col(c1));
19 
20  VERIFY_IS_APPROX(m1.block(r1,c1,r2-r1+1,c2-c1+1).cwiseMin(s1), m1.cwiseMin(s1).block(r1,c1,r2-r1+1,c2-c1+1));
21  VERIFY_IS_APPROX(m1.block(r1,c1,r2-r1+1,c2-c1+1).cwiseMax(s1), m1.cwiseMax(s1).block(r1,c1,r2-r1+1,c2-c1+1));
22 
23  return Scalar(0);
24 }
25 
26 template<typename MatrixType, typename Index, typename Scalar>
29  return Scalar(0);
30 }
31 
32 // Check at compile-time that T1==T2, and at runtime-time that a==b
33 template<typename T1,typename T2>
35 is_same_block(const T1& a, const T2& b)
36 {
37  return a.isApprox(b);
38 }
39 
40 template<typename MatrixType> void block(const MatrixType& m)
41 {
42  typedef typename MatrixType::Scalar Scalar;
43  typedef typename MatrixType::RealScalar RealScalar;
47  typedef Matrix<Scalar, Dynamic, 1> DynamicVectorType;
48 
49  Index rows = m.rows();
50  Index cols = m.cols();
51 
52  MatrixType m1 = MatrixType::Random(rows, cols),
53  m1_copy = m1,
54  m2 = MatrixType::Random(rows, cols),
55  m3(rows, cols),
56  ones = MatrixType::Ones(rows, cols);
57  VectorType v1 = VectorType::Random(rows);
58 
59  Scalar s1 = internal::random<Scalar>();
60 
61  Index r1 = internal::random<Index>(0,rows-1);
62  Index r2 = internal::random<Index>(r1,rows-1);
63  Index c1 = internal::random<Index>(0,cols-1);
64  Index c2 = internal::random<Index>(c1,cols-1);
65 
66  block_real_only(m1, r1, r2, c1, c1, s1);
67 
68  //check row() and col()
69  VERIFY_IS_EQUAL(m1.col(c1).transpose(), m1.transpose().row(c1));
70  //check operator(), both constant and non-constant, on row() and col()
71  m1 = m1_copy;
72  m1.row(r1) += s1 * m1_copy.row(r2);
73  VERIFY_IS_APPROX(m1.row(r1), m1_copy.row(r1) + s1 * m1_copy.row(r2));
74  // check nested block xpr on lhs
75  m1.row(r1).row(0) += s1 * m1_copy.row(r2);
76  VERIFY_IS_APPROX(m1.row(r1), m1_copy.row(r1) + Scalar(2) * s1 * m1_copy.row(r2));
77  m1 = m1_copy;
78  m1.col(c1) += s1 * m1_copy.col(c2);
79  VERIFY_IS_APPROX(m1.col(c1), m1_copy.col(c1) + s1 * m1_copy.col(c2));
80  m1.col(c1).col(0) += s1 * m1_copy.col(c2);
81  VERIFY_IS_APPROX(m1.col(c1), m1_copy.col(c1) + Scalar(2) * s1 * m1_copy.col(c2));
82 
83 
84  //check block()
86 
87  RowVectorType br1(m1.block(r1,0,1,cols));
88  VectorType bc1(m1.block(0,c1,rows,1));
89  VERIFY_IS_EQUAL(b1, m1.block(r1,c1,1,1));
90  VERIFY_IS_EQUAL(m1.row(r1), br1);
91  VERIFY_IS_EQUAL(m1.col(c1), bc1);
92  //check operator(), both constant and non-constant, on block()
93  m1.block(r1,c1,r2-r1+1,c2-c1+1) = s1 * m2.block(0, 0, r2-r1+1,c2-c1+1);
94  m1.block(r1,c1,r2-r1+1,c2-c1+1)(r2-r1,c2-c1) = m2.block(0, 0, r2-r1+1,c2-c1+1)(0,0);
95 
96  const Index BlockRows = 2;
97  const Index BlockCols = 5;
98 
99  if (rows>=5 && cols>=8)
100  {
101  // test fixed block() as lvalue
102  m1.template block<BlockRows,BlockCols>(1,1) *= s1;
103  // test operator() on fixed block() both as constant and non-constant
104  m1.template block<BlockRows,BlockCols>(1,1)(0, 3) = m1.template block<2,5>(1,1)(1,2);
105  // check that fixed block() and block() agree
106  Matrix<Scalar,Dynamic,Dynamic> b = m1.template block<BlockRows,BlockCols>(3,3);
107  VERIFY_IS_EQUAL(b, m1.block(3,3,BlockRows,BlockCols));
108 
109  // same tests with mixed fixed/dynamic size
110  m1.template block<BlockRows,Dynamic>(1,1,BlockRows,BlockCols) *= s1;
111  m1.template block<BlockRows,Dynamic>(1,1,BlockRows,BlockCols)(0,3) = m1.template block<2,5>(1,1)(1,2);
112  Matrix<Scalar,Dynamic,Dynamic> b2 = m1.template block<Dynamic,BlockCols>(3,3,2,5);
113  VERIFY_IS_EQUAL(b2, m1.block(3,3,BlockRows,BlockCols));
114 
115  VERIFY(is_same_block(m1.block(3,3,BlockRows,BlockCols), m1.block(3,3,fix<Dynamic>(BlockRows),fix<Dynamic>(BlockCols))));
116  VERIFY(is_same_block(m1.template block<BlockRows,Dynamic>(1,1,BlockRows,BlockCols), m1.block(1,1,fix<BlockRows>,BlockCols)));
117  VERIFY(is_same_block(m1.template block<BlockRows,BlockCols>(1,1,BlockRows,BlockCols), m1.block(1,1,fix<BlockRows>(),fix<BlockCols>)));
118  VERIFY(is_same_block(m1.template block<BlockRows,BlockCols>(1,1,BlockRows,BlockCols), m1.block(1,1,fix<BlockRows>,fix<BlockCols>(BlockCols))));
119  }
120 
121  if (rows>2)
122  {
123  // test sub vectors
124  VERIFY_IS_EQUAL(v1.template head<2>(), v1.block(0,0,2,1));
125  VERIFY_IS_EQUAL(v1.template head<2>(), v1.head(2));
126  VERIFY_IS_EQUAL(v1.template head<2>(), v1.segment(0,2));
127  VERIFY_IS_EQUAL(v1.template head<2>(), v1.template segment<2>(0));
128  Index i = rows-2;
129  VERIFY_IS_EQUAL(v1.template tail<2>(), v1.block(i,0,2,1));
130  VERIFY_IS_EQUAL(v1.template tail<2>(), v1.tail(2));
131  VERIFY_IS_EQUAL(v1.template tail<2>(), v1.segment(i,2));
132  VERIFY_IS_EQUAL(v1.template tail<2>(), v1.template segment<2>(i));
133  i = internal::random<Index>(0,rows-2);
134  VERIFY_IS_EQUAL(v1.segment(i,2), v1.template segment<2>(i));
135  }
136 
137  // stress some basic stuffs with block matrices
138  VERIFY(numext::real(ones.col(c1).sum()) == RealScalar(rows));
139  VERIFY(numext::real(ones.row(r1).sum()) == RealScalar(cols));
140 
141  VERIFY(numext::real(ones.col(c1).dot(ones.col(c2))) == RealScalar(rows));
142  VERIFY(numext::real(ones.row(r1).dot(ones.row(r2))) == RealScalar(cols));
143 
144  // check that linear acccessors works on blocks
145  m1 = m1_copy;
146  if((MatrixType::Flags&RowMajorBit)==0)
147  VERIFY_IS_EQUAL(m1.leftCols(c1).coeff(r1+c1*rows), m1(r1,c1));
148  else
149  VERIFY_IS_EQUAL(m1.topRows(r1).coeff(c1+r1*cols), m1(r1,c1));
150 
151 
152  // now test some block-inside-of-block.
153 
154  // expressions with direct access
155  VERIFY_IS_EQUAL( (m1.block(r1,c1,rows-r1,cols-c1).block(r2-r1,c2-c1,rows-r2,cols-c2)) , (m1.block(r2,c2,rows-r2,cols-c2)) );
156  VERIFY_IS_EQUAL( (m1.block(r1,c1,r2-r1+1,c2-c1+1).row(0)) , (m1.row(r1).segment(c1,c2-c1+1)) );
157  VERIFY_IS_EQUAL( (m1.block(r1,c1,r2-r1+1,c2-c1+1).col(0)) , (m1.col(c1).segment(r1,r2-r1+1)) );
158  VERIFY_IS_EQUAL( (m1.block(r1,c1,r2-r1+1,c2-c1+1).transpose().col(0)) , (m1.row(r1).segment(c1,c2-c1+1)).transpose() );
159  VERIFY_IS_EQUAL( (m1.transpose().block(c1,r1,c2-c1+1,r2-r1+1).col(0)) , (m1.row(r1).segment(c1,c2-c1+1)).transpose() );
160 
161  // expressions without direct access
163  VERIFY_IS_APPROX( ((m1+m2).block(r1,c1,r2-r1+1,c2-c1+1).row(0)) , ((m1+m2).row(r1).segment(c1,c2-c1+1)) );
164  VERIFY_IS_APPROX( ((m1+m2).block(r1,c1,r2-r1+1,c2-c1+1).row(0)) , ((m1+m2).eval().row(r1).segment(c1,c2-c1+1)) );
165  VERIFY_IS_APPROX( ((m1+m2).block(r1,c1,r2-r1+1,c2-c1+1).col(0)) , ((m1+m2).col(c1).segment(r1,r2-r1+1)) );
166  VERIFY_IS_APPROX( ((m1+m2).block(r1,c1,r2-r1+1,c2-c1+1).transpose().col(0)) , ((m1+m2).row(r1).segment(c1,c2-c1+1)).transpose() );
167  VERIFY_IS_APPROX( ((m1+m2).transpose().block(c1,r1,c2-c1+1,r2-r1+1).col(0)) , ((m1+m2).row(r1).segment(c1,c2-c1+1)).transpose() );
168  VERIFY_IS_APPROX( ((m1+m2).template block<Dynamic,1>(r1,c1,r2-r1+1,1)) , ((m1+m2).eval().col(c1).eval().segment(r1,r2-r1+1)) );
169  VERIFY_IS_APPROX( ((m1+m2).template block<1,Dynamic>(r1,c1,1,c2-c1+1)) , ((m1+m2).eval().row(r1).eval().segment(c1,c2-c1+1)) );
170  VERIFY_IS_APPROX( ((m1+m2).transpose().template block<1,Dynamic>(c1,r1,1,r2-r1+1)) , ((m1+m2).eval().col(c1).eval().segment(r1,r2-r1+1)).transpose() );
171  VERIFY_IS_APPROX( (m1+m2).row(r1).eval(), (m1+m2).eval().row(r1) );
172  VERIFY_IS_APPROX( (m1+m2).adjoint().col(r1).eval(), (m1+m2).adjoint().eval().col(r1) );
173  VERIFY_IS_APPROX( (m1+m2).adjoint().row(c1).eval(), (m1+m2).adjoint().eval().row(c1) );
174  VERIFY_IS_APPROX( (m1*1).row(r1).segment(c1,c2-c1+1).eval(), m1.row(r1).eval().segment(c1,c2-c1+1).eval() );
175  VERIFY_IS_APPROX( m1.col(c1).reverse().segment(r1,r2-r1+1).eval(),m1.col(c1).reverse().eval().segment(r1,r2-r1+1).eval() );
176 
177  VERIFY_IS_APPROX( (m1*1).topRows(r1), m1.topRows(r1) );
178  VERIFY_IS_APPROX( (m1*1).leftCols(c1), m1.leftCols(c1) );
179  VERIFY_IS_APPROX( (m1*1).transpose().topRows(c1), m1.transpose().topRows(c1) );
180  VERIFY_IS_APPROX( (m1*1).transpose().leftCols(r1), m1.transpose().leftCols(r1) );
181  VERIFY_IS_APPROX( (m1*1).transpose().middleRows(c1,c2-c1+1), m1.transpose().middleRows(c1,c2-c1+1) );
182  VERIFY_IS_APPROX( (m1*1).transpose().middleCols(r1,r2-r1+1), m1.transpose().middleCols(r1,r2-r1+1) );
183 
184  // evaluation into plain matrices from expressions with direct access (stress MapBase)
185  DynamicMatrixType dm;
186  DynamicVectorType dv;
187  dm.setZero();
188  dm = m1.block(r1,c1,rows-r1,cols-c1).block(r2-r1,c2-c1,rows-r2,cols-c2);
189  VERIFY_IS_EQUAL(dm, (m1.block(r2,c2,rows-r2,cols-c2)));
190  dm.setZero();
191  dv.setZero();
192  dm = m1.block(r1,c1,r2-r1+1,c2-c1+1).row(0).transpose();
193  dv = m1.row(r1).segment(c1,c2-c1+1);
194  VERIFY_IS_EQUAL(dv, dm);
195  dm.setZero();
196  dv.setZero();
197  dm = m1.col(c1).segment(r1,r2-r1+1);
198  dv = m1.block(r1,c1,r2-r1+1,c2-c1+1).col(0);
199  VERIFY_IS_EQUAL(dv, dm);
200  dm.setZero();
201  dv.setZero();
202  dm = m1.block(r1,c1,r2-r1+1,c2-c1+1).transpose().col(0);
203  dv = m1.row(r1).segment(c1,c2-c1+1);
204  VERIFY_IS_EQUAL(dv, dm);
205  dm.setZero();
206  dv.setZero();
207  dm = m1.row(r1).segment(c1,c2-c1+1).transpose();
208  dv = m1.transpose().block(c1,r1,c2-c1+1,r2-r1+1).col(0);
209  VERIFY_IS_EQUAL(dv, dm);
210 
211  VERIFY_IS_EQUAL( (m1.template block<Dynamic,1>(1,0,0,1)), m1.block(1,0,0,1));
212  VERIFY_IS_EQUAL( (m1.template block<1,Dynamic>(0,1,1,0)), m1.block(0,1,1,0));
213  VERIFY_IS_EQUAL( ((m1*1).template block<Dynamic,1>(1,0,0,1)), m1.block(1,0,0,1));
214  VERIFY_IS_EQUAL( ((m1*1).template block<1,Dynamic>(0,1,1,0)), m1.block(0,1,1,0));
215 
216  if (rows>=2 && cols>=2)
217  {
218  VERIFY_RAISES_ASSERT( m1 += m1.col(0) );
219  VERIFY_RAISES_ASSERT( m1 -= m1.col(0) );
220  VERIFY_RAISES_ASSERT( m1.array() *= m1.col(0).array() );
221  VERIFY_RAISES_ASSERT( m1.array() /= m1.col(0).array() );
222  }
223 
224  VERIFY_IS_EQUAL( m1.template subVector<Horizontal>(r1), m1.row(r1) );
225  VERIFY_IS_APPROX( (m1+m1).template subVector<Horizontal>(r1), (m1+m1).row(r1) );
226  VERIFY_IS_EQUAL( m1.template subVector<Vertical>(c1), m1.col(c1) );
227  VERIFY_IS_APPROX( (m1+m1).template subVector<Vertical>(c1), (m1+m1).col(c1) );
228  VERIFY_IS_EQUAL( m1.template subVectors<Horizontal>(), m1.rows() );
229  VERIFY_IS_EQUAL( m1.template subVectors<Vertical>(), m1.cols() );
230 
231  if (rows>=2 || cols>=2) {
232  VERIFY_IS_EQUAL( int(m1.middleCols(0,0).IsRowMajor), int(m1.IsRowMajor) );
233  VERIFY_IS_EQUAL( m1.middleCols(0,0).outerSize(), m1.IsRowMajor ? rows : 0);
234  VERIFY_IS_EQUAL( m1.middleCols(0,0).innerSize(), m1.IsRowMajor ? 0 : rows);
235 
236  VERIFY_IS_EQUAL( int(m1.middleRows(0,0).IsRowMajor), int(m1.IsRowMajor) );
237  VERIFY_IS_EQUAL( m1.middleRows(0,0).outerSize(), m1.IsRowMajor ? 0 : cols);
238  VERIFY_IS_EQUAL( m1.middleRows(0,0).innerSize(), m1.IsRowMajor ? cols : 0);
239  }
240 }
241 
242 
243 template<typename MatrixType>
245 {
246  Index rows = m.rows();
247  Index cols = m.cols();
248  Index size = m.size();
249  Index innerStride = m.innerStride();
250  Index outerStride = m.outerStride();
251  Index rowStride = m.rowStride();
252  Index colStride = m.colStride();
253  const typename MatrixType::Scalar* data = m.data();
254 
255  for(int j=0;j<cols;++j)
256  for(int i=0;i<rows;++i)
257  VERIFY(m.coeff(i,j) == data[i*rowStride + j*colStride]);
258 
259  if(!MatrixType::IsVectorAtCompileTime)
260  {
261  for(int j=0;j<cols;++j)
262  for(int i=0;i<rows;++i)
263  VERIFY(m.coeff(i,j) == data[(MatrixType::Flags&RowMajorBit)
264  ? i*outerStride + j*innerStride
265  : j*outerStride + i*innerStride]);
266  }
267 
268  if(MatrixType::IsVectorAtCompileTime)
269  {
270  VERIFY(innerStride == int((&m.coeff(1))-(&m.coeff(0))));
271  for (int i=0;i<size;++i)
272  VERIFY(m.coeff(i) == data[i*innerStride]);
273  }
274 }
275 
276 template<typename MatrixType>
278 {
279  Index rows = m.rows();
280  Index cols = m.cols();
281 
282  Index r1 = internal::random<Index>(0,rows-1);
283  Index r2 = internal::random<Index>(r1,rows-1);
284  Index c1 = internal::random<Index>(0,cols-1);
285  Index c2 = internal::random<Index>(c1,cols-1);
286 
287  MatrixType m1 = MatrixType::Random(rows, cols);
288  compare_using_data_and_stride(m1.block(r1, c1, r2-r1+1, c2-c1+1));
289  compare_using_data_and_stride(m1.transpose().block(c1, r1, c2-c1+1, r2-r1+1));
292  compare_using_data_and_stride(m1.row(r1).transpose());
293  compare_using_data_and_stride(m1.col(c1).transpose());
294 }
295 
297 {
298  for(int i = 0; i < g_repeat; i++) {
300  CALL_SUBTEST_1( block(Matrix<float, 1, Dynamic>(internal::random(2,50))) );
301  CALL_SUBTEST_1( block(Matrix<float, Dynamic, 1>(internal::random(2,50))) );
302  CALL_SUBTEST_2( block(Matrix4d()) );
303  CALL_SUBTEST_3( block(MatrixXcf(internal::random(2,50), internal::random(2,50))) );
304  CALL_SUBTEST_4( block(MatrixXi(internal::random(2,50), internal::random(2,50))) );
305  CALL_SUBTEST_5( block(MatrixXcd(internal::random(2,50), internal::random(2,50))) );
306  CALL_SUBTEST_6( block(MatrixXf(internal::random(2,50), internal::random(2,50))) );
307  CALL_SUBTEST_7( block(Matrix<int,Dynamic,Dynamic,RowMajor>(internal::random(2,50), internal::random(2,50))) );
308 
310 
311 #ifndef EIGEN_DEFAULT_TO_ROW_MAJOR
312  CALL_SUBTEST_6( data_and_stride(MatrixXf(internal::random(5,50), internal::random(5,50))) );
313  CALL_SUBTEST_7( data_and_stride(Matrix<int,Dynamic,Dynamic,RowMajor>(internal::random(5,50), internal::random(5,50))) );
314 #endif
315  }
316 }
block_real_only
Eigen::internal::enable_if<!NumTraits< typename MatrixType::Scalar >::IsComplex, typename MatrixType::Scalar >::type block_real_only(const MatrixType &m1, Index r1, Index r2, Index c1, Index c2, const Scalar &s1)
Definition: block.cpp:15
simple_graph::b1
Vector2 b1(2, -1)
col
m col(1)
block
void block(const MatrixType &m)
Definition: block.cpp:40
gtsam.examples.DogLegOptimizerExample.type
type
Definition: DogLegOptimizerExample.py:111
MatrixType
MatrixXf MatrixType
Definition: benchmark-blocking-sizes.cpp:52
r2
static const double r2
Definition: testSmartRangeFactor.cpp:32
VERIFY_IS_EQUAL
#define VERIFY_IS_EQUAL(a, b)
Definition: main.h:386
b
Scalar * b
Definition: benchVecAdd.cpp:17
simple_graph::b2
Vector2 b2(4, -5)
Eigen::RowMajorBit
const unsigned int RowMajorBit
Definition: Constants.h:66
m1
Matrix3d m1
Definition: IOFormat.cpp:2
real
float real
Definition: datatypes.h:10
r1
static const double r1
Definition: testSmartRangeFactor.cpp:32
rows
int rows
Definition: Tutorial_commainit_02.cpp:1
middleCols
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE NColsBlockXpr< internal::get_fixed_value< NColsType >::value >::Type middleCols(Index startCol, NColsType numCols)
Definition: BlockMethods.h:948
VERIFY_RAISES_ASSERT
#define VERIFY_RAISES_ASSERT(a)
Definition: main.h:340
size
Scalar Scalar int size
Definition: benchVecAdd.cpp:17
c1
static double c1
Definition: airy.c:54
leftCols
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE NColsBlockXpr< internal::get_fixed_value< NColsType >::value >::Type leftCols(NColsType n)
Definition: BlockMethods.h:797
CALL_SUBTEST_4
#define CALL_SUBTEST_4(FUNC)
Definition: split_test_helper.h:22
m2
MatrixType m2(n_dims)
CALL_SUBTEST_3
#define CALL_SUBTEST_3(FUNC)
Definition: split_test_helper.h:16
topRows
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE NRowsBlockXpr< internal::get_fixed_value< NRowsType >::value >::Type topRows(NRowsType n)
Definition: BlockMethods.h:570
CALL_SUBTEST_1
#define CALL_SUBTEST_1(FUNC)
Definition: split_test_helper.h:4
data
int data[]
Definition: Map_placement_new.cpp:1
segment
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE FixedSegmentReturnType< internal::get_fixed_value< NType >::value >::Type segment(Index start, NType n)
Definition: BlockMethods.h:1158
j
std::ptrdiff_t j
Definition: tut_arithmetic_redux_minmax.cpp:2
head< 2 >
v head< 2 >().setZero()
CALL_SUBTEST_5
#define CALL_SUBTEST_5(FUNC)
Definition: split_test_helper.h:28
Eigen::g_repeat
static int g_repeat
Definition: main.h:169
m
Matrix3f m
Definition: AngleAxis_mimic_euler.cpp:1
T2
static const Pose3 T2(Rot3::Rodrigues(0.3, 0.2, 0.1), P2)
CALL_SUBTEST_6
#define CALL_SUBTEST_6(FUNC)
Definition: split_test_helper.h:34
CALL_SUBTEST_2
#define CALL_SUBTEST_2(FUNC)
Definition: split_test_helper.h:10
data_and_stride
void data_and_stride(const MatrixType &m)
Definition: block.cpp:277
VERIFY_IS_APPROX
#define VERIFY_IS_APPROX(a, b)
Definition: integer_types.cpp:15
RealScalar
NumTraits< Scalar >::Real RealScalar
Definition: bench_gemm.cpp:47
m3
static const DiscreteKey m3(M(3), 2)
a
ArrayXXi a
Definition: Array_initializer_list_23_cxx11.cpp:1
main.h
middleRows
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE NRowsBlockXpr< internal::get_fixed_value< NRowsType >::value >::Type middleRows(Index startRow, NRowsType n)
Definition: BlockMethods.h:721
row
m row(1)
c2
static double c2
Definition: airy.c:55
is_same_block
internal::enable_if< internal::is_same< T1, T2 >::value, bool >::type is_same_block(const T1 &a, const T2 &b)
Definition: block.cpp:35
compare_using_data_and_stride
void compare_using_data_and_stride(const MatrixType &m)
Definition: block.cpp:244
Eigen::Matrix
The matrix class, also used for vectors and row-vectors.
Definition: 3rdparty/Eigen/Eigen/src/Core/Matrix.h:178
EIGEN_DECLARE_TEST
EIGEN_DECLARE_TEST(block)
Definition: block.cpp:296
VectorType
Definition: FFTW.cpp:65
Eigen::internal::enable_if
Definition: Meta.h:273
cols
int cols
Definition: Tutorial_commainit_02.cpp:1
T1
static const Similarity3 T1(R, Point3(3.5, -8.2, 4.2), 1)
CALL_SUBTEST_7
#define CALL_SUBTEST_7(FUNC)
Definition: split_test_helper.h:40
CALL_SUBTEST_8
#define CALL_SUBTEST_8(FUNC)
Definition: split_test_helper.h:46
adjoint
void adjoint(const MatrixType &m)
Definition: adjoint.cpp:67
test_callbacks.value
value
Definition: test_callbacks.py:160
eval
internal::nested_eval< T, 1 >::type eval(const T &xpr)
Definition: sparse_permutations.cpp:38
i
int i
Definition: BiCGSTAB_step_by_step.cpp:9
tail< 2 >
v tail< 2 >().setZero()
v1
Vector v1
Definition: testSerializationBase.cpp:38
ones
MatrixXcf ones
Definition: ComplexEigenSolver_eigenvalues.cpp:1
Scalar
SCALAR Scalar
Definition: bench_gemm.cpp:46
VERIFY
#define VERIFY(a)
Definition: main.h:380
Eigen::Index
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.
Definition: Meta.h:74


gtsam
Author(s):
autogenerated on Sat Nov 16 2024 04:01:56