$darkmode
DENOPTIM
denoptim.fitness.Variable Class Reference

A variable in the expression defining the fitness. More...

Collaboration diagram for denoptim.fitness.Variable:
[legend]

Public Member Functions

 Variable (String varName)
 Constructs a named variable. More...
 
String getName ()
 Get the name of this variable, i.e., the string used in the fitness-defining expression. More...
 
String getDescriptorName ()
 Get the short name of the descriptor implementation. More...
 
void setDescriptorName (String descName)
 Set the short name of the descriptor implementation. More...
 
void setSMARTS (ArrayList< String > smarts)
 Set the list of smarts used to identify atom/bond-specific values. More...
 
void setDescriptorParameters (String[] params)
 Set the list of strings defining customisable parameter for the descriptor implementation. More...
 
String toString ()
 Returns a human readable string. More...
 

Static Public Member Functions

static Variable atomSpecific (String varName, String descName, String smartsIdentifier)
 Returns an atom specific variable, i.e., a variable the value of which needs to be obtained from the calculation of the given descriptor on a specific atom that is defined by the given SMARTS string. More...
 
static Variable parametrized (String varName, String descName, String paramsStr)
 Returns an parameterized variable, i.e., a variable the value of which needs to be obtained from the calculation of the given descriptor according to the given parameters. More...
 

Protected Attributes

ArrayList< String > smarts
 SMARTS strings used to select atom/bond specific values. More...
 
String[] params
 Definition of custom parameters for the configuration of the descriptor implementation. More...
 

Private Attributes

String varName
 The string used to represent this variable in the fitness defining expression. More...
 
String descName
 The short name of the descriptor implementation. More...
 

Detailed Description

A variable in the expression defining the fitness.

This is typically obtained by computing a descriptor with any of the available implementations. Since

  • the calculation of the descriptor can be tuned by means of parameters, and
  • the numerical value can be chosen to be atom/bond specific,

this class collects all the information that is needed to configure a descriptor calculation, process the result (e.g. take only specific values among those produced by the descriptor implementation), and keep a relation between such value and the variable name in the fitness defining expression.

Definition at line 41 of file Variable.java.

Constructor & Destructor Documentation

◆ Variable()

denoptim.fitness.Variable.Variable ( String  varName)

Constructs a named variable.

Parameters
varName

Definition at line 71 of file Variable.java.

References denoptim.fitness.Variable.varName.

Referenced by denoptim.fitness.Variable.atomSpecific(), and denoptim.fitness.Variable.parametrized().

Here is the caller graph for this function:

Member Function Documentation

◆ atomSpecific()

static Variable denoptim.fitness.Variable.atomSpecific ( String  varName,
String  descName,
String  smartsIdentifier 
)
static

Returns an atom specific variable, i.e., a variable the value of which needs to be obtained from the calculation of the given descriptor on a specific atom that is defined by the given SMARTS string.

Parameters
varNamethe name of the variable
descNamethe name of the descriptor as defined in any implementation of IDescriptor.
smartsIdentifierthe SMARTS that identifies the atom/s to consider for the calculation of the descriptor and thus the value.
Returns
the variable instance.

Definition at line 91 of file Variable.java.

References denoptim.fitness.Variable.descName, denoptim.fitness.Variable.setDescriptorName(), denoptim.fitness.Variable.setSMARTS(), denoptim.fitness.Variable.smarts, denoptim.fitness.Variable.Variable(), and denoptim.fitness.Variable.varName.

Here is the call graph for this function:

◆ getDescriptorName()

String denoptim.fitness.Variable.getDescriptorName ( )

Get the short name of the descriptor implementation.

Returns
the short name of the descriptor implementation

Definition at line 143 of file Variable.java.

References denoptim.fitness.Variable.descName.

Referenced by denoptim.fitness.FitnessExpressionParser.parse().

Here is the caller graph for this function:

◆ getName()

String denoptim.fitness.Variable.getName ( )

Get the name of this variable, i.e., the string used in the fitness-defining expression.

Returns
the string used in the fitness-defining expression.

Definition at line 132 of file Variable.java.

References denoptim.fitness.Variable.varName.

Referenced by denoptim.fitness.FitnessExpressionParser.parse().

Here is the caller graph for this function:

◆ parametrized()

static Variable denoptim.fitness.Variable.parametrized ( String  varName,
String  descName,
String  paramsStr 
)
static

Returns an parameterized variable, i.e., a variable the value of which needs to be obtained from the calculation of the given descriptor according to the given parameters.

Parameters
varNamethe name of the variable
descNamethe name of the descriptor as defined in any implementation of IDescriptor.
paramsStrstring defining all the parameters for the calculation of the descriptor.
Returns
the variable instance.

Definition at line 116 of file Variable.java.

References denoptim.fitness.Variable.descName, denoptim.fitness.Variable.setDescriptorName(), denoptim.fitness.Variable.setDescriptorParameters(), denoptim.fitness.Variable.Variable(), and denoptim.fitness.Variable.varName.

Here is the call graph for this function:

◆ setDescriptorName()

void denoptim.fitness.Variable.setDescriptorName ( String  descName)

Set the short name of the descriptor implementation.

Parameters
descNamethe short name of the descriptor implementation.

Definition at line 154 of file Variable.java.

References denoptim.fitness.Variable.descName.

Referenced by denoptim.fitness.Variable.atomSpecific(), and denoptim.fitness.Variable.parametrized().

Here is the caller graph for this function:

◆ setDescriptorParameters()

void denoptim.fitness.Variable.setDescriptorParameters ( String[]  params)

Set the list of strings defining customisable parameter for the descriptor implementation.

The order is expected to be that of the parameters as given by IDescriptor#getParameterNames().

Parameters
paramsthe list of strings

Definition at line 178 of file Variable.java.

References denoptim.fitness.Variable.params.

Referenced by denoptim.fitness.Variable.parametrized().

Here is the caller graph for this function:

◆ setSMARTS()

void denoptim.fitness.Variable.setSMARTS ( ArrayList< String >  smarts)

Set the list of smarts used to identify atom/bond-specific values.

Parameters
smartsthe list of SMARTS string

Definition at line 165 of file Variable.java.

References denoptim.fitness.Variable.smarts.

Referenced by denoptim.fitness.Variable.atomSpecific().

Here is the caller graph for this function:

◆ toString()

String denoptim.fitness.Variable.toString ( )

Member Data Documentation

◆ descName

String denoptim.fitness.Variable.descName
private

◆ params

String [] denoptim.fitness.Variable.params
protected

Definition of custom parameters for the configuration of the descriptor implementation.

Definition at line 63 of file Variable.java.

Referenced by denoptim.fitness.FitnessExpressionParser.parse(), denoptim.fitness.Variable.setDescriptorParameters(), and denoptim.fitness.Variable.toString().

◆ smarts

ArrayList<String> denoptim.fitness.Variable.smarts
protected

SMARTS strings used to select atom/bond specific values.

Definition at line 57 of file Variable.java.

Referenced by denoptim.fitness.Variable.atomSpecific(), denoptim.fitness.Variable.setSMARTS(), and denoptim.fitness.Variable.toString().

◆ varName

String denoptim.fitness.Variable.varName
private

The string used to represent this variable in the fitness defining expression.

Definition at line 47 of file Variable.java.

Referenced by denoptim.fitness.Variable.atomSpecific(), denoptim.fitness.Variable.getName(), denoptim.fitness.Variable.parametrized(), denoptim.fitness.Variable.toString(), and denoptim.fitness.Variable.Variable().


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