SHARE
TWEET

Untitled

a guest Aug 12th, 2017 47 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. QMap<int, int> rang_map_x;
  2. rang_map_x.insert(2, 0);
  3. rang_map_x.insert(9, 1);
  4. rang_map_x.insert(7, 2);
  5. rang_map_x.insert(5, 3);
  6. rang_map_x.insert(1, 4);
  7.  
  8.  
  9.     QList<int> invers_x, invers_y;
  10.     invers_x = rang_map_x.values();
  11. //  invers_y = rang_map_y.values();
  12.    
  13.     QVector<int> rang_x(5, 9), rang_y(timeseries.y.size());
  14. //  for (int i=0; i<timeseries.x.size(); ++i)
  15.     for (int i=0; i<5; ++i)
  16.     {
  17.         rang_x.insert( invers_x.at(i), i );
  18. //      rang_y.append( invers_y.at( invers_y.at(i) ) );
  19.     }
  20.  
  21.     //testweise ausgeben lassen
  22.     QFile writeFile("blah.txt");
  23.     writeFile.open(QIODevice::WriteOnly | QIODevice::Text);
  24.     QTextStream out(&writeFile);
  25.     out << "orig\tT-Index\tInvers\tRang" << endl;
  26.     for (int i=0; i<5; ++i)
  27.     {
  28.         out << timeseries.x.at(i) << "\t" << i << "\t" << invers_x.at(i)  << "\t" << rang_x.at(i) << endl;
  29.     }
  30.     writeFile.close();
RAW Paste Data
Top