Skip to content

Commit

Permalink
Some minor bug fixes and backward compatibility.
Browse files Browse the repository at this point in the history
  • Loading branch information
smkalami committed May 7, 2019
1 parent 8013e58 commit b81ca0b
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 4 deletions.
Binary file modified dist/ypea-v1.0.mltbx
Binary file not shown.
2 changes: 1 addition & 1 deletion src/ypea/ypea_algorithm.m
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ function on_iteration_end(this, event_handler)
hh = plot(this.nfe_history, this.best_obj_value_history, varargin{:});

otherwise
error("MODE must be 'iteration' or 'nfe'.");
error('MODE must be ''iteration'' or ''nfe''.');

end

Expand Down
2 changes: 1 addition & 1 deletion src/ypea/ypea_ga.m
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@
value = 'roulettewheel';

otherwise
error("Invalid selection method. Must be 'random' or 'roulettewheel'.");
error('Invalid selection method. Must be ''random'' or ''roulettewheel''.');
end
this.selection = value;
end
Expand Down
2 changes: 1 addition & 1 deletion src/ypea/ypea_get_defined_var_types.m
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
function funcs = get_var_definition_funcs()

p = ypea_path();
items = dir([p '\ypea_define_var_type_*.m']);
items = dir(fullfile(p, 'ypea_define_var_type_*.m'));

funcs = cell(size(items));

Expand Down
5 changes: 4 additions & 1 deletion src/ypea/ypea_simplify_string.m
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
function str = ypea_simplify_string(str)
% Simplifies a String
str = lower(str);
str = replace(str, [" ", "-", "_", "."], '');
str = strrep(str, ' ', '');
str = strrep(str, '-', '');
str = strrep(str, '_', '');
str = strrep(str, '.', '');

end

0 comments on commit b81ca0b

Please sign in to comment.