This bugzilla service is closed. All entries have been migrated to https://gitlab.com/libeigen/eigen
View | Details | Raw Unified | Return to bug 614 | Differences between
and this patch

Collapse All | Expand All

(-)a/unsupported/Eigen/src/MatrixFunctions/MatrixPowerBase.h (+2 lines)
Lines 301-306 Link Here
301
      res(0,0) = std::pow(m_A(0,0), p);
301
      res(0,0) = std::pow(m_A(0,0), p);
302
      break;
302
      break;
303
    case 2:
303
    case 2:
304
      res.resize(2, 2);
304
      compute2x2(res, p);
305
      compute2x2(res, p);
305
      break;
306
      break;
306
    default:
307
    default:
Lines 320-325 Link Here
320
  res += MatrixType::Identity(IminusT.rows(), IminusT.cols());
321
  res += MatrixType::Identity(IminusT.rows(), IminusT.cols());
321
}
322
}
322
323
324
// this function assumes that res has the correct size (see bug 614)
323
template<typename MatrixType>
325
template<typename MatrixType>
324
void MatrixPowerTriangularAtomic<MatrixType>::compute2x2(MatrixType& res, RealScalar p) const
326
void MatrixPowerTriangularAtomic<MatrixType>::compute2x2(MatrixType& res, RealScalar p) const
325
{
327
{
(-)a/unsupported/test/matrix_power.cpp (-1 / +1 lines)
Lines 181-186 Link Here
181
  CALL_SUBTEST_1(testMatrixVector(Matrix2f(),         Vector2f(),    1e-4));
181
  CALL_SUBTEST_1(testMatrixVector(Matrix2f(),         Vector2f(),    1e-4));
182
  CALL_SUBTEST_5(testMatrixVector(Matrix3cf(),        Vector3cf(),   1e-4));
182
  CALL_SUBTEST_5(testMatrixVector(Matrix3cf(),        Vector3cf(),   1e-4));
183
  CALL_SUBTEST_8(testMatrixVector(Matrix4f(),         Vector4f(),    1e-4));
183
  CALL_SUBTEST_8(testMatrixVector(Matrix4f(),         Vector4f(),    1e-4));
184
  CALL_SUBTEST_6(testMatrixVector(MatrixXf(8,8),      VectorXf(8),   1e-3));
184
  CALL_SUBTEST_6(testMatrixVector(MatrixXf(2,2),      VectorXf(2),   1e-3)); // see bug 614
185
  CALL_SUBTEST_9(testMatrixVector(MatrixXe(7,7),      VectorXe(7),   1e-13));
185
  CALL_SUBTEST_9(testMatrixVector(MatrixXe(7,7),      VectorXe(7),   1e-13));
186
}
186
}

Return to bug 614