Removed uLib::Vector

This commit is contained in:
Paolo Andreetto
2019-07-31 09:16:53 +00:00
parent 52d574e317
commit 38c61a4e9b
20 changed files with 79 additions and 81 deletions

View File

@@ -44,14 +44,16 @@ int test_ABTrim() {
acc.SetABTrim(1,1);
Vector<float> v;
v << 1,5,5,5,300;
std::vector<float> v;
for(float tmpf : {1,5,5,5,300}) v.push_back(tmpf);
//v << 1,5,5,5,300;
for(Vector<float>::Iterator itr=v.begin(); itr<v.end(); itr++)
for(std::vector<float>::iterator itr=v.begin(); itr<v.end(); itr++)
acc += *itr;
std::cout << "Accumulating Trim(1,1) vector: "
<< v << " ... out = " << acc() << "\n";
// TODO missing operator <<
//std::cout << "Accumulating Trim(1,1) vector: "
// << v << " ... out = " << acc() << "\n";
return( acc() == 15.0 );
@@ -62,7 +64,7 @@ int test_Mean() {
Accumulator_Mean<float> mean;
TRandom rnd;
const int c = 10000000;
Vector<float> v;
std::vector<float> v;
v.reserve(c);
for(int i=0;i<c;++i) v.push_back( rnd.Gaus(2000,5) );

View File

@@ -63,7 +63,7 @@ private:
};
static float MaxInVector(const Vector<float> &v)
static float MaxInVector(const std::vector<float> &v)
{
float max = 0;
for(int i=0; i<v.size(); ++i)
@@ -93,7 +93,7 @@ int main()
VoxImage<TestVoxel> filtered = image;
Vector<float> values;
std::vector<float> values;
for(int i=0; i < filter.GetKernelData().GetDims().prod(); ++i) {
values.push_back(1.);
std::cout << values[i] << " ";
@@ -128,7 +128,7 @@ int main()
VoxFilterAlgorithmCustom<TestVoxel> filter(Vector3i(3,3,4));
Vector<float> values;
std::vector<float> values;
for(int i=0; i < filter.GetKernelData().GetDims().prod(); ++i) {
values.push_back(static_cast<float>(1));
}