Initial commit
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
#pragma once
|
||||
#include "util.h"
|
||||
#include <random>
|
||||
|
||||
//using RNG = std::mt19937;
|
||||
using RNG = std::minstd_rand;
|
||||
extern RNG eng;
|
||||
|
||||
void set_rand_seed(int seed);
|
||||
void add_random_noise(const VectorXd& x, double sigma, VectorXd& result);
|
||||
void set_random_mags(VectorXd& x, double sigma);
|
||||
void initialize_random_noise(VectorXd& x, double sigma, size_t size);
|
||||
void initialize_random_noise(std::vector<std::pair<double, VectorXd>>& xvec, double sigma, bool dual_problem);
|
||||
void initialize_random_noise(std::vector<std::pair<double, VectorXd>>& xvec, const VectorXd& guess, double sigma);
|
||||
VectorXd shuffle_x(const VectorXd& x);
|
||||
void make_symmetric_o4(VectorXd& x);
|
||||
|
||||
double my_optimizer(double (*objective_function)(const VectorXd&), VectorXd& result, int max_iters,
|
||||
double sigma, double beta, int clusters, bool use_symmetry, bool dual_problem);
|
||||
void study_sample(double (*objective_function)(const VectorXd&), VectorXd& result, int max_iters,
|
||||
int clusters, double sigma, double beta, bool use_symmetry);
|
||||
Reference in New Issue
Block a user