Home | History | Annotate | Download | only in test

Lines Matching refs:cols

23   const Index cols = ref.cols();
31 double density = (std::max)(8./(rows*cols), 0.01);
38 SparseMatrixType m(rows, cols);
39 DenseMatrix refMat = DenseMatrix::Zero(rows, cols);
64 VERIFY_RAISES_ASSERT( m.coeffRef(0,m.cols()) = 0 );
69 DenseMatrix m1(rows,cols);
71 SparseMatrixType m2(rows,cols);
82 for (Index j=0; j<cols; ++j)
103 DenseMatrix m1(rows,cols);
105 SparseMatrixType m2(rows,cols);
108 for (int k=0; k<rows*cols; ++k)
111 Index j = internal::random<Index>(0,cols-1);
127 DenseMatrix m1(rows,cols);
129 SparseMatrixType m2(rows,cols);
132 for (Index k=0; k<rows*cols; ++k)
135 Index j = internal::random<Index>(0,cols-1);
148 DenseMatrix refM1 = DenseMatrix::Zero(rows, cols);
149 DenseMatrix refM2 = DenseMatrix::Zero(rows, cols);
150 DenseMatrix refM3 = DenseMatrix::Zero(rows, cols);
151 DenseMatrix refM4 = DenseMatrix::Zero(rows, cols);
152 SparseMatrixType m1(rows, cols);
153 SparseMatrixType m2(rows, cols);
154 SparseMatrixType m3(rows, cols);
155 SparseMatrixType m4(rows, cols);
179 DenseVector rv = DenseVector::Random(m1.cols());
182 Index c = internal::random<Index>(0,m1.cols()-1);
183 VERIFY_IS_APPROX(( m1.template block<1,Dynamic>(r,0,1,m1.cols()).dot(rv)) , refM1.row(r).dot(rv));
225 if (rows>=2 && cols>=2)
276 DenseMatrix refMat2 = DenseMatrix::Zero(rows, cols);
277 SparseMatrixType m2(rows, cols);
306 DenseMatrix refMat2 = DenseMatrix::Zero(rows, cols);
307 SparseMatrixType m2(rows, cols);
321 SparseMatrixType m2(rows, cols);
322 DenseMatrix refM2(rows, cols);
327 for (Index j=0; j<m2.cols(); ++j)
363 Index ntriplets = rows*cols;
365 DenseMatrix refMat_sum = DenseMatrix::Zero(rows,cols);
366 DenseMatrix refMat_prod = DenseMatrix::Zero(rows,cols);
367 DenseMatrix refMat_last = DenseMatrix::Zero(rows,cols);
372 StorageIndex c = internal::random<StorageIndex>(0,StorageIndex(cols-1));
382 SparseMatrixType m(rows,cols);
396 DenseMatrix refMat2(rows, cols), refMat3(rows, cols);
397 SparseMatrixType m2(rows, cols), m3(rows, cols);
401 Map<SparseMatrixType> mapMat2(m2.rows(), m2.cols(), m2.nonZeros(), m2.outerIndexPtr(), m2.innerIndexPtr(), m2.valuePtr(), m2.innerNonZeroPtr());
402 Map<SparseMatrixType> mapMat3(m3.rows(), m3.cols(), m3.nonZeros(), m3.outerIndexPtr(), m3.innerIndexPtr(), m3.valuePtr(), m3.innerNonZeroPtr());
407 MappedSparseMatrix<Scalar,SparseMatrixType::Options,StorageIndex> mapMat2(m2.rows(), m2.cols(), m2.nonZeros(), m2.outerIndexPtr(), m2.innerIndexPtr(), m2.valuePtr(), m2.innerNonZeroPtr());
408 MappedSparseMatrix<Scalar,SparseMatrixType::Options,StorageIndex> mapMat3(m3.rows(), m3.cols(), m3.nonZeros(), m3.outerIndexPtr(), m3.innerIndexPtr(), m3.valuePtr(), m3.innerNonZeroPtr());
414 Index j = internal::random<Index>(0,cols-1);
418 Map<SparseMatrixType> mapMat2(rows, cols, m2.nonZeros(), m2.outerIndexPtr(), m2.innerIndexPtr(), m2.valuePtr(), m2.innerNonZeroPtr());
427 DenseMatrix refMat2(rows, cols), refMat3(rows, cols);
428 SparseMatrixType m2(rows, cols), m3(rows, cols);
501 DenseMatrix refMat2 = DenseMatrix::Zero(rows, cols);
502 SparseMatrixType m2(rows, cols);
534 if(rows > 3 && cols > 2)
544 SparseMatrixType m1(rows, cols);
545 DenseMatrix refMat1 = DenseMatrix::Zero(rows, cols);
548 m1.conservativeResize(rows+incRows, cols+incCols);
549 refMat1.conservativeResize(rows+incRows, cols+incCols);
559 m1.insert(0, m1.cols()-1) = refMat1(0, refMat1.cols()-1) = 1;
593 DenseMatrix refMat2 = DenseMatrix::Zero(rows, cols);
594 SparseMatrixType m2(rows, cols);
619 void big_sparse_triplet(Index rows, Index cols, double density) {
624 double nelements = density * rows*cols;
632 Index c = internal::random<Index>(0,cols-1);
637 SparseMatrixType m(rows,cols);