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

NTuple.sip

Go to the documentation of this file.
00001 // -*- mode:c++ -*-
00002 
00016 class NTuple : DataSource
00017 {
00018 %TypeHeaderCode
00019 #include "datasrcs/NTuple.h"
00020 #include <string>
00021 %End
00022 
00023 
00024 public:
00025 
00028   NTuple ( const std::string &  );
00029 
00035   NTuple ( const char * );
00036 
00039   NTuple ( const std::vector < std::string > &  );
00040 
00044   NTuple ( const NTuple & );
00045 
00049   NTuple ( const DataSource * );
00050 
00055   NTuple ( unsigned int  );
00056 
00057 //   /** A constructor for creating a null object.  A null NTuple is one
00058 //       that is a place holder for one that got deleted while other
00059 //       objects were referencing it.  This can happen, for example, if a
00060 //       user deletes an NTuple before deleting other objects that use
00061 //       it.  Classes that reference NTuple objects can be Observer of
00062 //       then in order to receive the Observer::willDelete signal.  When
00063 //       received they can replace the referenced NTuple with a null one.
00064 //       They can then continue to function until a valid ntuple is given
00065 //       to them.    The parameter @a dummy is not used.
00066 //   */
00067 //   NTuple ( bool );
00068 
00071   NTuple ();
00072 
00075   virtual ~NTuple();
00076 
00079   virtual void copy ( const DataSource & );
00080 
00084   virtual void clear();
00085   
00088   virtual bool empty () const;
00089 
00095  virtual void addRow ( const std::vector<double> &  )
00096     throw ( DataSourceException );
00097 
00101   virtual void insertRow ( unsigned int ,
00102                            const std::vector < double > &  );
00103 
00109   virtual void eraseRow ( unsigned int );
00110 
00116   virtual const std::vector < double > & getRow ( unsigned int  ) const
00117      throw ( DataSourceException );
00118 
00119   virtual void reserve ( unsigned int );
00120 
00130   int addColumn ( const std::string & , const std::vector < double > &  )
00131   throw ( DataSourceException );
00132 
00139   void replaceColumn ( unsigned int , const std::vector< double > & )
00140     throw ( DataSourceException );
00141 
00147   void replaceColumn ( const std::string & , const std::vector < double > & )
00148     throw ( DataSourceException );
00149 
00150 
00157   void replaceRow ( unsigned int , const std::vector < double > &  )
00158     throw ( DataSourceException );
00159 
00160 
00168   void setLabels ( const std::vector<std::string> & );
00169 
00170 
00171 //   virtual double 
00172 //   operator [] (  std::vector < unsigned int > &  ) const;
00173 
00174 //   virtual double valueAt ( unsigned int , unsigned int  ) const;
00175 
00176   virtual const std::vector< double > & 
00177   getColumn ( unsigned int  ) const;
00178 
00184   virtual std::vector< double > & getColumn ( unsigned int )
00185      throw ( DataSourceException );
00186 
00187   const std::vector< double > & getColumn ( const std::string &  ) const;
00188 
00189   virtual unsigned int indexOfMinElement ( unsigned int  ) const;
00190   virtual unsigned int indexOfMaxElement ( unsigned int  ) const;
00191 
00194   virtual double minElement ( unsigned int  ) const;
00195 
00198   virtual double maxElement ( unsigned int ) const;
00199 
00202   double columnMin( const std::string &  ) const;
00203 
00206   double columnMax( const std::string & ) const;
00207 
00208   virtual void notifyObservers () const;
00209 
00213   void setIntervalEnabled ( bool = true );
00214 
00218   bool isIntervalEnabled () const;
00219 
00225   void setIntervalCount ( int );
00226 
00229   unsigned int getIntervalCount ( ) const;
00230 
00231 //   virtual void  getRange ( unsigned int , Range & ) const;
00232   virtual double sum ( unsigned int ) const;
00233 
00234   virtual unsigned rows () const;
00235   virtual int indexOf ( const std::string & ) const;
00236   bool isValidLabel ( const std::string & ) const;
00237 
00238 };

Generated on Wed Sep 7 14:51:29 2005 for SiHippo by  doxygen 1.4.3