Home
last modified time | relevance | path

Searched refs:matrix (Results 1 – 25 of 750) sorted by relevance

12345678910>>...30

/external/ceres-solver/internal/ceres/
Dincomplete_lq_factorization_test.cc58 CompressedRowSparseMatrix matrix(1, 1, 1); in TEST() local
59 matrix.mutable_rows()[0] = 0; in TEST()
60 matrix.mutable_rows()[1] = 1; in TEST()
61 matrix.mutable_cols()[0] = 0; in TEST()
62 matrix.mutable_values()[0] = 2; in TEST()
65 IncompleteLQFactorization(matrix, 1, 0.0, 1, 0.0)); in TEST()
66 ExpectMatricesAreEqual(matrix, *l, 1e-16); in TEST()
83 CompressedRowSparseMatrix matrix(10, 10, 100); in TEST() local
84 int* rows = matrix.mutable_rows(); in TEST()
85 int* cols = matrix.mutable_cols(); in TEST()
[all …]
Dpartitioned_matrix_view.cc52 const BlockSparseMatrix& matrix) { in Create() argument
58 matrix, options.elimination_groups[0]); in Create()
64 matrix, options.elimination_groups[0]); in Create()
70 matrix, options.elimination_groups[0]); in Create()
76 matrix, options.elimination_groups[0]); in Create()
82 matrix, options.elimination_groups[0]); in Create()
88 matrix, options.elimination_groups[0]); in Create()
94 matrix, options.elimination_groups[0]); in Create()
100 matrix, options.elimination_groups[0]); in Create()
106 matrix, options.elimination_groups[0]); in Create()
[all …]
Dincomplete_lq_factorization.cc45 inline double NormalizeRow(const int row, CompressedRowSparseMatrix* matrix) { in NormalizeRow() argument
46 const int row_begin = matrix->rows()[row]; in NormalizeRow()
47 const int row_end = matrix->rows()[row + 1]; in NormalizeRow()
49 double* values = matrix->mutable_values(); in NormalizeRow()
118 CompressedRowSparseMatrix* matrix) { in DropEntriesAndAddRow() argument
119 int* rows = matrix->mutable_rows(); in DropEntriesAndAddRow()
120 int* cols = matrix->mutable_cols(); in DropEntriesAndAddRow()
121 double* values = matrix->mutable_values(); in DropEntriesAndAddRow()
122 int num_nonzeros = rows[matrix->num_rows()]; in DropEntriesAndAddRow()
125 matrix->set_num_rows(matrix->num_rows() + 1); in DropEntriesAndAddRow()
[all …]
Dcompressed_row_sparse_matrix_test.cc248 scoped_ptr<CompressedRowSparseMatrix> matrix( in TEST() local
252 EXPECT_EQ(matrix->num_rows(), 5); in TEST()
253 EXPECT_EQ(matrix->num_cols(), 5); in TEST()
254 EXPECT_EQ(matrix->num_nonzeros(), 9); in TEST()
255 EXPECT_EQ(blocks, matrix->row_blocks()); in TEST()
256 EXPECT_EQ(blocks, matrix->col_blocks()); in TEST()
263 matrix->RightMultiply(x.data(), y.data()); in TEST()
269 matrix->LeftMultiply(x.data(), y.data()); in TEST()
275 matrix->ToDenseMatrix(&dense); in TEST()
349 CompressedRowSparseMatrix matrix(5, 6, 30); in TEST() local
[all …]
/external/opencv/cxcore/include/
Dcxcore.hpp213 CvMatrix() : matrix(0) {} in CvMatrix()
215 { matrix = cvCreateMat( rows, cols, type ); } in CvMatrix()
219 { matrix = cvInitMatHeader( hdr, rows, cols, type, data, step ); } in CvMatrix()
224 { matrix = cvCreateMatHeader( rows, cols, type ); in CvMatrix()
225 cvSetData( matrix, data, step ); } in CvMatrix()
228 { matrix = m; } in CvMatrix()
232 matrix = m.matrix; in CvMatrix()
236 CvMatrix( const char* filename, const char* matname=0, int color=-1 ) : matrix(0) in CvMatrix()
239 CvMatrix( CvFileStorage* fs, const char* mapname, const char* matname ) : matrix(0) in CvMatrix()
242 CvMatrix( CvFileStorage* fs, const char* seqname, int idx ) : matrix(0) in CvMatrix()
[all …]
/external/eigen/Eigen/src/LU/
DInverse.h24 static inline void run(const MatrixType& matrix, ResultType& result) in run()
26 result = matrix.partialPivLu().inverse(); in run()
40 static inline void run(const MatrixType& matrix, ResultType& result)
43 result.coeffRef(0,0) = Scalar(1) / matrix.coeff(0,0);
51 const MatrixType& matrix,
59 determinant = matrix.coeff(0,0);
71 const MatrixType& matrix, const typename ResultType::Scalar& invdet,
74 result.coeffRef(0,0) = matrix.coeff(1,1) * invdet;
75 result.coeffRef(1,0) = -matrix.coeff(1,0) * invdet;
76 result.coeffRef(0,1) = -matrix.coeff(0,1) * invdet;
[all …]
DDeterminant.h19 (const MatrixBase<Derived>& matrix, int a, int b, int c) in bruteforce_det3_helper() argument
21 return matrix.coeff(0,a) in bruteforce_det3_helper()
22 * (matrix.coeff(1,b) * matrix.coeff(2,c) - matrix.coeff(1,c) * matrix.coeff(2,b)); in bruteforce_det3_helper()
27 (const MatrixBase<Derived>& matrix, int j, int k, int m, int n) in bruteforce_det4_helper() argument
29 return (matrix.coeff(j,0) * matrix.coeff(k,1) - matrix.coeff(k,0) * matrix.coeff(j,1)) in bruteforce_det4_helper()
30 * (matrix.coeff(m,2) * matrix.coeff(n,3) - matrix.coeff(n,2) * matrix.coeff(m,3)); in bruteforce_det4_helper()
/external/eigen/test/
Dgeo_transformations.cpp39 VERIFY_IS_APPROX(t0.matrix(), Transform3::MatrixType::Identity()); in non_projective_only()
58 VERIFY((t0 * t1).matrix().isIdentity(test_precision<Scalar>())); in non_projective_only()
61 VERIFY_IS_APPROX(t1.matrix(), t0.matrix()); in non_projective_only()
167 VERIFY_IS_APPROX(t0.matrix(), Transform3::MatrixType::Identity()); in transformations()
168 t0.matrix().setZero(); in transformations()
170 VERIFY_IS_APPROX(t0.matrix(), Transform3::MatrixType::Identity()); in transformations()
182 VERIFY((t0 * t1).matrix().isIdentity(test_precision<Scalar>())); in transformations()
185 VERIFY_IS_APPROX(t1.matrix(), t0.matrix()); in transformations()
189 VERIFY_IS_APPROX(t0.matrix(), t1.matrix()); in transformations()
192 VERIFY_IS_APPROX(t0.matrix(), t1.matrix()); in transformations()
[all …]
Dcorners.cpp13 VERIFY_IS_EQUAL(matrix.A, matrix.B); \
25 MatrixType matrix = MatrixType::Random(rows,cols); in corners() local
48 MatrixType matrix = MatrixType::Random(); in corners_fixedsize() local
60 VERIFY_IS_EQUAL((matrix.template topLeftCorner<r,c>()), (matrix.template block<r,c>(0,0))); in corners_fixedsize()
61 VERIFY_IS_EQUAL((matrix.template topRightCorner<r,c>()), (matrix.template block<r,c>(0,cols-c))); in corners_fixedsize()
62 …VERIFY_IS_EQUAL((matrix.template bottomLeftCorner<r,c>()), (matrix.template block<r,c>(rows-r,0))); in corners_fixedsize()
63 …VERIFY_IS_EQUAL((matrix.template bottomRightCorner<r,c>()), (matrix.template block<r,c>(rows-r,col… in corners_fixedsize()
65 …VERIFY_IS_EQUAL((matrix.template topLeftCorner<r,c>()), (matrix.template topLeftCorner<r,Dynamic>(… in corners_fixedsize()
66 …VERIFY_IS_EQUAL((matrix.template topRightCorner<r,c>()), (matrix.template topRightCorner<r,Dynamic… in corners_fixedsize()
67 …VERIFY_IS_EQUAL((matrix.template bottomLeftCorner<r,c>()), (matrix.template bottomLeftCorner<r,Dyn… in corners_fixedsize()
[all …]
/external/skia/tests/
DColorFilterTest.cpp155 static void get_brightness_matrix(float amount, float matrix[20]) { in get_brightness_matrix()
159 memset(matrix, 0, 20 * sizeof(SkScalar)); in get_brightness_matrix()
160 matrix[0] = matrix[6] = matrix[12] = amount; in get_brightness_matrix()
161 matrix[18] = 1.f; in get_brightness_matrix()
164 static void get_grayscale_matrix(float amount, float matrix[20]) { in get_grayscale_matrix()
167 matrix[0] = 0.2126f + 0.7874f * amount; in get_grayscale_matrix()
168 matrix[1] = 0.7152f - 0.7152f * amount; in get_grayscale_matrix()
169 matrix[2] = 1.f - (matrix[0] + matrix[1]); in get_grayscale_matrix()
170 matrix[3] = matrix[4] = 0.f; in get_grayscale_matrix()
172 matrix[5] = 0.2126f - 0.2126f * amount; in get_grayscale_matrix()
[all …]
/external/eigen/bench/btl/data/
Daction_settings.txt1 aat ; "{/*1.5 A x A^T}" ; "matrix size" ; 4:3000
2 ata ; "{/*1.5 A^T x A}" ; "matrix size" ; 4:3000
3 atv ; "{/*1.5 matrix^T x vector}" ; "matrix size" ; 4:3000
6 matrix_matrix ; "{/*1.5 matrix matrix product}" ; "matrix size" ; 4:3000
7 matrix_vector ; "{/*1.5 matrix vector product}" ; "matrix size" ; 4:3000
8 trmm ; "{/*1.5 triangular matrix matrix product}" ; "matrix size" ; 4:3000
10 trisolve_matrix ; "{/*1.5 triangular solver - matrix (M = inv(L) M)}" ; "size" ; 4:3000
11 cholesky ; "{/*1.5 Cholesky decomposition}" ; "matrix size" ; 4:3000
12 complete_lu_decomp ; "{/*1.5 Complete LU decomposition}" ; "matrix size" ; 4:3000
13 partial_lu_decomp ; "{/*1.5 Partial LU decomposition}" ; "matrix size" ; 4:3000
[all …]
/external/eigen/test/eigen2/
Deigen2_geometry.cpp141 VERIFY_IS_APPROX(t0.matrix(), Transform3::MatrixType::Identity()); in geometry()
142 t0.matrix().setZero(); in geometry()
144 VERIFY_IS_APPROX(t0.matrix(), Transform3::MatrixType::Identity()); in geometry()
167 VERIFY((t0.matrix() * t1.matrix()).isIdentity(test_precision<Scalar>())); in geometry()
170 VERIFY_IS_APPROX(t1.matrix(), t0.matrix()); in geometry()
175 VERIFY_IS_APPROX(t0.matrix(), t1.matrix()); in geometry()
178 VERIFY_IS_APPROX(t0.matrix(), t1.matrix()); in geometry()
180 VERIFY_IS_APPROX(t0.scale(a).matrix(), t1.scale(Vector3::Constant(a)).matrix()); in geometry()
181 VERIFY_IS_APPROX(t0.prescale(a).matrix(), t1.prescale(Vector3::Constant(a)).matrix()); in geometry()
189 tmat4.matrix()(3,3) = Scalar(1); in geometry()
[all …]
Deigen2_geometry_with_eigen2_prefix.cpp143 VERIFY_IS_APPROX(t0.matrix(), Transform3::MatrixType::Identity()); in geometry()
144 t0.matrix().setZero(); in geometry()
146 VERIFY_IS_APPROX(t0.matrix(), Transform3::MatrixType::Identity()); in geometry()
169 VERIFY((t0.matrix() * t1.matrix()).isIdentity(test_precision<Scalar>())); in geometry()
172 VERIFY_IS_APPROX(t1.matrix(), t0.matrix()); in geometry()
177 VERIFY_IS_APPROX(t0.matrix(), t1.matrix()); in geometry()
180 VERIFY_IS_APPROX(t0.matrix(), t1.matrix()); in geometry()
182 VERIFY_IS_APPROX(t0.scale(a).matrix(), t1.scale(Vector3::Constant(a)).matrix()); in geometry()
183 VERIFY_IS_APPROX(t0.prescale(a).matrix(), t1.prescale(Vector3::Constant(a)).matrix()); in geometry()
191 tmat4.matrix()(3,3) = Scalar(1); in geometry()
[all …]
/external/skia/gm/
Dcolormatrix.cpp31 static void setColorMatrix(SkPaint* paint, const SkColorMatrix& matrix) { in setColorMatrix() argument
32 paint->setColorFilter(SkColorMatrixFilter::Create(matrix))->unref(); in setColorMatrix()
100 SkColorMatrix matrix; in onDraw() local
106 matrix.setIdentity(); in onDraw()
107 setColorMatrix(&paint, matrix); in onDraw()
110 matrix.setRotate(SkColorMatrix::kR_Axis, 90); in onDraw()
111 setColorMatrix(&paint, matrix); in onDraw()
114 matrix.setRotate(SkColorMatrix::kG_Axis, 90); in onDraw()
115 setColorMatrix(&paint, matrix); in onDraw()
118 matrix.setRotate(SkColorMatrix::kB_Axis, 90); in onDraw()
[all …]
/external/mesa3d/src/gallium/state_trackers/vega/
Dmatrix.h79 struct matrix { struct
83 static INLINE void matrix_init(struct matrix *mat, in matrix_init() argument
89 static INLINE void matrix_inits(struct matrix *mat, in matrix_inits()
99 static INLINE void matrix_load_identity(struct matrix *matrix) in matrix_load_identity() argument
104 memcpy(matrix->m, identity, sizeof(identity)); in matrix_load_identity()
107 static INLINE VGboolean matrix_is_identity(struct matrix *matrix) in matrix_is_identity() argument
109 return floatsEqual(matrix->m[0], 1) && floatIsZero(matrix->m[1]) && in matrix_is_identity()
110 floatIsZero(matrix->m[2]) && in matrix_is_identity()
111 floatIsZero(matrix->m[3]) && floatsEqual(matrix->m[4], 1) && in matrix_is_identity()
112 floatIsZero(matrix->m[5]) && in matrix_is_identity()
[all …]
/external/skia/experimental/
DSkSetPoly3To3_D.cpp11 bool SkSetPoly3To3_D(SkMatrix* matrix, const SkPoint src[3], const SkPoint dst[3]);
26 static void computeOuterProduct(SkMatrix* matrix, in computeOuterProduct() argument
42 matrix->reset(); in computeOuterProduct()
43 matrix->setScaleX(SkDScalar_toScalar(tmp[0])); in computeOuterProduct()
44 matrix->setSkewY( SkDScalar_toScalar(tmp[1])); in computeOuterProduct()
45 matrix->setSkewX( SkDScalar_toScalar(tmp[2])); in computeOuterProduct()
46 matrix->setScaleY(SkDScalar_toScalar(tmp[3])); in computeOuterProduct()
54 bool SkSetPoly3To3_D(SkMatrix* matrix, const SkPoint src[3], const SkPoint dst[3]) { in SkSetPoly3To3_D() argument
68 matrix->setConcat(dstOP, srcOP); in SkSetPoly3To3_D()
69 matrix->setTranslateX(dstAve.fX - dot(srcAve.fX, srcAve.fY, in SkSetPoly3To3_D()
[all …]
/external/apache-commons-math/src/main/java/org/apache/commons/math/stat/correlation/
DCovariance.java114 public Covariance(RealMatrix matrix, boolean biasCorrected) { in Covariance() argument
115 checkSufficientData(matrix); in Covariance()
116 n = matrix.getRowDimension(); in Covariance()
117 covarianceMatrix = computeCovarianceMatrix(matrix, biasCorrected); in Covariance()
130 public Covariance(RealMatrix matrix) { in Covariance() argument
131 this(matrix, true); in Covariance()
160 protected RealMatrix computeCovarianceMatrix(RealMatrix matrix, boolean biasCorrected) { in computeCovarianceMatrix() argument
161 int dimension = matrix.getColumnDimension(); in computeCovarianceMatrix()
166 double cov = covariance(matrix.getColumn(i), matrix.getColumn(j), biasCorrected); in computeCovarianceMatrix()
170 outMatrix.setEntry(i, i, variance.evaluate(matrix.getColumn(i))); in computeCovarianceMatrix()
[all …]
/external/eigen/unsupported/Eigen/src/SVD/
DJacobiSVD.h87 bool run(JacobiSVD<MatrixType, FullPivHouseholderQRPreconditioner>& svd, const MatrixType& matrix) in run() argument
89 if(matrix.rows() > matrix.cols()) in run()
91 m_qr.compute(matrix); in run()
92 …svd.m_workMatrix = m_qr.matrixQR().block(0,0,matrix.cols(),matrix.cols()).template triangularView<… in run()
133 bool run(JacobiSVD<MatrixType, FullPivHouseholderQRPreconditioner>& svd, const MatrixType& matrix) in run() argument
135 if(matrix.cols() > matrix.rows()) in run()
137 m_adjoint = matrix.adjoint(); in run()
139 …svd.m_workMatrix = m_qr.matrixQR().block(0,0,matrix.rows(),matrix.rows()).template triangularView<… in run()
172 bool run(JacobiSVD<MatrixType, ColPivHouseholderQRPreconditioner>& svd, const MatrixType& matrix) in run() argument
174 if(matrix.rows() > matrix.cols()) in run()
[all …]
/external/eigen/unsupported/test/
Dopenglsupport.cpp149 VERIFY_MATRIX(glRotate(qd), Projective3d(qd).matrix()); in test_openglsupport()
152 VERIFY_MATRIX(glRotate(qf), Projective3f(qf).matrix()); in test_openglsupport()
155 Transform<float,3,AffineCompact> acf3; acf3.matrix().setRandom(); in test_openglsupport()
156 VERIFY_MATRIX(glLoadMatrix(acf3), Projective3f(acf3).matrix()); in test_openglsupport()
157 VERIFY_MATRIX(glMultMatrix(acf3), Projective3f(acf3).matrix()); in test_openglsupport()
160 VERIFY_MATRIX(glLoadMatrix(af3), Projective3f(af3).matrix()); in test_openglsupport()
161 VERIFY_MATRIX(glMultMatrix(af3), Projective3f(af3).matrix()); in test_openglsupport()
163 Transform<float,3,Projective> pf3; pf3.matrix().setRandom(); in test_openglsupport()
164 VERIFY_MATRIX(glLoadMatrix(pf3), Projective3f(pf3).matrix()); in test_openglsupport()
165 VERIFY_MATRIX(glMultMatrix(pf3), Projective3f(pf3).matrix()); in test_openglsupport()
[all …]
/external/skia/bench/
DImageFilterCollapse.cpp116 SkScalar matrix[20] = { 1, 0, 0, 0, amount255, in make_brightness() local
120 return SkColorMatrixFilter::Create(matrix); in make_brightness()
124 SkScalar matrix[20]; in make_grayscale() local
125 memset(matrix, 0, 20 * sizeof(SkScalar)); in make_grayscale()
126 matrix[0] = matrix[5] = matrix[10] = 0.2126f; in make_grayscale()
127 matrix[1] = matrix[6] = matrix[11] = 0.7152f; in make_grayscale()
128 matrix[2] = matrix[7] = matrix[12] = 0.0722f; in make_grayscale()
129 matrix[18] = 1.0f; in make_grayscale()
130 return SkColorMatrixFilter::Create(matrix); in make_grayscale()
/external/eigen/unsupported/Eigen/
DMatrixFunctions26 * matrix functions.
35 * - \ref matrixbase_cos "MatrixBase::cos()", for computing the matrix cosine
36 * - \ref matrixbase_cosh "MatrixBase::cosh()", for computing the matrix hyperbolic cosine
37 * - \ref matrixbase_exp "MatrixBase::exp()", for computing the matrix exponential
38 * - \ref matrixbase_log "MatrixBase::log()", for computing the matrix logarithm
39 * - \ref matrixbase_pow "MatrixBase::pow()", for computing the matrix power
40 …* - \ref matrixbase_matrixfunction "MatrixBase::matrixFunction()", for computing general matrix f…
41 * - \ref matrixbase_sin "MatrixBase::sin()", for computing the matrix sine
42 * - \ref matrixbase_sinh "MatrixBase::sinh()", for computing the matrix hyperbolic sine
43 * - \ref matrixbase_sqrt "MatrixBase::sqrt()", for computing the matrix square root
[all …]
/external/mesa3d/src/gallium/auxiliary/vl/
Dvl_csc.c177 vl_csc_matrix *matrix) in vl_csc_get_matrix() argument
191 assert(matrix); in vl_csc_get_matrix()
206 memcpy(matrix, identity, sizeof(vl_csc_matrix)); in vl_csc_get_matrix()
210 (*matrix)[0][0] = c * (*cstd)[0][0]; in vl_csc_get_matrix()
211 (*matrix)[0][1] = c * (*cstd)[0][1] * s * cosf(h) - c * (*cstd)[0][2] * s * sinf(h); in vl_csc_get_matrix()
212 (*matrix)[0][2] = c * (*cstd)[0][2] * s * cosf(h) + c * (*cstd)[0][1] * s * sinf(h); in vl_csc_get_matrix()
213 (*matrix)[0][3] = (*cstd)[0][3] + (*cstd)[0][0] * (b + c * ybias) + in vl_csc_get_matrix()
217 (*matrix)[1][0] = c * (*cstd)[1][0]; in vl_csc_get_matrix()
218 (*matrix)[1][1] = c * (*cstd)[1][1] * s * cosf(h) - c * (*cstd)[1][2] * s * sinf(h); in vl_csc_get_matrix()
219 (*matrix)[1][2] = c * (*cstd)[1][2] * s * cosf(h) + c * (*cstd)[1][1] * s * sinf(h); in vl_csc_get_matrix()
[all …]
/external/jmonkeyengine/engine/src/core/com/jme3/math/
DMatrix4f.java133 public void copy(Matrix4f matrix) { in copy() argument
134 if (null == matrix) { in copy()
137 m00 = matrix.m00; in copy()
138 m01 = matrix.m01; in copy()
139 m02 = matrix.m02; in copy()
140 m03 = matrix.m03; in copy()
141 m10 = matrix.m10; in copy()
142 m11 = matrix.m11; in copy()
143 m12 = matrix.m12; in copy()
144 m13 = matrix.m13; in copy()
[all …]
/external/eigen/blas/
Dlevel3_impl.h55 if(beta==Scalar(0)) matrix(c, *m, *n, *ldc).setZero(); in EIGEN_BLAS_FUNC()
56 else matrix(c, *m, *n, *ldc) *= beta; in EIGEN_BLAS_FUNC()
144 matrix(b,*m,*n,*ldb) *= alpha; in EIGEN_BLAS_FUNC()
220 Matrix<Scalar,Dynamic,Dynamic,ColMajor> tmp = matrix(b,*m,*n,*ldb); in EIGEN_BLAS_FUNC()
221 matrix(b,*m,*n,*ldb).setZero(); in EIGEN_BLAS_FUNC()
260 if(beta==Scalar(0)) matrix(c, *m, *n, *ldc).setZero(); in EIGEN_BLAS_FUNC()
261 else matrix(c, *m, *n, *ldc) *= beta; in EIGEN_BLAS_FUNC()
275 matA.triangularView<Upper>() = matrix(a,size,size,*lda); in EIGEN_BLAS_FUNC()
276 matA.triangularView<Lower>() = matrix(a,size,size,*lda).transpose(); in EIGEN_BLAS_FUNC()
280 matA.triangularView<Lower>() = matrix(a,size,size,*lda); in EIGEN_BLAS_FUNC()
[all …]
/external/glide/library/src/main/java/com/bumptech/glide/load/resource/bitmap/
DTransformationUtils.java126 Matrix matrix = new Matrix(); in fitCenter() local
127 matrix.setScale(minPercentage, minPercentage); in fitCenter()
129 canvas.drawBitmap(toFit, matrix, paint); in fitCenter()
201 Matrix matrix = new Matrix(); in rotateImage() local
202 matrix.setRotate(degreesToRotate); in rotateImage()
209 matrix, in rotateImage()
261 final Matrix matrix = new Matrix(); in rotateImageExif() local
262 initializeMatrixForRotation(exifOrientation, matrix); in rotateImageExif()
266 matrix.mapRect(newRect); in rotateImageExif()
276 matrix.postTranslate(-newRect.left, -newRect.top); in rotateImageExif()
[all …]

12345678910>>...30