PineForge HPO 0.1.0
Native hyperparameter optimization for PineForge strategies
Loading...
Searching...
No Matches
pineforge::hpo::GridSampler Class Referencefinal

Lazy exhaustive sampler over a finite SearchSpace in mixed-radix order. More...

#include <pineforge/hpo/sampler.hpp>

+ Inheritance diagram for pineforge::hpo::GridSampler:

Public Member Functions

 GridSampler (SearchSpace space)
 
std::optional< Candidatenext () override
 Returns each finite candidate once, then std::nullopt.
 
void reset () override
 Rewinds enumeration to ordinal zero.
 
std::uint64_t generated () const noexcept override
 Returns the number of candidates issued since construction or reset.
 
std::uint64_t total_candidates () const noexcept
 Returns the exact finite search-space cardinality.
 
- Public Member Functions inherited from pineforge::hpo::Sampler
virtual ~Sampler ()=default
 

Detailed Description

Lazy exhaustive sampler over a finite SearchSpace in mixed-radix order.

Definition at line 27 of file sampler.hpp.

Constructor & Destructor Documentation

◆ GridSampler()

pineforge::hpo::GridSampler::GridSampler ( SearchSpace  space)
explicit
Exceptions
std::invalid_argumentif a varying real dimension has no step.

Member Function Documentation

◆ generated()

std::uint64_t pineforge::hpo::GridSampler::generated ( ) const
inlineoverridevirtualnoexcept

Returns the number of candidates issued since construction or reset.

Implements pineforge::hpo::Sampler.

Definition at line 37 of file sampler.hpp.

◆ next()

std::optional< Candidate > pineforge::hpo::GridSampler::next ( )
overridevirtual

Returns each finite candidate once, then std::nullopt.

Implements pineforge::hpo::Sampler.

◆ reset()

void pineforge::hpo::GridSampler::reset ( )
overridevirtual

Rewinds enumeration to ordinal zero.

Implements pineforge::hpo::Sampler.

◆ total_candidates()

std::uint64_t pineforge::hpo::GridSampler::total_candidates ( ) const
inlinenoexcept

Returns the exact finite search-space cardinality.

Definition at line 39 of file sampler.hpp.


The documentation for this class was generated from the following file: