Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

NTupleSorter.h

Go to the documentation of this file.
00001 /* -*- c++ -*- */
00002 
00014 #ifndef NTUPLESORTER_H
00015 #define NTUPLESORTER_H
00016 
00017 #include "pattern/libhippo.h"
00018 
00019 #include <vector>
00020 
00021 class NTuple;
00022 
00030 class MDL_HIPPOPLOT_API NTupleSorter
00031 {
00032 
00033 private:
00034 
00037   NTupleSorter & operator = ( const NTupleSorter & );
00038 
00041   int m_column;
00042 
00045   bool m_increasing;
00046 
00049   NTuple * m_ntuple;
00050 
00055   void rowwiseCopy ( std::vector < std::vector < double > * > & row_copy );
00056 
00057 public:
00058 
00064   NTupleSorter ( const NTupleSorter & );
00065 
00070   NTupleSorter ( NTuple * ntuple );
00071 
00075   virtual ~NTupleSorter () {}
00076 
00079   NTuple * getNTuple () const;
00080 
00087   void setSorting ( int column );
00088 
00090   void sort ( );
00091 
00093   void clear ();
00094 
00104   void addRow ( const std::vector < double > & row );
00105 
00109   virtual void eraseRow ( unsigned int index );
00110 
00113   unsigned int columns ( )  const;
00114 
00117   unsigned int rows ( ) const;
00118 
00121   const std::vector < double > & getRow ( unsigned int index ) const;
00122 
00127   bool operator () ( std::vector < double > * x,
00128                      std::vector < double > * y ) const;
00129 
00130 };
00131 
00132 #endif // NTUPLESORTER_H

Generated for HippoDraw-1.14.8.5 by doxygen 1.4.3