mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-08-11 19:29:02 +08:00
bug #1075: fix AlignedBox::sample for runtime dimension
This commit is contained in:
parent
9136b95219
commit
75a60d3ac0
@ -163,7 +163,7 @@ EIGEN_MAKE_ALIGNED_OPERATOR_NEW_IF_VECTORIZABLE_FIXED_SIZE(_Scalar,_AmbientDim)
|
||||
* a uniform distribution */
|
||||
inline VectorType sample() const
|
||||
{
|
||||
VectorType r;
|
||||
VectorType r(dim());
|
||||
for(Index d=0; d<dim(); ++d)
|
||||
{
|
||||
if(!ScalarTraits::IsInteger)
|
||||
|
@ -179,6 +179,8 @@ void test_geo_alignedbox()
|
||||
CALL_SUBTEST_9( alignedbox(AlignedBox1i()) );
|
||||
CALL_SUBTEST_10( alignedbox(AlignedBox2i()) );
|
||||
CALL_SUBTEST_11( alignedbox(AlignedBox3i()) );
|
||||
|
||||
CALL_SUBTEST_14( alignedbox(AlignedBox<double,Dynamic>(4)) );
|
||||
}
|
||||
CALL_SUBTEST_12( specificTest1() );
|
||||
CALL_SUBTEST_13( specificTest2() );
|
||||
|
Loading…
x
Reference in New Issue
Block a user