Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

DataPoint.h

Go to the documentation of this file.
00001 // DataPoint.h: interface for the DataPoint class.
00002 //
00004 
00005 #if !defined(AFX_DATAPOINT_H__CC6D0924_2676_11D4_8695_00A0C9B3BB18__INCLUDED_)
00006 #define AFX_DATAPOINT_H__CC6D0924_2676_11D4_8695_00A0C9B3BB18__INCLUDED_
00007 
00008 #if _MSC_VER > 1000
00009 #pragma once
00010 #endif // _MSC_VER > 1000
00011 
00012 // comparator compares pointers to data points, which we need 
00013 // to be able to sort ChemicalTimeSeriesData
00014 
00015 class DataPoint  
00016 {
00017 public:
00018         DataPoint(double time=0.0, double datum=0.0, double error=0.0);
00019         virtual ~DataPoint();
00020         void RescaleTime(double scaleFac);
00021         void RescaleDatum(double scaleFac);
00022         void RescaleError(double scaleFac);
00023         double GetTime() const {return time;}
00024         double GetDatum() const {return datum;}
00025         double GetError() const {return error;}
00026         void SetTime(double time) {this->time = time;}
00027         void SetDatum(double datum) {this->datum = datum;}
00028         void SetError(double error) {this->error = error;}
00029         class DataPointComparator
00030         {
00031         public:
00032                 DataPointComparator() {return;}
00033                 virtual ~DataPointComparator() {return;}
00034                 bool operator()(DataPoint *d1, DataPoint *d2) 
00035                 {
00036                         return d1->GetTime() < d2->GetTime();
00037                 }
00038         };
00039 private:
00040         double time;
00041         double datum;
00042         double error;
00043 };
00044 
00045 #endif // !defined(AFX_DATAPOINT_H__CC6D0924_2676_11D4_8695_00A0C9B3BB18__INCLUDED_)

Generated on Mon Nov 3 09:37:45 2003 by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002