AutoPas  3.0.0
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Static Public Member Functions | List of all members
autopas::options::InteractionTypeOption Class Reference

Class representing the interaction type choices. More...

#include <InteractionTypeOption.h>

Inheritance diagram for autopas::options::InteractionTypeOption:
Inheritance graph
[legend]
Collaboration diagram for autopas::options::InteractionTypeOption:
Collaboration graph
[legend]

Public Types

enum  Value : Value_t { pairwise = 0b0001 , triwise = 0b0010 , all = 0b0011 }
 Possible choices for the interaction type. More...
 
using Value_t = unsigned int
 Type used for the internal enum.
 

Public Member Functions

 InteractionTypeOption ()=default
 Constructor.
 
constexpr InteractionTypeOption (Value option)
 Constructor from value.
 
constexpr InteractionTypeOption (Value_t option)
 Constructor from number value.
 
constexpr operator Value () const
 Cast to value.
 
- Public Member Functions inherited from autopas::options::Option< InteractionTypeOption >
 operator bool ()=delete
 Prevents cast to bool by deleting the conversion operator.
 
std::string to_string (bool fixedLength=false) const
 Converts an Option object to its respective string representation.
 

Static Public Member Functions

static std::set< InteractionTypeOptiongetDiscouragedOptions ()
 Set of options that are very unlikely to be interesting.
 
static std::map< InteractionTypeOption, std::string > getOptionNames ()
 Provides a way to iterate over the possible choices of InteractionTypeOption.
 
- Static Public Member Functions inherited from autopas::options::Option< InteractionTypeOption >
static std::set< InteractionTypeOptiongetAllOptions ()
 Provides a way to iterate over the possible options.
 
static std::set< InteractionTypeOptiongetMostOptions ()
 Provides a way to iterate over the possible options minus those that are very unlikely to be on interest.
 
static size_t maxStringLength ()
 Returns the number of characters in the string representation of the longest option.
 
static OutputContainer parseOptions (const std::string &optionsString)
 Converts a string of options to a set of enums.
 
static InteractionTypeOption parseOptionExact (const std::string &optionString)
 Converts a string to an enum.
 

Detailed Description

Class representing the interaction type choices.

Member Enumeration Documentation

◆ Value

Possible choices for the interaction type.

Enumerator
pairwise 

Pairwise interactions.

triwise 

Triwise interactions.

all 

All interaction types.

Used e.g. for setting autopas options for all interactions.

Constructor & Destructor Documentation

◆ InteractionTypeOption() [1/2]

constexpr autopas::options::InteractionTypeOption::InteractionTypeOption ( Value  option)
inlineconstexpr

Constructor from value.

Parameters
option

◆ InteractionTypeOption() [2/2]

constexpr autopas::options::InteractionTypeOption::InteractionTypeOption ( Value_t  option)
inlineconstexpr

Constructor from number value.

This is useful when combining values and directly using the result as argument of type InteractionTypeOption. This is necessary since e.g. pairwise & triwise results in an object of Value_t instead of Value.

Parameters
option

Member Function Documentation

◆ getDiscouragedOptions()

static std::set< InteractionTypeOption > autopas::options::InteractionTypeOption::getDiscouragedOptions ( )
inlinestatic

Set of options that are very unlikely to be interesting.

Note
Here, this specifically means InteractionTypeOption::all
Returns

◆ getOptionNames()

static std::map< InteractionTypeOption, std::string > autopas::options::InteractionTypeOption::getOptionNames ( )
inlinestatic

Provides a way to iterate over the possible choices of InteractionTypeOption.

Returns
map option -> string representation

◆ operator Value()

constexpr autopas::options::InteractionTypeOption::operator Value ( ) const
inlineconstexpr

Cast to value.

Returns

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