00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033 #ifndef _SINGULARITYINFO_H
00034 #define _SINGULARITYINFO_H
00035
00036
00037 #include "Point.h"
00038 #include <vector>
00039 #include <boost/shared_ptr.hpp>
00040
00041
00042 namespace Go {
00045
00046
00047
00050
00051 class SingularityInfo {
00052 public:
00054 SingularityInfo();
00055
00060 SingularityInfo(boost::shared_ptr<SingularityInfo> previous,
00061 bool use_previous = false);
00062
00069 SingularityInfo(boost::shared_ptr<SingularityInfo> previous,
00070 int missing_dir);
00071
00075 bool hasPoint()
00076 { return (param_sing_.size() > 0); }
00077
00081 int getNmbPoints(int nmb_par)
00082 { return param_sing_.size()/nmb_par; }
00083
00087 double getParam(int dir);
00088
00090 void addIterationCount()
00091 {
00092 nmb_iter_++;
00093 iteration_done_ = true;
00094 }
00095
00102 void addSimpleCount(bool simple1, bool simple2)
00103 {
00104 if (simple1)
00105 nmb_simple1_++;
00106 if (simple2)
00107 nmb_simple2_++;
00108 }
00109
00113 void setSingularPoint(double* par, int nmb_par);
00114
00118 void addSingularPoint(double* par, int nmb_par);
00119
00124 Point getPoint(int idx, int nmb_par);
00125
00128 bool iterationDone()
00129 { return iteration_done_; }
00130
00133 bool iterationSucceed()
00134 { return iteration_succeed_; }
00135
00139 int nmbSimple1()
00140 { return nmb_simple1_; }
00141
00145 int nmbSimple2()
00146 { return nmb_simple2_; }
00147
00151 void setHighPriSing(double* par, int nmb_par);
00152
00155 void setHighPriSingType(SingularityClassification type)
00156 { high_pri_type_ = type; }
00157
00160 SingularityClassification hasHighPriSing()
00161 { return (high_pri_sing_.size() == 0) ? NO_SING : high_pri_type_; }
00162
00167 double getHighPriSing(int idx)
00168 { return high_pri_sing_[idx]; }
00169
00172 std::vector<double> getHighPriSing()
00173 { return high_pri_sing_; }
00174
00175
00176 void cleanUp(std::vector<double> start,
00177 std::vector<double> end,
00178 double tol);
00179
00180 private:
00181
00182
00183
00184
00185 int nmb_iter_;
00186
00187
00188 int nmb_success_;
00189
00190
00191
00192 int nmb_simple1_;
00193
00194
00195
00196
00197 int nmb_simple2_;
00198
00199
00200 std::vector<double> param_sing_;
00201
00202
00203
00204 bool iteration_done_;
00205
00206
00207 bool iteration_succeed_;
00208
00209
00210 SingularityClassification high_pri_type_;
00211
00212
00213 std::vector<double> high_pri_sing_;
00214 };
00215
00216
00218 }
00219
00220
00221 #endif // _SINGULARITYINFO_H
00222
00223