Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
#595
to save parameters in the search path, for example, in PSO.
Describe the solution you'd like
Making attempt of putting
mutable std::mutex file_mutex;
int tscall::write_to_file(std::string content) const {
std::lock_guard<std::mutex> lock(file_mutex); // Locking to prevent race condition
std::ofstream file(filename, std::ios::app); // Open in append mode
if (file.is_open()) {
file << content << std::endl;
} else {
std::cerr << "Error opening file!" << std::endl;
}
}
in
|
/// Fitness computation |
|
/** |
|
* Computes the fitness for this UDP. |
|
* |
|
* @param x the decision vector. |
|
* |
|
* @return the fitness of \p x. |
|
*/ |
|
vector_double rosenbrock::fitness(const vector_double &x) const |
A clear and concise description of what you want to happen.
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Additional context
Add any other context or screenshots about the feature request here.
Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
#595
to save parameters in the search path, for example, in PSO.
Describe the solution you'd like
Making attempt of putting
in
pagmo2/src/problems/rosenbrock.cpp
Lines 51 to 59 in ac7b6d2
A clear and concise description of what you want to happen.
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Additional context
Add any other context or screenshots about the feature request here.