printsorted() implementation

This commit is contained in:
2025-03-04 16:06:16 +01:00
parent ecdd2fefa5
commit ad1bee99a5
4 changed files with 91 additions and 1 deletions

33
t.cc
View File

@@ -3440,7 +3440,7 @@ cout <<b;
cout <<c;
}
if(1)
if(0)
{
NRMat<double> m;
cin >>m;
@@ -3451,6 +3451,37 @@ cout <<mm;
cout <<m.getcount()<<" "<<v.getcount()<<" "<<mm.getcount()<<endl;
}
if(1)
{
NRVec<double> v(12);
v.randomize(1.);
cout <<v;
cout<<"sorted\n";
v.printsorted(cout,1,false);
cout<<"abssorted\n";
v.printsorted(cout,1,true);
}
if(1)
{
NRSMat<double> v(4);
v.randomize(1.);
cout <<v;
cout<<"smat sorted\n";
v.printsorted(cout,1,false);
}
if(1)
{
NRMat<double> v(4,5);
v.randomize(1.);
cout <<v;
cout<<"mat sorted\n";
v.printsorted(cout,1,false);
}
}