mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-08-04 03:00:39 +08:00
bug #1075: fix AlignedBox::sample for runtime dimension
(grafted from 75a60d3ac0ac10be7317b268911d0098acbbf472 )
This commit is contained in:
parent
cfe315476f
commit
73cb54835c
@ -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)
|
||||
|
@ -172,6 +172,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