Logo Coherent WaveBurst  
Reference Guide
Logo
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
TestInvertSegments.C
Go to the documentation of this file.
1 //
2 // Test Invert Segments
3 // Author : Gabriele Vedovato
4 
5 
7 
8 
9  vector<waveSegment> ilist;
10  vector<waveSegment> olist;
11 
13 
14  // fill ilist1
15  seg.index=0; seg.start=0; seg.stop =20; ilist.push_back(seg);
16  seg.index=1; seg.start=40; seg.stop =60; ilist.push_back(seg);
17  cout << "List of input segments" << endl;
18  for(int n=0;n<ilist.size();n++) cout << n << " " << ilist[n].start << " " << ilist[n].stop << endl;
19 
20  olist = CWB::Toolbox::invertSegments(ilist);
21 
22  cout << "List of inverted segments" << endl;
23  for(int n=0;n<olist.size();n++) cout << n << " " << olist[n].start << " " << olist[n].stop << endl;
24 
25  exit(0);
26 }
27 
void TestInvertSegments()
double start
Definition: network.hh:37
int n
Definition: cwb_net.C:10
std::vector< waveSegment > olist
static vector< waveSegment > invertSegments(vector< waveSegment > &ilist)
Definition: Toolbox.cc:229
waveSegment seg
int index
Definition: network.hh:36
double stop
Definition: network.hh:38
exit(0)