aboutsummaryrefslogtreecommitdiffhomepage
path: root/Eigen/src/Core/Map.h
diff options
context:
space:
mode:
authorGravatar Hauke Heibel <hauke.heibel@gmail.com>2010-12-15 15:19:51 +0100
committerGravatar Hauke Heibel <hauke.heibel@gmail.com>2010-12-15 15:19:51 +0100
commit6f5c45ceff59b1167198755856f4cf32aa642312 (patch)
tree4f01b6bd0e8f7d082ef94f74db0b7b6374adcea1 /Eigen/src/Core/Map.h
parent6a9a6bbc78c05381b021122a24e22019a9dc99da (diff)
Fixed ctor from const raw data for Matrices and added the missing implementation for Arrays.
Fixed a warning regarding the conversion from int to bool in MapBase.
Diffstat (limited to 'Eigen/src/Core/Map.h')
-rw-r--r--Eigen/src/Core/Map.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/Eigen/src/Core/Map.h b/Eigen/src/Core/Map.h
index 0321f6669..b38b2f048 100644
--- a/Eigen/src/Core/Map.h
+++ b/Eigen/src/Core/Map.h
@@ -183,10 +183,17 @@ template<typename PlainObjectType, int MapOptions, typename StrideType> class Ma
};
template<typename _Scalar, int _Rows, int _Cols, int _Options, int _MaxRows, int _MaxCols>
+inline Array<_Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols>
+ ::Array(const Scalar *data)
+{
+ _set_noalias(Eigen::Map<const Array>(data));
+}
+
+template<typename _Scalar, int _Rows, int _Cols, int _Options, int _MaxRows, int _MaxCols>
inline Matrix<_Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols>
::Matrix(const Scalar *data)
{
- _set_noalias(Eigen::Map<Matrix>(data));
+ _set_noalias(Eigen::Map<const Matrix>(data));
}
#endif // EIGEN_MAP_H