Skip to content

Commit

Permalink
Removed hessian related lines
Browse files Browse the repository at this point in the history
  • Loading branch information
vgnecula committed Aug 19, 2024
1 parent cfa7cf8 commit 7fc7895
Showing 1 changed file with 1 addition and 19 deletions.
20 changes: 1 addition & 19 deletions include/volume/volume_cooling_nonspherical_gaussians_crhmc.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,6 @@ NT get_next_gaussian(Polytope& P,
typedef typename NonSphericalGaussianFunctor::parameters<NT, Point> func_params;

typedef crhmc_input<MT, Point, Func, Grad, ZeroFunctor<Point>> Input;
//typedef crhmc_input<MT, Point, Func, Grad, Hess> Input;

typedef crhmc_problem<Point, Input> CrhmcProblem;

Expand Down Expand Up @@ -120,8 +119,6 @@ NT get_next_gaussian(Polytope& P,

Input input = convert2crhmc_input<Input, Polytope, Func, Grad, ZeroFunctor<Point>>(P, f, g, zerof);

//Input input = convert2crhmc_input<Input, Polytope, Func, Grad, Hess>(P, f, g, h);

typedef crhmc_problem<Point, Input> CrhmcProblem;

CrhmcProblem problem = CrhmcProblem(input);
Expand Down Expand Up @@ -209,7 +206,6 @@ void compute_annealing_schedule(Polytope Pin_copy,
typedef typename NonSphericalGaussianFunctor::parameters<NT, Point> func_params;

typedef crhmc_input<MT, Point, Func, Grad, ZeroFunctor<Point>> Input;
//typedef crhmc_input<MT, Point, Func, Grad, Hess> Input;

typedef crhmc_problem<Point, Input> CrhmcProblem;

Expand Down Expand Up @@ -261,7 +257,6 @@ void compute_annealing_schedule(Polytope Pin_copy,
func_params initial_f_params = func_params(Point(dimension), a_vals[0], -1, inv_covariance_matrix);
Func initial_f(initial_f_params);
Grad initial_g(initial_f_params);
Hess initial_h(initial_f_params);
ZeroFunctor<Point> initial_zerof;

Input initial_input = convert2crhmc_input<Input, Polytope, Func, Grad, ZeroFunctor<Point>>(Pin_copy, initial_f, initial_g, initial_zerof);
Expand Down Expand Up @@ -300,13 +295,10 @@ void compute_annealing_schedule(Polytope Pin_copy,

Func f(f_params);
Grad g(f_params);
Hess h(f_params);
ZeroFunctor<Point> zerof;

Input input = convert2crhmc_input<Input, Polytope, Func, Grad, ZeroFunctor<Point>>(Pin_copy, f, g, zerof);

//Input input = convert2crhmc_input<Input, Polytope, Func, Grad, Hess>(P, f, g, h);

typedef crhmc_problem<Point, Input> CrhmcProblem;

CrhmcProblem problem = CrhmcProblem(input);
Expand Down Expand Up @@ -334,8 +326,7 @@ void compute_annealing_schedule(Polytope Pin_copy,
}

//restore the new eta and start point, by looking at the walk after its operations
initial_eta = walk.get_current_eta();
//start_point = walk.getPoint();
initial_eta = walk.get_current_eta();

// Remove the last gaussian.
// Set the last a_i equal to zero
Expand Down Expand Up @@ -393,11 +384,9 @@ double non_spherical_crhmc_volume_cooling_gaussians(Polytope& Pin,
typedef typename Polytope::MT MT;
typedef typename NonSphericalGaussianFunctor::FunctionFunctor<Point> Func;
typedef typename NonSphericalGaussianFunctor::GradientFunctor<Point> Grad;
typedef typename NonSphericalGaussianFunctor::HessianFunctor<Point> Hess;
typedef typename NonSphericalGaussianFunctor::parameters<NT, Point> func_params;

typedef crhmc_input<MT, Point, Func, Grad, ZeroFunctor<Point>> Input;
//typedef crhmc_input<MT, Point, Func, Grad, Hess> Input;
typedef crhmc_problem<Point, Input> CrhmcProblem;

typedef ImplicitMidpointODESolver<Point, NT, CrhmcProblem, Grad, simdLen> Solver;
Expand All @@ -418,10 +407,6 @@ double non_spherical_crhmc_volume_cooling_gaussians(Polytope& Pin,
Grad
> crhmc_walk_params;

// auto P(Pin); //copy and work with P because we are going to shift
// auto newP(Pin);


typedef HPolytope<Point> HPOLYTOPE;

HPOLYTOPE P(Pin.dimension(), Pin.get_mat(), Pin.get_vec());
Expand Down Expand Up @@ -526,14 +511,11 @@ double non_spherical_crhmc_volume_cooling_gaussians(Polytope& Pin,

Func f(f_params);
Grad g(f_params);
Hess h(f_params);

ZeroFunctor<Point> zerof;

//create the crhmc problem
Input input = convert2crhmc_input<Input, Polytope, Func, Grad, ZeroFunctor<Point>>(newPin, f, g, zerof);
//Input input = convert2crhmc_input<Input, Polytope, Func, Grad, Hess>(P, f, g, h);


typedef crhmc_problem<Point, Input> CrhmcProblem;
CrhmcProblem problem = CrhmcProblem(input);
Expand Down

0 comments on commit 7fc7895

Please sign in to comment.