Store clean input argument paths.
Allow to compute short names from paths which may be numbered or made
unique. Short names can be retrieved by path name or by index in the list
through the methods to_short_name, to_unique_short_name and
to_numbered_short_name which all use algorithm_name_from_path.
Use genericsettings.algorithm_names when given for the respective position.
Usecases:
input_args = InputArguments(args) args = list(input_args) # args[i] == input_args[i] algId = input_args.to_unique_short_name(args[1]) plt.text(input_args.to_numbered_short_name(alg, maxlen=True))
Details: names from genericsettings.algorithm_names are not shortened for
display.
| Method | __init__ |
Undocumented |
| Method | append |
return slightly cleaned path |
| Method | to |
return a unique label like "1:Nelder" by position on input |
| Method | to |
The name is generated with algorithm_name_from_path or taken |
| Method | to |
append a number in case name(path) has previous duplicates |
| Property | label |
Return either genericsettings.len_of_names_in_pprldmany_legend or the minimal length for the names in self.short_names so that all names are different in 2 or more characters. At least 12 characters are displayed unless ... |
| Property | short |
Undocumented |
| Method | _to |
return also a path when isinstance(path, int) |
The name is generated with algorithm_name_from_path or taken
from genericsettings.algorithm_names when given.
Return either genericsettings.len_of_names_in_pprldmany_legend
or the minimal length for the names in self.short_names so that all
names are different in 2 or more characters. At least 12 characters
are displayed unless 0 <
genericsettings.len_of_names_in_pprldmany_legend < 12. This
function is used for the algorithm names legend.
Copy-pasted old code which is now removed.