Google OR-Tools v9.11
a fast and portable software suite for combinatorial optimization
Loading...
Searching...
No Matches
operations_research::sat::SubsolverNameFilter Class Reference

Simple class used to filter executed subsolver names. More...

#include <cp_model_search.h>

Public Member Functions

 SubsolverNameFilter (const SatParameters &params)
 Warning, params must outlive the class and be constant.
 
bool Keep (absl::string_view name)
 Shall we keep a parameter with given name?
 
std::vector< SatParameters > Filter (absl::Span< const SatParameters > input)
 Applies Keep() to all the input list.
 
std::string LastName () const
 
const std::vector< std::string > & AllIgnored ()
 Returns the list of all ignored subsolver for use in logs.
 

Detailed Description

Simple class used to filter executed subsolver names.

Definition at line 132 of file cp_model_search.h.

Constructor & Destructor Documentation

◆ SubsolverNameFilter()

operations_research::sat::SubsolverNameFilter::SubsolverNameFilter ( const SatParameters & params)
explicit

Warning, params must outlive the class and be constant.

Hack for backward compatibility and easy of use.

Still add first solution solvers.

Definition at line 1018 of file cp_model_search.cc.

Member Function Documentation

◆ AllIgnored()

const std::vector< std::string > & operations_research::sat::SubsolverNameFilter::AllIgnored ( )
inline

Returns the list of all ignored subsolver for use in logs.

Definition at line 157 of file cp_model_search.h.

◆ Filter()

std::vector< SatParameters > operations_research::sat::SubsolverNameFilter::Filter ( absl::Span< const SatParameters > input)
inline

Applies Keep() to all the input list.

Definition at line 141 of file cp_model_search.h.

◆ Keep()

bool operations_research::sat::SubsolverNameFilter::Keep ( absl::string_view name)

Shall we keep a parameter with given name?

Definition at line 1040 of file cp_model_search.cc.

◆ LastName()

std::string operations_research::sat::SubsolverNameFilter::LastName ( ) const
inline

This is just a convenient function to follow the pattern if (filter.Keep("my_name")) subsovers.Add(.... filter.LastName() ... ) And not repeat "my_name" twice.

Definition at line 154 of file cp_model_search.h.


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