1 // $Id: plotstat.h,v 1.12 2011/04/23 02:02:49 bobgian Exp $ 2 3 /* 4 Copyright 2002 Peter Beerli, Mary Kuhner, Jon Yamato and Joseph Felsenstein 5 6 This software is distributed free of charge for non-commercial use 7 and is copyrighted. Of course, we do not guarantee that the software 8 works, and are not responsible for any damage you may cause or have. 9 */ 10 11 #ifndef PLOTSTAT_H 12 #define PLOTSTAT_H 13 14 #include <cmath> 15 #include <string> 16 #include <vector> 17 18 #include "vectorx.h" 19 20 class ForceSummary; 21 class Parameter; 22 23 enum plottype { log_ten, linear }; 24 enum analysistype { mle, profile }; 25 26 struct PlotStruct 27 { 28 public:Parameter * xaxis; 29 Parameter *yaxis; 30 DoubleVec2d plane; 31 }; 32 33 class ProfileLineStruct 34 { 35 public: 36 // class variables 37 ProfileLineStruct(); 38 ~ProfileLineStruct(); 39 double loglikelihood; 40 double percentile; 41 double profilevalue; 42 DoubleVec1d profparam; 43 bool isExtremeHigh; 44 bool isExtremeLow; 45 bool maximizerWarning; 46 }; 47 48 class ProfileStruct 49 { 50 public: 51 // class variables 52 vector < ProfileLineStruct > profilelines; 53 54 // class methods 55 const ProfileLineStruct& GetProfileLine(double percentile) const; 56 }; 57 58 class LikeGraphs 59 { 60 public: LikeGraphs()61 LikeGraphs () {}; ~LikeGraphs()62 ~LikeGraphs () {}; 63 64 string MakeBorder (long points, long breaks = 4); 65 vector < string > MakeInnards (const DoubleVec2d & likes); 66 vector < string > MakeLikePlot (const StringVec1d & innards, 67 const Parameter & paramX, 68 const Parameter & paramY, long breaks = 4); 69 DoubleVec2d AddGraphs (const DoubleVec2d & a, const DoubleVec2d & b); 70 71 private: 72 bool Divides (long x, long y); 73 }; 74 75 #endif // PLOTSTAT_H 76 77 //____________________________________________________________________________________ 78