00001
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
00058
00059
00060
00061
00062
00063
00064
00065
00066
00067
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
00172
00173
00174
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
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 };