Lean  $LEAN_TAG$
QuantConnect.Optimizer.Objectives.Extremum Class Reference

Define the way to compare current real-values and the new one (candidates). It's encapsulated in different abstraction to allow configure the direction of optimization, i.e. max or min. More...

Inheritance diagram for QuantConnect.Optimizer.Objectives.Extremum:
[legend]

Public Member Functions

 Extremum (Func< decimal, decimal, bool > comparer)
 Create an instance of Extremum to compare values. More...
 
bool Better (decimal current, decimal candidate)
 Compares two values; identifies whether condition is met or not. More...
 

Detailed Description

Define the way to compare current real-values and the new one (candidates). It's encapsulated in different abstraction to allow configure the direction of optimization, i.e. max or min.

Definition at line 26 of file Extremum.cs.

Constructor & Destructor Documentation

◆ Extremum()

QuantConnect.Optimizer.Objectives.Extremum.Extremum ( Func< decimal, decimal, bool >  comparer)

Create an instance of Extremum to compare values.

Parameters
comparerThe way old and new values should be compared

Definition at line 34 of file Extremum.cs.

Member Function Documentation

◆ Better()

bool QuantConnect.Optimizer.Objectives.Extremum.Better ( decimal  current,
decimal  candidate 
)

Compares two values; identifies whether condition is met or not.

Parameters
currentLeft operand
candidateRight operand
Returns
Returns the result of comparer with this arguments
Here is the caller graph for this function:

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