Lines Matching full:vector
12 \li If you want to use the std::vector container, you need to \#include <Eigen/StdVector>.
31 \section vector The case of std::vector
33 The situation with std::vector was even worse (explanation below) so we had to specialize it for the Eigen::aligned_allocator type. In practice you \b must use the Eigen::aligned_allocator (not another aligned allocator), \b and \#include <Eigen/StdVector>.
39 std::vector<Eigen::Vector4f,Eigen::aligned_allocator<Eigen::Vector4f> >
42 \subsection vector_spec An alternative - specializing std::vector for Eigen types
44 As an alternative to the recommended approach described above, you have the option to specialize std::vector for Eigen types requiring alignment.
45 The advantage is that you won't need to declare std::vector all over with Eigen::allocator. One drawback on the other hand side is that
46 the specialization needs to be defined before all code pieces in which e.g. std::vector<Vector2d> is used. Otherwise, without knowing the specialization
54 std::vector<Eigen::Vector2d>
57 <span class="note">\b Explanation: The resize() method of std::vector takes a value_type argument (defaulting to value_type()). So with std::vector<Eigen::Vector4f>, some Eigen::Vector4f objects will be passed by value, which discards any alignment modifiers, so a Eigen::Vector4f can be created at an unaligned location. In order to avoid that, the only solution we saw was to specialize std::vector to make it work on a slight modification of, here, Eigen::Vector4f, that is able to deal properly with this situation.