Source code of convex function generator
Liu, W.; Yuen, S.Y.; Chung, K.W.; Sung,
C.W. A General-Purpose Multi-Dimensional Convex Landscape Generator. Mathematics 2022, 10,
3974. https://doi.org/10.3390/math10213974
Function:
[fitness,landscape_structure] = convex_function_generator(dimension, points_number,
input, lower_bound, upper_bound,
plot_flag)
Introduction:
The function is to generate convex landscapes in multi-dimensions. With a given
input, the function will return the output.
Input:
dimension: the dimension of the original convex hull
points_number: the number of points for initialization
input: the input of the function is a (dimension-1,1) matrix
lower_bound: the setting of the lower bound for the initial points
upper_bound: the setting of the upper bound for the initial points
plot_flag: when dimension = 2,3, the convex function landscape can be visualized
when plot_flag = 1
Output:
fitness: the fitness value for the given input
landscape_structure: including the coordinates for the vertexes and the vertex
indexes for each polygon
Example:
-- Command Window --
[fitness,landscape_structure]
= convex_function_generator(3, 15, [1.2;1.5], -5, 5,
1);
An example of output
text
An example of output
figure