AutoPas  3.0.0
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
autopas::ConfigurationPattern Struct Reference

A configuration pattern that matches zero or more actual configurations, used in the rule language. More...

#include <RuleBasedProgramTree.h>

Public Member Functions

 ConfigurationPattern ()
 Constructs a pattern that matches all configurations.
 
 ConfigurationPattern (const ConfigurationPattern &configurationPattern)
 Copy Constructor.
 
 ~ConfigurationPattern () noexcept
 Destructor.
 
void add (const RuleVM::MemoryCell &value)
 Adds a value to the allowed values of this configuration pattern.
 
bool matches (const Configuration &configuration) const
 
std::string toString () const
 

Public Attributes

std::set< ContainerOption > _containers
 The allowed containers.
 
std::set< TraversalOption > _traversals
 The allowed traversals.
 
std::set< LoadEstimatorOption_loadEstimators
 The allowed load estimators.
 
std::set< DataLayoutOption > _dataLayouts
 The allowed data layouts.
 
std::set< Newton3Option > _newton3Options
 The allowed newton3 options.
 
std::set< double > _cellSizeFactors
 The allowed cell size factors.
 

Detailed Description

A configuration pattern that matches zero or more actual configurations, used in the rule language.

A configuration matches a pattern if all its components are allowed in the pattern. (If a component is empty in the pattern, it means that all possible values are allowed).

Constructor & Destructor Documentation

◆ ConfigurationPattern()

autopas::ConfigurationPattern::ConfigurationPattern ( const ConfigurationPattern configurationPattern)
default

Copy Constructor.

Parameters
configurationPattern

Member Function Documentation

◆ add()

void autopas::ConfigurationPattern::add ( const RuleVM::MemoryCell value)
inline

Adds a value to the allowed values of this configuration pattern.

The component that is modified depends on the contained value of the passed variant. (E.g. if a Newton3Option is passed in the variant, _newton3Options is modified.

Parameters
valueThe value to add to the allowed values of the configuration pattern (a variant).

◆ matches()

bool autopas::ConfigurationPattern::matches ( const Configuration configuration) const
inline
Parameters
configurationthe configuration to check
Returns
If the configuration matches this pattern.

◆ toString()

std::string autopas::ConfigurationPattern::toString ( ) const
inline
Returns
A string that represents this configuration pattern.

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