/external/eigen/test/ |
conservative_resize.cpp | 40 const Index rows = internal::random<Index>(1,50); local 43 m.conservativeResize(rows,cols); 44 VERIFY_IS_APPROX(m, n.block(0,0,rows,cols)); 50 const Index rows = internal::random<Index>(50,75); local 53 m.conservativeResizeLike(MatrixType::Zero(rows,cols)); 54 VERIFY_IS_APPROX(m.block(0,0,n.rows(),n.cols()), n); 55 VERIFY( rows<=50 || m.block(50,0,rows-50,cols).sum() == Scalar(0) ); 56 VERIFY( cols<=50 || m.block(0,50,rows,cols-50).sum() == Scalar(0) ); 77 m.conservativeResize(m.rows(),1) [all...] |
corners.cpp | 19 Index rows = m.rows(); local 22 Index r = internal::random<Index>(1,rows); 25 MatrixType matrix = MatrixType::Random(rows,cols); 26 const MatrixType const_matrix = MatrixType::Random(rows,cols); 30 COMPARE_CORNER(bottomLeftCorner(r,c), block(rows-r,0,r,c)); 31 COMPARE_CORNER(bottomRightCorner(r,c), block(rows-r,cols-c,r,c)); 33 Index sr = internal::random<Index>(1,rows) - 1; 34 Index nr = internal::random<Index>(1,rows-sr); 40 COMPARE_CORNER(bottomRows(r), block(rows-r,0,r,cols)) 52 rows = MatrixType::RowsAtCompileTime, enumerator in enum:__anon12060 [all...] |
dontalign.cpp | 27 Index rows = m.rows(); local 30 MatrixType a = MatrixType::Random(rows,cols); 31 SquareMatrixType square = SquareMatrixType::Random(rows,rows); 32 VectorType v = VectorType::Random(rows); 43 Scalar* array = internal::aligned_new<Scalar>(rows); 44 v = VectorType::MapAligned(array, rows); 45 internal::aligned_delete(array, rows);
|
eigen2support.cpp | 20 Index rows = m.rows(); local 23 MatrixType m1 = MatrixType::Random(rows, cols), 24 m3(rows, cols); 31 VERIFY_IS_APPROX(m1.cwise() + s1, MatrixType::Constant(rows,cols,s1) + m1); 32 VERIFY_IS_APPROX((m1*Scalar(2)).cwise() - s2, (m1+m1) - MatrixType::Constant(rows,cols,s2) ); 44 VERIFY_IS_EQUAL((m1.col(0).end(1)), (m1.col(0).segment(rows-1,1))); 45 VERIFY_IS_EQUAL((m1.col(0).template end<1>()), (m1.col(0).segment(rows-1,1)));
|
eigensolver_complex.cpp | 17 by checking that the k-th power sums are equal for k = 1, ..., vec1.rows() */ 25 VERIFY(vec1.rows() == vec2.rows()); 26 for (int k = 1; k <= vec1.rows(); ++k) 39 Index rows = m.rows(); local 45 MatrixType a = MatrixType::Random(rows,cols); 60 ei2.setMaxIterations(ComplexSchur<MatrixType>::m_maxIterationsPerRow * rows).compute(a); 64 if (rows > 2) { 75 MatrixType z = MatrixType::Zero(rows,cols) [all...] |
eigensolver_generalized_real.cpp | 20 Index rows = m.rows(); local 26 MatrixType a = MatrixType::Random(rows,cols); 27 MatrixType b = MatrixType::Random(rows,cols); 28 MatrixType a1 = MatrixType::Random(rows,cols); 29 MatrixType b1 = MatrixType::Random(rows,cols);
|
inverse.cpp | 21 Index rows = m.rows(); local 26 MatrixType m1(rows, cols), 27 m2(rows, cols), 28 identity = MatrixType::Identity(rows, rows); 29 createRandomPIMatrixOfRank(rows,rows,rows,m1); 64 VectorType v3 = VectorType::Random(rows); [all...] |
jacobi.cpp | 18 Index rows = m.rows(); local 28 const MatrixType a(MatrixType::Random(rows, cols)); 35 Index p = internal::random<Index>(0, rows-1); 38 q = internal::random<Index>(0, rows-1);
|
linearstructure.cpp | 21 Index rows = m.rows(); local 26 MatrixType m1 = MatrixType::Random(rows, cols), 27 m2 = MatrixType::Random(rows, cols), 28 m3(rows, cols); 33 Index r = internal::random<Index>(0, rows-1), 65 VERIFY_IS_APPROX(m1+m1.block(0,0,rows,cols), m1+m1); 66 VERIFY_IS_APPROX(m1.cwiseProduct(m1.block(0,0,rows,cols)), m1.cwiseProduct(m1)); 67 VERIFY_IS_APPROX(m1 - m1.block(0,0,rows,cols), m1 - m1); 68 VERIFY_IS_APPROX(m1.block(0,0,rows,cols) * s1, m1 * s1) [all...] |
mapstaticmethods.cpp | 72 int rows = m.rows(), cols = m.cols(); local 76 PlainObjectType::Map(ptr, rows, cols).setZero(); 77 PlainObjectType::MapAligned(ptr, rows, cols).setZero(); 78 PlainObjectType::Map(const_ptr, rows, cols).sum(); 79 PlainObjectType::MapAligned(const_ptr, rows, cols).sum(); 81 PlainObjectType::Map(ptr, rows, cols, InnerStride<>(i)).setZero(); 82 PlainObjectType::MapAligned(ptr, rows, cols, InnerStride<>(i)).setZero(); 83 PlainObjectType::Map(const_ptr, rows, cols, InnerStride<>(i)).sum(); 84 PlainObjectType::MapAligned(const_ptr, rows, cols, InnerStride<>(i)).sum() [all...] |
mapstride.cpp | 56 Index rows = _m.rows(), cols = _m.cols(); local 58 MatrixType m = MatrixType::Random(rows,cols); 60 Index arraysize = 2*(rows+4)*(cols+4); 69 Map<MatrixType, Alignment, OuterStride<Dynamic> > map(array, rows, cols, OuterStride<Dynamic>(m.innerSize()+1)); 88 map(array, rows, cols, OuterStride<OuterStrideAtCompileTime>(m.innerSize()+4)); 101 Map<MatrixType, Alignment, Stride<Dynamic,Dynamic> > map(array, rows, cols, Stride<Dynamic,Dynamic>(2*m.innerSize()+1, 2));
|
miscmatrices.cpp | 20 Index rows = m.rows(); local 23 Index r = internal::random<Index>(0, rows-1), r2 = internal::random<Index>(0, rows-1), c = internal::random<Index>(0, cols-1); 24 VERIFY_IS_APPROX(MatrixType::Ones(rows,cols)(r,c), static_cast<Scalar>(1)); 25 MatrixType m1 = MatrixType::Ones(rows,cols); 27 VectorType v1 = VectorType::Random(rows); 33 square = MatrixType::Zero(rows, rows); 34 square.diagonal() = VectorType::Ones(rows); [all...] |
product_trmv.cpp | 21 Index rows = m.rows(); local 24 MatrixType m1 = MatrixType::Random(rows, cols), 25 m3(rows, cols); 26 VectorType v1 = VectorType::Random(rows); 30 m1 = MatrixType::Random(rows, cols);
|
qtvector.cpp | 23 Index rows = m.rows(); local 25 MatrixType x = MatrixType::Random(rows,cols), y = MatrixType::Random(rows,cols); 26 QVector<MatrixType> v(10, MatrixType(rows,cols)), w(20, y);
|
/external/eigen/test/eigen2/ |
eigen2_basicstuff.cpp | 17 int rows = m.rows(); local 22 MatrixType m1 = MatrixType::Random(rows, cols), 23 m2 = MatrixType::Random(rows, cols), 24 m3(rows, cols), 25 mzero = MatrixType::Zero(rows, cols), 26 square = Matrix<Scalar, MatrixType::RowsAtCompileTime, MatrixType::RowsAtCompileTime>::Random(rows, rows); 27 VectorType v1 = VectorType::Random(rows), 28 vzero = VectorType::Zero(rows); [all...] |
eigen2_linearstructure.cpp | 21 int rows = m.rows(); local 26 MatrixType m1 = MatrixType::Random(rows, cols), 27 m2 = MatrixType::Random(rows, cols), 28 m3(rows, cols); 33 int r = ei_random<int>(0, rows-1), 65 VERIFY_IS_APPROX(m1+m1.block(0,0,rows,cols), m1+m1); 66 VERIFY_IS_APPROX(m1.cwise() * m1.block(0,0,rows,cols), m1.cwise() * m1); 67 VERIFY_IS_APPROX(m1 - m1.block(0,0,rows,cols), m1 - m1); 68 VERIFY_IS_APPROX(m1.block(0,0,rows,cols) * s1, m1 * s1) [all...] |
eigen2_map.cpp | 42 int rows = m.rows(), cols = m.cols(), size = rows*cols; local 52 Map<MatrixType, Aligned>(array1, rows, cols) = MatrixType::Ones(rows,cols); 53 Map<MatrixType>(array2, rows, cols) = Map<MatrixType>((const Scalar*)array1, rows, cols); // test non-const-correctness support in eigen2 54 Map<MatrixType>(array3unaligned, rows, cols) = Map<MatrixType>(array1, rows, cols); 55 MatrixType ma1 = Map<MatrixType>(array1, rows, cols) [all...] |
eigen2_miscmatrices.cpp | 21 int rows = m.rows(); local 24 int r = ei_random<int>(0, rows-1), r2 = ei_random<int>(0, rows-1), c = ei_random<int>(0, cols-1); 25 VERIFY_IS_APPROX(MatrixType::Ones(rows,cols)(r,c), static_cast<Scalar>(1)); 26 MatrixType m1 = MatrixType::Ones(rows,cols); 28 VectorType v1 = VectorType::Random(rows); 34 square = MatrixType::Zero(rows, rows); 35 square.diagonal() = VectorType::Ones(rows); [all...] |
eigen2_newstdvector.cpp | 18 int rows = m.rows(); local 20 MatrixType x = MatrixType::Random(rows,cols), y = MatrixType::Random(rows,cols); 21 std::vector<MatrixType,Eigen::aligned_allocator<MatrixType> > v(10, MatrixType(rows,cols)), w(20, y);
|
eigen2_nomalloc.cpp | 29 int rows = m.rows(); local 32 MatrixType m1 = MatrixType::Random(rows, cols), 33 m2 = MatrixType::Random(rows, cols); 37 int r = ei_random<int>(0, rows-1), 42 VERIFY_IS_APPROX(m1.cwise() * m1.block(0,0,rows,cols), m1.cwise() * m1);
|
eigen2_qtvector.cpp | 23 int rows = m.rows(); local 25 MatrixType x = MatrixType::Random(rows,cols), y = MatrixType::Random(rows,cols); 26 QVector<MatrixType> v(10, MatrixType(rows,cols)), w(20, y);
|
eigen2_stdvector.cpp | 17 int rows = m.rows(); local 19 MatrixType x = MatrixType::Random(rows,cols), y = MatrixType::Random(rows,cols); 20 std::vector<MatrixType, aligned_allocator<MatrixType> > v(10, MatrixType(rows,cols)), w(20, y);
|
eigen2_sum.cpp | 16 int rows = m.rows(); local 19 MatrixType m1 = MatrixType::Random(rows, cols); 21 VERIFY_IS_MUCH_SMALLER_THAN(MatrixType::Zero(rows, cols).sum(), Scalar(1)); 22 VERIFY_IS_APPROX(MatrixType::Ones(rows, cols).sum(), Scalar(float(rows*cols))); // the float() here to shut up excessive MSVC warning about int->complex conversion being lossy 24 for(int i = 0; i < rows; i++) for(int j = 0; j < cols; j++) x += m1(i,j);
|
eigen2_svd.cpp | 18 int rows = m.rows(); local 23 MatrixType a = MatrixType::Random(rows,cols); 25 Matrix<Scalar, MatrixType::RowsAtCompileTime, 1>::Random(rows,1); 34 MatrixType sigma = MatrixType::Zero(rows,cols); 35 MatrixType matU = MatrixType::Zero(rows,rows); 37 matU.block(0,0,rows,cols) = svd.matrixU(); 42 if (rows==cols) 46 MatrixType a1 = MatrixType::Random(rows,cols) [all...] |
eigen2_swap.cpp | 31 int rows = m.rows(); local 35 MatrixType m1 = MatrixType::Random(rows,cols); 36 MatrixType m2 = MatrixType::Random(rows,cols) + Scalar(100) * MatrixType::Identity(rows,cols); 37 OtherMatrixType m3 = OtherMatrixType::Random(rows,cols) + Scalar(200) * OtherMatrixType::Identity(rows,cols); 58 m1.swap(m2.block(0,0,rows,cols));
|