Loads problem instances from all regular files located in a specific directory.
Loads problem instances from all regular files located in a specific directory.
It scans the provided directory path, filters for regular files (ignoring subdirectories), and transforms each file path into a problem instance using the provided factory function. If the directory does not exist or cannot be read, it returns an empty list.
Type parameters
P
the type of the problem instance to create.
Value parameters
factory
a function that creates a problem instance from a file path string.
pathDir
the string path to the directory containing the problem files.
Attributes
Returns
a list of problem instances loaded from the directory.