aboutsummaryrefslogtreecommitdiffhomepage
path: root/unsupported/Eigen/src/MatrixFunctions
diff options
context:
space:
mode:
authorGravatar Jitse Niesen <jitse@maths.leeds.ac.uk>2009-09-01 10:50:54 +0100
committerGravatar Jitse Niesen <jitse@maths.leeds.ac.uk>2009-09-01 10:50:54 +0100
commit32f95ec2670a287234d7f614a20062e7d8499906 (patch)
treef562633b7f7f1f726f13eb1ab7514cfe82d26db6 /unsupported/Eigen/src/MatrixFunctions
parent6e4e94ff3266f8d85adbfe6556e612a2ff9a7e68 (diff)
Bug fix in MatrixExponential.h
Initialize matrices for intermediate results to correct dimension
Diffstat (limited to 'unsupported/Eigen/src/MatrixFunctions')
-rw-r--r--unsupported/Eigen/src/MatrixFunctions/MatrixExponential.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/unsupported/Eigen/src/MatrixFunctions/MatrixExponential.h b/unsupported/Eigen/src/MatrixFunctions/MatrixExponential.h
index 7d8777de7..bf5b79955 100644
--- a/unsupported/Eigen/src/MatrixFunctions/MatrixExponential.h
+++ b/unsupported/Eigen/src/MatrixFunctions/MatrixExponential.h
@@ -292,7 +292,10 @@ namespace MatrixExponentialInternal {
template <typename MatrixType>
void compute(const MatrixType &M, MatrixType* result)
{
- MatrixType num, den, U, V;
+ MatrixType num(M.rows(), M.cols());
+ MatrixType den(M.rows(), M.cols());
+ MatrixType U(M.rows(), M.cols());
+ MatrixType V(M.rows(), M.cols());
MatrixType Id = MatrixType::Identity(M.rows(), M.cols());
float l1norm = static_cast<float>(M.cwise().abs().colwise().sum().maxCoeff());
int squarings;