00001
00002
00003
00004
00005
00006
00007
00008 #ifndef IMPGSL_SIMPLEX_H
00009 #define IMPGSL_SIMPLEX_H
00010
00011 #include "gsl_config.h"
00012
00013 #include "GSLOptimizer.h"
00014
00015 IMPGSL_BEGIN_NAMESPACE
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027 class IMPGSLEXPORT Simplex: public GSLOptimizer
00028 {
00029 double min_length_;
00030 double max_length_;
00031 public:
00032 Simplex(Model *m= NULL);
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051 void set_initial_length(double length) {
00052 IMP_USAGE_CHECK(length >0 && length <= 4,
00053 "The initial length is relative to the rescaled attributes"
00054 << " and so should not be much larger than 1.");
00055 max_length_=length;
00056 }
00057
00058 void set_minimum_size(double d) {
00059 IMP_USAGE_CHECK(d >0 && d <= 4,
00060 "The minimum size is relative to the rescaled attributes"
00061 << " and so should not be much larger than 1 "
00062 << "(and must be non-zero).");
00063 min_length_=d;
00064 }
00065
00066
00067 IMP_OPTIMIZER(Simplex);
00068 };
00069
00070
00071 IMPGSL_END_NAMESPACE
00072
00073 #endif