vector and matrix contructors from arrays of arbirary size via nested templates

This commit is contained in:
2021-10-27 23:24:41 +02:00
parent e0b4738b17
commit b7d3a5d977
3 changed files with 81 additions and 1 deletions

10
t.cc
View File

@@ -2284,7 +2284,7 @@ Polynomial<double> qq=q.pow(n);
cout <<"test binom "<<(p-qq).norm()<<endl;
}
if(1)
if(0)
{
int n;
cin >>n ;
@@ -2294,5 +2294,13 @@ cout <<"non-zero = "<< ((n&1)?p.odd_powers():p.even_powers())<<std::endl;
cout <<"value = "<<value(p,1.23456789)<<" "<<odd_value(p,1.23456789)+even_value(p,1.23456789)<<endl;
}
if(1)
{
NRVec<int> v({1,2,3,4});
cout <<v;
NRMat<int> m({{1,2,3},{4,5,6}});
cout<<m;
}
}