Doxygen
1.9.1
|
Manages candidate points. More...
#include <tsgCandidateManager.hpp>
Public Member Functions | |
template<typename IntTypeDim , typename IntTypeBatch > | |
CandidateManager (IntTypeDim dimensions, IntTypeBatch batch_size) | |
Constructor, accepts number of dimensions as a constant parameter. | |
~CandidateManager () | |
Default destructor. | |
void | operator= (std::vector< double > &&new_candidates) |
Assign a new set of candidate points. More... | |
void | complete (std::vector< double > const &p) |
Mark a point as "complete". | |
std::vector< double > | next (size_t remaining_budget) |
Returns the next best point to compute, returns empty vector if no points are available. | |
size_t | getNumRunning () const |
Returns the number of running jobs. | |
size_t | getNumDone () const |
Returns the number of complete jobs. | |
size_t | getNumCandidates () const |
Returns the number of all candidate jobs. | |
Protected Types | |
enum | TypeStatus { free , running , done } |
Jobs are divided into already checked-out (running), checked-in (done), and available (free). | |
Protected Member Functions | |
bool | match (double const a[], double const b[]) const |
Returns true if entries in a and b match to Maths::num_tol, assumes sizes match already. | |
bool | compare (double const a[], double const b[]) const |
Returns true if the lexicographical order of a is before b. | |
void | sort_candidates () |
Creates a sorted list of all candidates. | |
size_t | find (double const point[]) const |
Find the index of the point within the canidates vector, returns num_candidates if not found. | |
Manages candidate points.
Class for book keeping of candidate construction points, e.g., started jobs, finished jobs, available jobs.
|
inline |
Assign a new set of candidate points.
The new candidates are provided in the order of importance, but a lexicographical sorted list will also be created for searching purposes. The new set of points is also assumed to contain the currently running jobs.