Line | |
---|
1 | // This file is part of Eigen, a lightweight C++ template library
|
---|
2 | // for linear algebra. Eigen itself is part of the KDE project.
|
---|
3 | //
|
---|
4 | // Copyright (C) 2010 Benoit Jacob <jacob.benoit.1@gmail.com>
|
---|
5 | //
|
---|
6 | // This Source Code Form is subject to the terms of the Mozilla
|
---|
7 | // Public License v. 2.0. If a copy of the MPL was not distributed
|
---|
8 | // with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
---|
9 |
|
---|
10 | #include "main.h"
|
---|
11 |
|
---|
12 | void test_eigen2_bug_132() {
|
---|
13 | int size = 100;
|
---|
14 | MatrixXd A(size, size);
|
---|
15 | VectorXd b(size), c(size);
|
---|
16 | {
|
---|
17 | VectorXd y = A.transpose() * (b-c); // bug 132: infinite recursion in coeffRef
|
---|
18 | VectorXd z = (b-c).transpose() * A; // bug 132: infinite recursion in coeffRef
|
---|
19 | }
|
---|
20 |
|
---|
21 | // the following ones weren't failing, but let's include them for completeness:
|
---|
22 | {
|
---|
23 | VectorXd y = A * (b-c);
|
---|
24 | VectorXd z = (b-c).transpose() * A.transpose();
|
---|
25 | }
|
---|
26 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.