make the std::vector fix work also with dynamic size Eigen objects, e.g.

std::vector<VectorXd>
update unit test
This commit is contained in:
Benoit Jacob
2009-01-10 13:10:23 +00:00
parent 3efe6e4176
commit 0c1ef2f4c6
4 changed files with 42 additions and 37 deletions

View File

@@ -29,7 +29,7 @@
#include "Core"
#include <vector>
namespace Eigen{
namespace Eigen {
template<typename aligned_type> class ei_unaligned_type;
template<typename _Scalar, int _Rows, int _Cols, int _Options, int _MaxRows, int _MaxCols>
@@ -38,9 +38,10 @@ class ei_unaligned_type<Matrix<_Scalar,_Rows,_Cols,_Options,_MaxRows,_MaxCols> >
{
public:
typedef Matrix<_Scalar,_Rows,_Cols,_Options,_MaxRows,_MaxCols> aligned_base;
ei_unaligned_type() : aligned_base(ei_select_matrix_constructor_doing_absolutely_nothing()) {}
ei_unaligned_type() : aligned_base(ei_constructor_without_unaligned_array_assert()) {}
ei_unaligned_type(const aligned_base& other)
{
resize(other.rows(), other.cols());
ei_assign_impl<ei_unaligned_type,aligned_base,NoVectorization>::run(*this, other);
}
};