improved objective function generation

This commit is contained in:
2026-01-14 18:24:14 -08:00
parent 4cce98a717
commit 105d91a492
3 changed files with 15 additions and 14 deletions

View File

@@ -14,13 +14,12 @@ function obj = initializeRandomMvnpdf(obj, domain, discretizationStep, protected
while domain.distance(mu) < protectedRange
mu = domain.random();
end
mu = mu(1:2);
% Set random distribution parameters
sig = [2 + rand * 2, 1; 1, 2 + rand * 2];
% Set up random bivariate normal distribution function
objectiveFunction = @(x, y) mvnpdf([x(:), y(:)], mu, sig);
objectiveFunction = objectiveFunctionWrapper(mu(1:2), sig);
% Regular initialization
obj = obj.initialize(objectiveFunction, domain, discretizationStep, protectedRange);