1 | #include <boost/numeric/ublas/io.hpp>
|
---|
2 | #include <boost/numeric/ublas/symmetric.hpp>
|
---|
3 | #include <complex>
|
---|
4 |
|
---|
5 | namespace ublas = boost::numeric::ublas;
|
---|
6 |
|
---|
7 | int main()
|
---|
8 | {
|
---|
9 | typedef double in_value_type;
|
---|
10 | typedef std::complex<double> out_value_type;
|
---|
11 |
|
---|
12 | const std::size_t n = 4;
|
---|
13 |
|
---|
14 | // Input Matrix
|
---|
15 | ublas::symmetric_matrix<in_value_type,ublas::lower> IN(n,n);
|
---|
16 |
|
---|
17 | // Test copy-constructor: fails to compile without patch 4410
|
---|
18 | ublas::symmetric_matrix<out_value_type,ublas::lower> OUT1(IN);
|
---|
19 |
|
---|
20 | // Test copy-assignement: fails to compile without patch 4410
|
---|
21 | ublas::symmetric_matrix<out_value_type,ublas::lower> OUT2;
|
---|
22 | OUT2 = IN;
|
---|
23 |
|
---|
24 | std::cout << "Input Matrix: " << IN << std::endl;
|
---|
25 | std::cout << "Copy-Constructed Output Matrix: " << OUT1 << std::endl;
|
---|
26 | std::cout << "Copy-Assigned Output Matrix: " << OUT2 << std::endl;
|
---|
27 | }
|
---|