1 | #include <complex>
|
---|
2 | #include <boost/numeric/ublas/matrix.hpp>
|
---|
3 | #include <boost/numeric/ublas/symmetric.hpp>
|
---|
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 | ublas::matrix<in_value_type> IN(n,n);
|
---|
15 | ublas::matrix<out_value_type> OUT(IN); // COMPILE
|
---|
16 | OUT = IN; // COMPILE
|
---|
17 |
|
---|
18 | ublas::symmetric_matrix<in_value_type,ublas::lower> sym_IN(n,n);
|
---|
19 | ublas::symmetric_matrix<out_value_type,ublas::lower> sym_OUT(sym_IN); // NOT COMPILE
|
---|
20 | OUT = IN; // NOT COMPILE
|
---|
21 | }
|
---|