Evoplex  0.2.1
Public Member Functions | List of all members
evoplex::AGSameFuncForAll Class Reference

This class is used to generate a set of Attributes using the same function for all attributes. More...

#include <attrsgenerator.h>

Inheritance diagram for evoplex::AGSameFuncForAll:
evoplex::AttrsGenerator evoplex::AttrsGeneratorInterface

Public Member Functions

 AGSameFuncForAll (const AttributesScope &attrsScope, const int size, const Function &func, const Value &funcInput)
 Constructor. More...
 
SetOfAttributes create (int size=-1, std::function< void(int)> progress=[](int){}) override
 Creates a set of attributes. More...
 
Function function () const
 Gets the function used by this attributes generator.
 
const ValuefunctionInput () const
 Gets the input of the function used by this attributes generator.
 
- Public Member Functions inherited from evoplex::AttrsGenerator
virtual ~AttrsGenerator ()=default
 Destructor.
 
AttributesScope attrsScope () const
 Gets the attribute's scope.
 
const QString & command ()
 Gets the source command for the AttrsGenerator object.
 
int size () const
 Gets the size of the set of attributes.
 
- Public Member Functions inherited from evoplex::AttrsGeneratorInterface
virtual ~AttrsGeneratorInterface ()=default
 Destructor.
 

Additional Inherited Members

- Static Public Member Functions inherited from evoplex::AttrsGenerator
static AttrsGeneratorPtr parse (const AttributesScope &attrsScope, const QString &cmd, QString &error)
 Creates a AttrsGenerator object from a command. More...
 
static Value parseRandSeed (QString seedStr)
 Parse a 'rand_seed' command. More...
 
- Protected Member Functions inherited from evoplex::AttrsGenerator
 AttrsGenerator (const AttributesScope &attrsScope, const int size)
 Constructor. More...
 
- Protected Attributes inherited from evoplex::AttrsGenerator
const AttributesScope m_attrsScope
 
const int m_size
 
QString m_command
 

Detailed Description

This class is used to generate a set of Attributes using the same function for all attributes.

See also
AttrsGenerator, AGSameFuncForAll

Constructor & Destructor Documentation

◆ AGSameFuncForAll()

evoplex::AGSameFuncForAll::AGSameFuncForAll ( const AttributesScope &  attrsScope,
const int  size,
const Function &  func,
const Value funcInput 
)
explicit

Constructor.

Parameters
attrsScopeThe attribute's scope.
sizeThe size of the generated set of attributes.
funcThe attributes' function.
funcInputThe function's input.
See also
AttrsGenerator::parse

Member Function Documentation

◆ create()

SetOfAttributes evoplex::AGSameFuncForAll::create ( int  size = -1,
std::function< void(int)>  progress = [](int){} 
)
overridevirtual

Creates a set of attributes.

Parameters
sizeThe number of Atributes objects.
progressA callback std::function that can be used to track the progress, which is an integer from 0 to size.
Returns
A vector of Attributes.

Implements evoplex::AttrsGeneratorInterface.


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