libROM  v1.0
Data-driven physical simulation library
GreedyRandomSampler.h
1 
11 // Description: The concrete implementation of the Choi et. al's greedy algorithm
12 // using random sampling or latin-hypercube sampling.
13 
14 #ifndef included_GreedyRandomSampler_h
15 #define included_GreedyRandomSampler_h
16 
17 #include "GreedySampler.h"
18 
19 namespace CAROM {
20 
27 {
28 public:
60  Vector param_space_min,
61  Vector param_space_max,
62  int num_parameter_points,
63  bool check_local_rom,
64  double relative_error_tolerance,
65  double alpha,
66  double max_clamp,
67  int subset_size,
68  int convergence_subset_size,
69  bool use_latin_hypercube,
70  std::string output_log_path = "",
71  std::string warm_start_file_name = "",
72  bool use_centroid = true,
73  int random_seed = 1,
74  bool debug_algorithm = false);
75 
107  double param_space_min,
108  double param_space_max,
109  int num_parameter_points,
110  bool check_local_rom,
111  double relative_error_tolerance,
112  double alpha,
113  double max_clamp,
114  int subset_size,
115  int convergence_subset_size,
116  bool use_latin_hypercube,
117  std::string output_log_path = "",
118  std::string warm_start_file_name = "",
119  bool use_centroid = true,
120  int random_seed = 1,
121  bool debug_algorithm = false);
122 
132  std::string base_file_name,
133  std::string output_log_path = "");
134 
141  void
142  save(std::string base_file_name);
143 
148 
149 protected:
150 
157  void load(std::string base_file_name);
158 
163 
168 
173 };
174 
175 }
176 
177 #endif
void load(std::string base_file_name)
Load the object state from a file.
void save(std::string base_file_name)
Save the object state to a file.
GreedyRandomSampler(Vector param_space_min, Vector param_space_max, int num_parameter_points, bool check_local_rom, double relative_error_tolerance, double alpha, double max_clamp, int subset_size, int convergence_subset_size, bool use_latin_hypercube, std::string output_log_path="", std::string warm_start_file_name="", bool use_centroid=true, int random_seed=1, bool debug_algorithm=false)
Constructor.
bool d_use_latin_hypercube
Use latin hypercube sampling instead of fixed uniform.
void getNextParameterPointAfterConvergenceFailure()
Get the next parameter point to sample after a convergence failure.
void constructParameterPoints()
Construct the list of parameter point candidates to sample.