SheafSystem  0.0.0.0
plot.h
1 
2 //
3 // Copyright (c) 2014 Limit Point Systems, Inc.
4 //
5 // Licensed under the Apache License, Version 2.0 (the "License");
6 // you may not use this file except in compliance with the License.
7 // You may obtain a copy of the License at
8 //
9 // http://www.apache.org/licenses/LICENSE-2.0
10 //
11 // Unless required by applicable law or agreed to in writing, software
12 // distributed under the License is distributed on an "AS IS" BASIS,
13 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 // See the License for the specific language governing permissions and
15 // limitations under the License.
16 //
17 
18 // Interface for class plot
19 
20 #ifndef PLOT_H
21 #define PLOT_H
22 
23 #ifndef SHEAF_DLL_SPEC_H
24 #include "SheafSystem/sheaf_dll_spec.h"
25 #endif
26 
27 #ifndef STD_FSTREAM_H
28 #include "SheafSystem/std_fstream.h"
29 #endif
30 
31 namespace sheaf
32 {
33 
37 class SHEAF_DLL_SPEC plot
38 {
39 
40 public:
41 
42  // ===========================================================
43  // ANY FACET
44  // ===========================================================
45 
46  // Default memberwise assignment operator
47 
51  virtual bool invariant() const;
52 
53  // ===========================================================
54  // PLOT FACET
55  // ===========================================================
56 
60  enum plot_type
61  {
62  QUADRATIC,
63  LINEAR,
64  CONSTANT
65  };
66 
70  plot(const char* xdriver,
71  const char** xcurve_labels,
72  int xnum_curves = 1,
73  const char* xxlabel = "",
74  const char* xylabel = "",
75  const plot_type* xtypes = 0);
76 
77  // Default memberwise copy constructor
78 
82  virtual ~plot();
83 
87  double* create_point();
88 
92  void add_point(double* xpoint);
93 
94 private:
95 
99  std::ofstream* _data_file;
100 
104  int _num_curves;
105 
106 };
107 
108 // ===========================================================
109 // NON-MEMBER FUNCTIONS
110 // ===========================================================
111 
112 } // namespace sheaf
113 
114 #endif // ifndef STOP_WATCH_H
plot_type
Type of curve to fit.
Definition: plot.h:60
A class for constructing files to be read by gnuplot.
Definition: plot.h:37
Namespace for the sheaves component of the sheaf system.