Code view:

A painting is a person's account of this edit as text, recorded independently of the node mapping - a rendering often has several equally defensible answers where the mapping has one. Deletions and insertions carry no position on the opposite side in a painting, so that panel draws no caret for them.

Before

…lines 1–381 unchanged (381 lines)
382 PointValuePair lastResult = null;
383
384 // -------------------- Generation Loop --------------------------------
385
386 generationLoop:
387 for (iterations = 1; iterations <= maxIterations; iterations++) {
388
389 // Generate and evaluate lambda offspring
390 final RealMatrix arz = randn1(dimension, lambda);
391 final RealMatrix arx = zeros(dimension, lambda);
392 final double[] fitness = new double[lambda];
393 // generate random offspring
394 for (int k = 0; k < lambda; k++) {
…lines 395–1318 unchanged (924 lines)

After

…lines 1–381 unchanged (381 lines)
382 PointValuePair lastResult = null;
383
384 // -------------------- Generation Loop --------------------------------
385
386 generationLoop:
387 for (iterations = 1; iterations <= maxIterations; iterations++) {
388 incrementIterationCount();
389
390 // Generate and evaluate lambda offspring
391 final RealMatrix arz = randn1(dimension, lambda);
392 final RealMatrix arx = zeros(dimension, lambda);
393 final double[] fitness = new double[lambda];
394 // generate random offspring
…lines 395–1319 unchanged (925 lines)

Before

program
block_comment "/*\n * Licensed to the Apache Software Foundation (ASF) under"...
package_declaration (+25 nodes collapsed)
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "util"
. "."
identifier "ArrayList"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "util"
. "."
identifier "Arrays"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "util"
. "."
identifier "List"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "apache"
. "."
identifier "commons"
. "."
identifier "math3"
. "."
identifier "exception"
. "."
identifier "DimensionMismatchException"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "apache"
. "."
identifier "commons"
. "."
identifier "math3"
. "."
identifier "exception"
. "."
identifier "NotPositiveException"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "apache"
. "."
identifier "commons"
. "."
identifier "math3"
. "."
identifier "exception"
. "."
identifier "NotStrictlyPositiveException"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "apache"
. "."
identifier "commons"
. "."
identifier "math3"
. "."
identifier "exception"
. "."
identifier "OutOfRangeException"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "apache"
. "."
identifier "commons"
. "."
identifier "math3"
. "."
identifier "exception"
. "."
identifier "TooManyEvaluationsException"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "apache"
. "."
identifier "commons"
. "."
identifier "math3"
. "."
identifier "linear"
. "."
identifier "Array2DRowRealMatrix"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "apache"
. "."
identifier "commons"
. "."
identifier "math3"
. "."
identifier "linear"
. "."
identifier "EigenDecomposition"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "apache"
. "."
identifier "commons"
. "."
identifier "math3"
. "."
identifier "linear"
. "."
identifier "MatrixUtils"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "apache"
. "."
identifier "commons"
. "."
identifier "math3"
. "."
identifier "linear"
. "."
identifier "RealMatrix"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "apache"
. "."
identifier "commons"
. "."
identifier "math3"
. "."
identifier "optim"
. "."
identifier "ConvergenceChecker"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "apache"
. "."
identifier "commons"
. "."
identifier "math3"
. "."
identifier "optim"
. "."
identifier "OptimizationData"
; ";"
import_declaration (+25 nodes collapsed)
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "apache"
. "."
identifier "commons"
. "."
identifier "math3"
. "."
identifier "optim"
. "."
identifier "PointValuePair"
; ";"
import_declaration (+25 nodes collapsed)
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "apache"
. "."
identifier "commons"
. "."
identifier "math3"
. "."
identifier "random"
. "."
identifier "RandomGenerator"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "apache"
. "."
identifier "commons"
. "."
identifier "math3"
. "."
identifier "util"
. "."
identifier "MathArrays"
; ";"
block_comment "/**\n * <p>An implementation of the active Covariance Matrix "...
class_declaration
modifiers
public "public"
class "class"
identifier "CMAESOptimizer"
superclass
extends "extends"
type_identifier "MultivariateOptimizer"
class_body
{ "{"
line_comment "// global search parameters"
block_comment "/**\n * Population size, offspring number. The primary st"...
field_declaration
modifiers
private "private"
integral_type
int "int"
variable_declarator
identifier "lambda"
; ";"
line_comment "// population size"
block_comment "/**\n * Covariance update mechanism, default is active CM"...
field_declaration
modifiers
private "private"
final "final"
boolean_type "boolean"
variable_declarator
identifier "isActiveCMA"
; ";"
block_comment "/**\n * Determines how often a new random offspring is ge"...
field_declaration
modifiers
private "private"
final "final"
integral_type
int "int"
variable_declarator
identifier "checkFeasableCount"
; ";"
block_comment "/**\n * @see Sigma\n */"
field_declaration
modifiers
private "private"
array_type
floating_point_type
double "double"
dimensions
[ "["
] "]"
variable_declarator
identifier "inputSigma"
; ";"
block_comment "/** Number of objective variables/problem dimension */"
field_declaration
modifiers
private "private"
integral_type
int "int"
variable_declarator
identifier "dimension"
; ";"
block_comment "/**\n * Defines the number of initial iterations, where t"...
field_declaration
modifiers
private "private"
integral_type
int "int"
variable_declarator
identifier "diagonalOnly"
; ";"
block_comment "/** Number of objective variables/problem dimension */"
field_declaration
modifiers
private "private"
boolean_type "boolean"
variable_declarator
identifier "isMinimize"
= "="
true "true"
; ";"
block_comment "/** Indicates whether statistic data is collected. */"
field_declaration
modifiers
private "private"
final "final"
boolean_type "boolean"
variable_declarator
identifier "generateStatistics"
; ";"
line_comment "// termination criteria"
block_comment "/** Maximal number of iterations allowed. */"
field_declaration
modifiers
private "private"
final "final"
integral_type
int "int"
variable_declarator
identifier "maxIterations"
; ";"
block_comment "/** Limit for fitness value. */"
field_declaration
modifiers
private "private"
final "final"
floating_point_type
double "double"
variable_declarator
identifier "stopFitness"
; ";"
block_comment "/** Stop if x-changes larger stopTolUpX. */"
field_declaration
modifiers
private "private"
floating_point_type
double "double"
variable_declarator
identifier "stopTolUpX"
; ";"
block_comment "/** Stop if x-change smaller stopTolX. */"
field_declaration
modifiers
private "private"
floating_point_type
double "double"
variable_declarator
identifier "stopTolX"
; ";"
block_comment "/** Stop if fun-changes smaller stopTolFun. */"
field_declaration
modifiers
private "private"
floating_point_type
double "double"
variable_declarator
identifier "stopTolFun"
; ";"
block_comment "/** Stop if back fun-changes smaller stopTolHistFun. */"
field_declaration
modifiers
private "private"
floating_point_type
double "double"
variable_declarator
identifier "stopTolHistFun"
; ";"
line_comment "// selection strategy parameters"
block_comment "/** Number of parents/points for recombination. */"
field_declaration
modifiers
private "private"
integral_type
int "int"
variable_declarator
identifier "mu"
; ";"
line_comment "//"
block_comment "/** log(mu + 0.5), stored for efficiency. */"
field_declaration
modifiers
private "private"
floating_point_type
double "double"
variable_declarator
identifier "logMu2"
; ";"
block_comment "/** Array for weighted recombination. */"
field_declaration
modifiers
private "private"
type_identifier "RealMatrix"
variable_declarator
identifier "weights"
; ";"
block_comment "/** Variance-effectiveness of sum w_i x_i. */"
field_declaration
modifiers
private "private"
floating_point_type
double "double"
variable_declarator
identifier "mueff"
; ";"
line_comment "//"
line_comment "// dynamic strategy parameters and constants"
block_comment "/** Overall standard deviation - search volume. */"
field_declaration
modifiers
private "private"
floating_point_type
double "double"
variable_declarator
identifier "sigma"
; ";"
block_comment "/** Cumulation constant. */"
field_declaration
modifiers
private "private"
floating_point_type
double "double"
variable_declarator
identifier "cc"
; ";"
block_comment "/** Cumulation constant for step-size. */"
field_declaration
modifiers
private "private"
floating_point_type
double "double"
variable_declarator
identifier "cs"
; ";"
block_comment "/** Damping for step-size. */"
field_declaration
modifiers
private "private"
floating_point_type
double "double"
variable_declarator
identifier "damps"
; ";"
block_comment "/** Learning rate for rank-one update. */"
field_declaration
modifiers
private "private"
floating_point_type
double "double"
variable_declarator
identifier "ccov1"
; ";"
block_comment "/** Learning rate for rank-mu update' */"
field_declaration
modifiers
private "private"
floating_point_type
double "double"
variable_declarator
identifier "ccovmu"
; ";"
block_comment "/** Expectation of ||N(0,I)|| == norm(randn(N,1)). */"
field_declaration
modifiers
private "private"
floating_point_type
double "double"
variable_declarator
identifier "chiN"
; ";"
block_comment "/** Learning rate for rank-one update - diagonalOnly */"
field_declaration
modifiers
private "private"
floating_point_type
double "double"
variable_declarator
identifier "ccov1Sep"
; ";"
block_comment "/** Learning rate for rank-mu update - diagonalOnly */"
field_declaration
modifiers
private "private"
floating_point_type
double "double"
variable_declarator
identifier "ccovmuSep"
; ";"
line_comment "// CMA internal values - updated each generation"
block_comment "/** Objective variables. */"
field_declaration
modifiers
private "private"
type_identifier "RealMatrix"
variable_declarator
identifier "xmean"
; ";"
block_comment "/** Evolution path. */"
field_declaration
modifiers
private "private"
type_identifier "RealMatrix"
variable_declarator
identifier "pc"
; ";"
block_comment "/** Evolution path for sigma. */"
field_declaration
modifiers
private "private"
type_identifier "RealMatrix"
variable_declarator
identifier "ps"
; ";"
block_comment "/** Norm of ps, stored for efficiency. */"
field_declaration
modifiers
private "private"
floating_point_type
double "double"
variable_declarator
identifier "normps"
; ";"
block_comment "/** Coordinate system. */"
field_declaration
modifiers
private "private"
type_identifier "RealMatrix"
variable_declarator
identifier "B"
; ";"
block_comment "/** Scaling. */"
field_declaration
modifiers
private "private"
type_identifier "RealMatrix"
variable_declarator
identifier "D"
; ";"
block_comment "/** B*D, stored for efficiency. */"
field_declaration
modifiers
private "private"
type_identifier "RealMatrix"
variable_declarator
identifier "BD"
; ";"
block_comment "/** Diagonal of sqrt(D), stored for efficiency. */"
field_declaration
modifiers
private "private"
type_identifier "RealMatrix"
variable_declarator
identifier "diagD"
; ";"
block_comment "/** Covariance matrix. */"
field_declaration
modifiers
private "private"
type_identifier "RealMatrix"
variable_declarator
identifier "C"
; ";"
block_comment "/** Diagonal of C, used for diagonalOnly. */"
field_declaration
modifiers
private "private"
type_identifier "RealMatrix"
variable_declarator
identifier "diagC"
; ";"
block_comment "/** Number of iterations already performed. */"
field_declaration
modifiers
private "private"
integral_type
int "int"
variable_declarator
identifier "iterations"
; ";"
block_comment "/** History queue of best values. */"
field_declaration
modifiers
private "private"
array_type
floating_point_type
double "double"
dimensions
[ "["
] "]"
variable_declarator
identifier "fitnessHistory"
; ";"
block_comment "/** Size of history queue of best values. */"
field_declaration
modifiers
private "private"
integral_type
int "int"
variable_declarator
identifier "historySize"
; ";"
block_comment "/** Random generator. */"
field_declaration
modifiers
private "private"
final "final"
type_identifier "RandomGenerator"
variable_declarator
identifier "random"
; ";"
block_comment "/** History of sigma values. */"
field_declaration (+25 nodes collapsed)
block_comment "/** History of mean matrix. */"
field_declaration (+25 nodes collapsed)
block_comment "/** History of fitness values. */"
field_declaration (+25 nodes collapsed)
block_comment "/** History of D matrix. */"
field_declaration (+25 nodes collapsed)
block_comment "/**\n * @param maxIterations Maximal number of iterations"...
constructor_declaration (+120 nodes collapsed)
block_comment "/**\n * @return History of sigma values.\n */"
method_declaration
modifiers
public "public"
generic_type
type_identifier "List"
type_arguments
< "<"
type_identifier "Double"
> ">"
identifier "getStatisticsSigmaHistory"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
identifier "statisticsSigmaHistory"
; ";"
} "}"
block_comment "/**\n * @return History of mean matrix.\n */"
method_declaration
modifiers
public "public"
generic_type
type_identifier "List"
type_arguments
< "<"
type_identifier "RealMatrix"
> ">"
identifier "getStatisticsMeanHistory"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
identifier "statisticsMeanHistory"
; ";"
} "}"
block_comment "/**\n * @return History of fitness values.\n */"
method_declaration
modifiers
public "public"
generic_type
type_identifier "List"
type_arguments
< "<"
type_identifier "Double"
> ">"
identifier "getStatisticsFitnessHistory"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
identifier "statisticsFitnessHistory"
; ";"
} "}"
block_comment "/**\n * @return History of D matrix.\n */"
method_declaration
modifiers
public "public"
generic_type
type_identifier "List"
type_arguments
< "<"
type_identifier "RealMatrix"
> ">"
identifier "getStatisticsDHistory"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
identifier "statisticsDHistory"
; ";"
} "}"
block_comment "/**\n * Input sigma values.\n * They define the initia"...
class_declaration (+144 nodes collapsed)
block_comment "/**\n * Population size.\n * The number of offspring i"...
class_declaration (+86 nodes collapsed)
block_comment "/**\n * {@inheritDoc}\n *\n * @param optData Optimi"...
method_declaration (+36 nodes collapsed)
block_comment "/** {@inheritDoc} */"
method_declaration
modifiers
marker_annotation
@ "@"
identifier "Override"
protected "protected"
type_identifier "PointValuePair"
identifier "doOptimize"
formal_parameters
( "("
) ")"
block
{ "{"
line_comment "// -------------------- Initialization ---------------------"...
expression_statement
assignment_expression
identifier "isMinimize"
= "="
method_invocation
method_invocation
identifier "getGoalType"
argument_list
( "("
) ")"
. "."
identifier "equals"
argument_list
( "("
field_access
identifier "GoalType"
. "."
identifier "MINIMIZE"
) ")"
; ";"
local_variable_declaration
modifiers
final "final"
type_identifier "FitnessFunction"
variable_declarator
identifier "fitfun"
= "="
object_creation_expression
new "new"
type_identifier "FitnessFunction"
argument_list
( "("
) ")"
; ";"
local_variable_declaration
modifiers
final "final"
array_type
floating_point_type
double "double"
dimensions
[ "["
] "]"
variable_declarator
identifier "guess"
= "="
method_invocation
identifier "getStartPoint"
argument_list
( "("
) ")"
; ";"
line_comment "// number of objective variables/problem dimension"
expression_statement
assignment_expression
identifier "dimension"
= "="
field_access
identifier "guess"
. "."
identifier "length"
; ";"
expression_statement
method_invocation
identifier "initializeCMA"
argument_list
( "("
identifier "guess"
) ")"
; ";"
expression_statement
assignment_expression
identifier "iterations"
= "="
decimal_integer_literal "0"
; ";"
local_variable_declaration
floating_point_type
double "double"
variable_declarator
identifier "bestValue"
= "="
method_invocation
identifier "fitfun"
. "."
identifier "value"
argument_list
( "("
identifier "guess"
) ")"
; ";"
expression_statement
method_invocation
identifier "push"
argument_list
( "("
identifier "fitnessHistory"
, ","
identifier "bestValue"
) ")"
; ";"
local_variable_declaration (+26 nodes collapsed)
local_variable_declaration
type_identifier "PointValuePair"
variable_declarator
identifier "lastResult"
= "="
null_literal "null"
; ";"
line_comment "// -------------------- Generation Loop --------------------"...
labeled_statement
identifier "generationLoop"
: ":"
for_statement
for "for"
( "("
assignment_expression
identifier "iterations"
= "="
decimal_integer_literal "1"
; ";"
binary_expression
identifier "iterations"
<= "<="
identifier "maxIterations"
; ";"
update_expression
identifier "iterations"
++ "++"
) ")"
block
{ "{"
line_comment "// Generate and evaluate lambda offspring"
local_variable_declaration
modifiers
final "final"
type_identifier "RealMatrix"
variable_declarator
identifier "arz"
= "="
method_invocation
identifier "randn1"
argument_list
( "("
identifier "dimension"
, ","
identifier "lambda"
) ")"
; ";"
local_variable_declaration
modifiers
final "final"
type_identifier "RealMatrix"
variable_declarator
identifier "arx"
= "="
method_invocation
identifier "zeros"
argument_list
( "("
identifier "dimension"
, ","
identifier "lambda"
) ")"
; ";"
local_variable_declaration (+21 nodes collapsed)
line_comment "// generate random offspring"
for_statement (+250 nodes collapsed)
line_comment "// Sort by fitness and compute weighted mean into xmean"
local_variable_declaration
modifiers
final "final"
array_type
integral_type
int "int"
dimensions
[ "["
] "]"
variable_declarator
identifier "arindex"
= "="
method_invocation
identifier "sortedIndices"
argument_list
( "("
identifier "fitness"
) ")"
; ";"
line_comment "// Calculate new xmean, this is selection and recombination"
local_variable_declaration
modifiers
final "final"
type_identifier "RealMatrix"
variable_declarator
identifier "xold"
= "="
identifier "xmean"
; ";"
line_comment "// for speed up of Eq. (2) and (3)"
local_variable_declaration (+25 nodes collapsed)
expression_statement
assignment_expression
identifier "xmean"
= "="
method_invocation
identifier "bestArx"
. "."
identifier "multiply"
argument_list
( "("
identifier "weights"
) ")"
; ";"
local_variable_declaration (+25 nodes collapsed)
local_variable_declaration
modifiers
final "final"
type_identifier "RealMatrix"
variable_declarator
identifier "zmean"
= "="
method_invocation
identifier "bestArz"
. "."
identifier "multiply"
argument_list
( "("
identifier "weights"
) ")"
; ";"
local_variable_declaration
modifiers
final "final"
boolean_type "boolean"
variable_declarator
identifier "hsig"
= "="
method_invocation
identifier "updateEvolutionPaths"
argument_list
( "("
identifier "zmean"
, ","
identifier "xold"
) ")"
; ";"
if_statement (+42 nodes collapsed)
line_comment "// Adapt step size sigma - Eq. (5)"
expression_statement (+37 nodes collapsed)
local_variable_declaration
modifiers
final "final"
floating_point_type
double "double"
variable_declarator
identifier "bestFitness"
= "="
array_access
identifier "fitness"
[ "["
array_access
identifier "arindex"
[ "["
decimal_integer_literal "0"
] "]"
] "]"
; ";"
local_variable_declaration (+24 nodes collapsed)
if_statement (+109 nodes collapsed)
line_comment "// handle termination criteria"
line_comment "// Break, if fitness is good enough"
if_statement (+39 nodes collapsed)
local_variable_declaration (+26 nodes collapsed)
local_variable_declaration (+21 nodes collapsed)
for_statement (+84 nodes collapsed)
for_statement (+46 nodes collapsed)
local_variable_declaration
modifiers
final "final"
floating_point_type
double "double"
variable_declarator
identifier "historyBest"
= "="
method_invocation
identifier "min"
argument_list
( "("
identifier "fitnessHistory"
) ")"
; ";"
local_variable_declaration
modifiers
final "final"
floating_point_type
double "double"
variable_declarator
identifier "historyWorst"
= "="
method_invocation
identifier "max"
argument_list
( "("
identifier "fitnessHistory"
) ")"
; ";"
if_statement (+43 nodes collapsed)
if_statement (+28 nodes collapsed)
line_comment "// condition number of the covariance matrix exceeds 1e14"
if_statement (+29 nodes collapsed)
line_comment "// user defined termination"
if_statement (+87 nodes collapsed)
line_comment "// Adjust step size in case of equal function values (flat f"...
if_statement (+56 nodes collapsed)
if_statement (+61 nodes collapsed)
line_comment "// store best in history"
expression_statement
method_invocation
identifier "push"
argument_list
( "("
identifier "fitnessHistory"
, ","
identifier "bestFitness"
) ")"
; ";"
expression_statement
method_invocation
identifier "fitfun"
. "."
identifier "setValueRange"
argument_list
( "("
binary_expression
identifier "worstFitness"
- "-"
identifier "bestFitness"
) ")"
; ";"
if_statement (+68 nodes collapsed)
} "}"
return_statement
return "return"
identifier "optimum"
; ";"
} "}"
block_comment "/**\n * Scans the list of (required and optional) optimiz"...
method_declaration (+118 nodes collapsed)
block_comment "/**\n * Checks dimensions and values of boundaries and in"...
method_declaration (+195 nodes collapsed)
block_comment "/**\n * Initialization of the dynamic search parameters\n "...
method_declaration (+939 nodes collapsed)
block_comment "/**\n * Update of the evolution paths ps and pc.\n *\n "...
method_declaration (+224 nodes collapsed)
block_comment "/**\n * Update of the covariance matrix C for diagonalOnl"...
method_declaration (+201 nodes collapsed)
block_comment "/**\n * Update of the covariance matrix C.\n *\n * "...
method_declaration (+746 nodes collapsed)
block_comment "/**\n * Update B and D from C.\n *\n * @param negcc"...
method_declaration (+453 nodes collapsed)
block_comment "/**\n * Pushes the current best fitness value in a histor"...
method_declaration (+81 nodes collapsed)
block_comment "/**\n * Sorts fitness values.\n *\n * @param double"...
method_declaration (+177 nodes collapsed)
block_comment "/**\n * Used to sort fitness values. Sorting is always in"...
class_declaration (+243 nodes collapsed)
block_comment "/**\n * Normalizes fitness values to the range [0,1]. Add"...
class_declaration (+660 nodes collapsed)
line_comment "// -----Matrix utility functions similar to the Matlab build"...
block_comment "/**\n * @param m Input matrix\n * @return Matrix repre"...
method_declaration (+156 nodes collapsed)
block_comment "/**\n * @param m Input matrix.\n * @return Matrix repr"...
method_declaration (+156 nodes collapsed)
block_comment "/**\n * @param m Input matrix.\n * @return Matrix repr"...
method_declaration (+160 nodes collapsed)
block_comment "/**\n * @param m Input matrix 1.\n * @param n Input ma"...
method_declaration (+167 nodes collapsed)
block_comment "/**\n * @param m Input matrix 1.\n * @param n Input ma"...
method_declaration (+167 nodes collapsed)
block_comment "/**\n * @param m Input matrix.\n * @param cols Columns"...
method_declaration (+158 nodes collapsed)
block_comment "/**\n * @param m Input matrix.\n * @param k Diagonal p"...
method_declaration (+165 nodes collapsed)
block_comment "/**\n * @param m Input matrix.\n * @return Row matrix "...
method_declaration (+157 nodes collapsed)
block_comment "/**\n * @param m Input matrix.\n * @return the diagona"...
method_declaration (+239 nodes collapsed)
block_comment "/**\n * Copies a column from m1 to m2.\n *\n * @par"...
method_declaration (+83 nodes collapsed)
block_comment "/**\n * @param n Number of rows.\n * @param m Number o"...
method_declaration (+99 nodes collapsed)
block_comment "/**\n * @param n Number of rows.\n * @param m Number o"...
method_declaration (+109 nodes collapsed)
block_comment "/**\n * @param n Number of rows.\n * @param m Number o"...
method_declaration (+33 nodes collapsed)
block_comment "/**\n * @param mat Input matrix.\n * @param n Number o"...
method_declaration (+185 nodes collapsed)
block_comment "/**\n * @param start Start value.\n * @param end End v"...
method_declaration (+146 nodes collapsed)
block_comment "/**\n * @param m Input matrix.\n * @return the maximum"...
method_declaration (+128 nodes collapsed)
block_comment "/**\n * @param m Input matrix.\n * @return the minimum"...
method_declaration (+126 nodes collapsed)
block_comment "/**\n * @param m Input array.\n * @return the maximum "...
method_declaration (+92 nodes collapsed)
block_comment "/**\n * @param m Input array.\n * @return the minimum "...
method_declaration (+90 nodes collapsed)
block_comment "/**\n * @param indices Input index array.\n * @return "...
method_declaration (+95 nodes collapsed)
block_comment "/**\n * @param indices Input index array.\n * @return "...
method_declaration (+104 nodes collapsed)
block_comment "/**\n * @param size Length of random array.\n * @retur"...
method_declaration (+84 nodes collapsed)
block_comment "/**\n * @param size Number of rows.\n * @param popSize"...
method_declaration (+125 nodes collapsed)
} "}"

After

program
block_comment "/*\n * Licensed to the Apache Software Foundation (ASF) under"...
package_declaration (+25 nodes collapsed)
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "util"
. "."
identifier "ArrayList"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "util"
. "."
identifier "Arrays"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "util"
. "."
identifier "List"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "apache"
. "."
identifier "commons"
. "."
identifier "math3"
. "."
identifier "exception"
. "."
identifier "DimensionMismatchException"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "apache"
. "."
identifier "commons"
. "."
identifier "math3"
. "."
identifier "exception"
. "."
identifier "NotPositiveException"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "apache"
. "."
identifier "commons"
. "."
identifier "math3"
. "."
identifier "exception"
. "."
identifier "NotStrictlyPositiveException"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "apache"
. "."
identifier "commons"
. "."
identifier "math3"
. "."
identifier "exception"
. "."
identifier "OutOfRangeException"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "apache"
. "."
identifier "commons"
. "."
identifier "math3"
. "."
identifier "exception"
. "."
identifier "TooManyEvaluationsException"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "apache"
. "."
identifier "commons"
. "."
identifier "math3"
. "."
identifier "linear"
. "."
identifier "Array2DRowRealMatrix"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "apache"
. "."
identifier "commons"
. "."
identifier "math3"
. "."
identifier "linear"
. "."
identifier "EigenDecomposition"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "apache"
. "."
identifier "commons"
. "."
identifier "math3"
. "."
identifier "linear"
. "."
identifier "MatrixUtils"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "apache"
. "."
identifier "commons"
. "."
identifier "math3"
. "."
identifier "linear"
. "."
identifier "RealMatrix"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "apache"
. "."
identifier "commons"
. "."
identifier "math3"
. "."
identifier "optim"
. "."
identifier "ConvergenceChecker"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "apache"
. "."
identifier "commons"
. "."
identifier "math3"
. "."
identifier "optim"
. "."
identifier "OptimizationData"
; ";"
import_declaration (+25 nodes collapsed)
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "apache"
. "."
identifier "commons"
. "."
identifier "math3"
. "."
identifier "optim"
. "."
identifier "PointValuePair"
; ";"
import_declaration (+25 nodes collapsed)
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "apache"
. "."
identifier "commons"
. "."
identifier "math3"
. "."
identifier "random"
. "."
identifier "RandomGenerator"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "apache"
. "."
identifier "commons"
. "."
identifier "math3"
. "."
identifier "util"
. "."
identifier "MathArrays"
; ";"
block_comment "/**\n * <p>An implementation of the active Covariance Matrix "...
class_declaration
modifiers
public "public"
class "class"
identifier "CMAESOptimizer"
superclass
extends "extends"
type_identifier "MultivariateOptimizer"
class_body
{ "{"
line_comment "// global search parameters"
block_comment "/**\n * Population size, offspring number. The primary st"...
field_declaration
modifiers
private "private"
integral_type
int "int"
variable_declarator
identifier "lambda"
; ";"
line_comment "// population size"
block_comment "/**\n * Covariance update mechanism, default is active CM"...
field_declaration
modifiers
private "private"
final "final"
boolean_type "boolean"
variable_declarator
identifier "isActiveCMA"
; ";"
block_comment "/**\n * Determines how often a new random offspring is ge"...
field_declaration
modifiers
private "private"
final "final"
integral_type
int "int"
variable_declarator
identifier "checkFeasableCount"
; ";"
block_comment "/**\n * @see Sigma\n */"
field_declaration
modifiers
private "private"
array_type
floating_point_type
double "double"
dimensions
[ "["
] "]"
variable_declarator
identifier "inputSigma"
; ";"
block_comment "/** Number of objective variables/problem dimension */"
field_declaration
modifiers
private "private"
integral_type
int "int"
variable_declarator
identifier "dimension"
; ";"
block_comment "/**\n * Defines the number of initial iterations, where t"...
field_declaration
modifiers
private "private"
integral_type
int "int"
variable_declarator
identifier "diagonalOnly"
; ";"
block_comment "/** Number of objective variables/problem dimension */"
field_declaration
modifiers
private "private"
boolean_type "boolean"
variable_declarator
identifier "isMinimize"
= "="
true "true"
; ";"
block_comment "/** Indicates whether statistic data is collected. */"
field_declaration
modifiers
private "private"
final "final"
boolean_type "boolean"
variable_declarator
identifier "generateStatistics"
; ";"
line_comment "// termination criteria"
block_comment "/** Maximal number of iterations allowed. */"
field_declaration
modifiers
private "private"
final "final"
integral_type
int "int"
variable_declarator
identifier "maxIterations"
; ";"
block_comment "/** Limit for fitness value. */"
field_declaration
modifiers
private "private"
final "final"
floating_point_type
double "double"
variable_declarator
identifier "stopFitness"
; ";"
block_comment "/** Stop if x-changes larger stopTolUpX. */"
field_declaration
modifiers
private "private"
floating_point_type
double "double"
variable_declarator
identifier "stopTolUpX"
; ";"
block_comment "/** Stop if x-change smaller stopTolX. */"
field_declaration
modifiers
private "private"
floating_point_type
double "double"
variable_declarator
identifier "stopTolX"
; ";"
block_comment "/** Stop if fun-changes smaller stopTolFun. */"
field_declaration
modifiers
private "private"
floating_point_type
double "double"
variable_declarator
identifier "stopTolFun"
; ";"
block_comment "/** Stop if back fun-changes smaller stopTolHistFun. */"
field_declaration
modifiers
private "private"
floating_point_type
double "double"
variable_declarator
identifier "stopTolHistFun"
; ";"
line_comment "// selection strategy parameters"
block_comment "/** Number of parents/points for recombination. */"
field_declaration
modifiers
private "private"
integral_type
int "int"
variable_declarator
identifier "mu"
; ";"
line_comment "//"
block_comment "/** log(mu + 0.5), stored for efficiency. */"
field_declaration
modifiers
private "private"
floating_point_type
double "double"
variable_declarator
identifier "logMu2"
; ";"
block_comment "/** Array for weighted recombination. */"
field_declaration
modifiers
private "private"
type_identifier "RealMatrix"
variable_declarator
identifier "weights"
; ";"
block_comment "/** Variance-effectiveness of sum w_i x_i. */"
field_declaration
modifiers
private "private"
floating_point_type
double "double"
variable_declarator
identifier "mueff"
; ";"
line_comment "//"
line_comment "// dynamic strategy parameters and constants"
block_comment "/** Overall standard deviation - search volume. */"
field_declaration
modifiers
private "private"
floating_point_type
double "double"
variable_declarator
identifier "sigma"
; ";"
block_comment "/** Cumulation constant. */"
field_declaration
modifiers
private "private"
floating_point_type
double "double"
variable_declarator
identifier "cc"
; ";"
block_comment "/** Cumulation constant for step-size. */"
field_declaration
modifiers
private "private"
floating_point_type
double "double"
variable_declarator
identifier "cs"
; ";"
block_comment "/** Damping for step-size. */"
field_declaration
modifiers
private "private"
floating_point_type
double "double"
variable_declarator
identifier "damps"
; ";"
block_comment "/** Learning rate for rank-one update. */"
field_declaration
modifiers
private "private"
floating_point_type
double "double"
variable_declarator
identifier "ccov1"
; ";"
block_comment "/** Learning rate for rank-mu update' */"
field_declaration
modifiers
private "private"
floating_point_type
double "double"
variable_declarator
identifier "ccovmu"
; ";"
block_comment "/** Expectation of ||N(0,I)|| == norm(randn(N,1)). */"
field_declaration
modifiers
private "private"
floating_point_type
double "double"
variable_declarator
identifier "chiN"
; ";"
block_comment "/** Learning rate for rank-one update - diagonalOnly */"
field_declaration
modifiers
private "private"
floating_point_type
double "double"
variable_declarator
identifier "ccov1Sep"
; ";"
block_comment "/** Learning rate for rank-mu update - diagonalOnly */"
field_declaration
modifiers
private "private"
floating_point_type
double "double"
variable_declarator
identifier "ccovmuSep"
; ";"
line_comment "// CMA internal values - updated each generation"
block_comment "/** Objective variables. */"
field_declaration
modifiers
private "private"
type_identifier "RealMatrix"
variable_declarator
identifier "xmean"
; ";"
block_comment "/** Evolution path. */"
field_declaration
modifiers
private "private"
type_identifier "RealMatrix"
variable_declarator
identifier "pc"
; ";"
block_comment "/** Evolution path for sigma. */"
field_declaration
modifiers
private "private"
type_identifier "RealMatrix"
variable_declarator
identifier "ps"
; ";"
block_comment "/** Norm of ps, stored for efficiency. */"
field_declaration
modifiers
private "private"
floating_point_type
double "double"
variable_declarator
identifier "normps"
; ";"
block_comment "/** Coordinate system. */"
field_declaration
modifiers
private "private"
type_identifier "RealMatrix"
variable_declarator
identifier "B"
; ";"
block_comment "/** Scaling. */"
field_declaration
modifiers
private "private"
type_identifier "RealMatrix"
variable_declarator
identifier "D"
; ";"
block_comment "/** B*D, stored for efficiency. */"
field_declaration
modifiers
private "private"
type_identifier "RealMatrix"
variable_declarator
identifier "BD"
; ";"
block_comment "/** Diagonal of sqrt(D), stored for efficiency. */"
field_declaration
modifiers
private "private"
type_identifier "RealMatrix"
variable_declarator
identifier "diagD"
; ";"
block_comment "/** Covariance matrix. */"
field_declaration
modifiers
private "private"
type_identifier "RealMatrix"
variable_declarator
identifier "C"
; ";"
block_comment "/** Diagonal of C, used for diagonalOnly. */"
field_declaration
modifiers
private "private"
type_identifier "RealMatrix"
variable_declarator
identifier "diagC"
; ";"
block_comment "/** Number of iterations already performed. */"
field_declaration
modifiers
private "private"
integral_type
int "int"
variable_declarator
identifier "iterations"
; ";"
block_comment "/** History queue of best values. */"
field_declaration
modifiers
private "private"
array_type
floating_point_type
double "double"
dimensions
[ "["
] "]"
variable_declarator
identifier "fitnessHistory"
; ";"
block_comment "/** Size of history queue of best values. */"
field_declaration
modifiers
private "private"
integral_type
int "int"
variable_declarator
identifier "historySize"
; ";"
block_comment "/** Random generator. */"
field_declaration
modifiers
private "private"
final "final"
type_identifier "RandomGenerator"
variable_declarator
identifier "random"
; ";"
block_comment "/** History of sigma values. */"
field_declaration (+25 nodes collapsed)
block_comment "/** History of mean matrix. */"
field_declaration (+25 nodes collapsed)
block_comment "/** History of fitness values. */"
field_declaration (+25 nodes collapsed)
block_comment "/** History of D matrix. */"
field_declaration (+25 nodes collapsed)
block_comment "/**\n * @param maxIterations Maximal number of iterations"...
constructor_declaration (+120 nodes collapsed)
block_comment "/**\n * @return History of sigma values.\n */"
method_declaration
modifiers
public "public"
generic_type
type_identifier "List"
type_arguments
< "<"
type_identifier "Double"
> ">"
identifier "getStatisticsSigmaHistory"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
identifier "statisticsSigmaHistory"
; ";"
} "}"
block_comment "/**\n * @return History of mean matrix.\n */"
method_declaration
modifiers
public "public"
generic_type
type_identifier "List"
type_arguments
< "<"
type_identifier "RealMatrix"
> ">"
identifier "getStatisticsMeanHistory"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
identifier "statisticsMeanHistory"
; ";"
} "}"
block_comment "/**\n * @return History of fitness values.\n */"
method_declaration
modifiers
public "public"
generic_type
type_identifier "List"
type_arguments
< "<"
type_identifier "Double"
> ">"
identifier "getStatisticsFitnessHistory"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
identifier "statisticsFitnessHistory"
; ";"
} "}"
block_comment "/**\n * @return History of D matrix.\n */"
method_declaration
modifiers
public "public"
generic_type
type_identifier "List"
type_arguments
< "<"
type_identifier "RealMatrix"
> ">"
identifier "getStatisticsDHistory"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
identifier "statisticsDHistory"
; ";"
} "}"
block_comment "/**\n * Input sigma values.\n * They define the initia"...
class_declaration (+144 nodes collapsed)
block_comment "/**\n * Population size.\n * The number of offspring i"...
class_declaration (+86 nodes collapsed)
block_comment "/**\n * {@inheritDoc}\n *\n * @param optData Optimi"...
method_declaration (+36 nodes collapsed)
block_comment "/** {@inheritDoc} */"
method_declaration
modifiers
marker_annotation
@ "@"
identifier "Override"
protected "protected"
type_identifier "PointValuePair"
identifier "doOptimize"
formal_parameters
( "("
) ")"
block
{ "{"
line_comment "// -------------------- Initialization ---------------------"...
expression_statement
assignment_expression
identifier "isMinimize"
= "="
method_invocation
method_invocation
identifier "getGoalType"
argument_list
( "("
) ")"
. "."
identifier "equals"
argument_list
( "("
field_access
identifier "GoalType"
. "."
identifier "MINIMIZE"
) ")"
; ";"
local_variable_declaration
modifiers
final "final"
type_identifier "FitnessFunction"
variable_declarator
identifier "fitfun"
= "="
object_creation_expression
new "new"
type_identifier "FitnessFunction"
argument_list
( "("
) ")"
; ";"
local_variable_declaration
modifiers
final "final"
array_type
floating_point_type
double "double"
dimensions
[ "["
] "]"
variable_declarator
identifier "guess"
= "="
method_invocation
identifier "getStartPoint"
argument_list
( "("
) ")"
; ";"
line_comment "// number of objective variables/problem dimension"
expression_statement
assignment_expression
identifier "dimension"
= "="
field_access
identifier "guess"
. "."
identifier "length"
; ";"
expression_statement
method_invocation
identifier "initializeCMA"
argument_list
( "("
identifier "guess"
) ")"
; ";"
expression_statement
assignment_expression
identifier "iterations"
= "="
decimal_integer_literal "0"
; ";"
local_variable_declaration
floating_point_type
double "double"
variable_declarator
identifier "bestValue"
= "="
method_invocation
identifier "fitfun"
. "."
identifier "value"
argument_list
( "("
identifier "guess"
) ")"
; ";"
expression_statement
method_invocation
identifier "push"
argument_list
( "("
identifier "fitnessHistory"
, ","
identifier "bestValue"
) ")"
; ";"
local_variable_declaration (+26 nodes collapsed)
local_variable_declaration
type_identifier "PointValuePair"
variable_declarator
identifier "lastResult"
= "="
null_literal "null"
; ";"
line_comment "// -------------------- Generation Loop --------------------"...
labeled_statement
identifier "generationLoop"
: ":"
for_statement
for "for"
( "("
assignment_expression
identifier "iterations"
= "="
decimal_integer_literal "1"
; ";"
binary_expression
identifier "iterations"
<= "<="
identifier "maxIterations"
; ";"
update_expression
identifier "iterations"
++ "++"
) ")"
block
{ "{"
expression_statement
method_invocation
identifier "incrementIterationCount"
argument_list
( "("
) ")"
; ";"
line_comment "// Generate and evaluate lambda offspring"
local_variable_declaration
modifiers
final "final"
type_identifier "RealMatrix"
variable_declarator
identifier "arz"
= "="
method_invocation
identifier "randn1"
argument_list
( "("
identifier "dimension"
, ","
identifier "lambda"
) ")"
; ";"
local_variable_declaration
modifiers
final "final"
type_identifier "RealMatrix"
variable_declarator
identifier "arx"
= "="
method_invocation
identifier "zeros"
argument_list
( "("
identifier "dimension"
, ","
identifier "lambda"
) ")"
; ";"
local_variable_declaration (+21 nodes collapsed)
line_comment "// generate random offspring"
for_statement (+250 nodes collapsed)
line_comment "// Sort by fitness and compute weighted mean into xmean"
local_variable_declaration
modifiers
final "final"
array_type
integral_type
int "int"
dimensions
[ "["
] "]"
variable_declarator
identifier "arindex"
= "="
method_invocation
identifier "sortedIndices"
argument_list
( "("
identifier "fitness"
) ")"
; ";"
line_comment "// Calculate new xmean, this is selection and recombination"
local_variable_declaration
modifiers
final "final"
type_identifier "RealMatrix"
variable_declarator
identifier "xold"
= "="
identifier "xmean"
; ";"
line_comment "// for speed up of Eq. (2) and (3)"
local_variable_declaration (+25 nodes collapsed)
expression_statement
assignment_expression
identifier "xmean"
= "="
method_invocation
identifier "bestArx"
. "."
identifier "multiply"
argument_list
( "("
identifier "weights"
) ")"
; ";"
local_variable_declaration (+25 nodes collapsed)
local_variable_declaration
modifiers
final "final"
type_identifier "RealMatrix"
variable_declarator
identifier "zmean"
= "="
method_invocation
identifier "bestArz"
. "."
identifier "multiply"
argument_list
( "("
identifier "weights"
) ")"
; ";"
local_variable_declaration
modifiers
final "final"
boolean_type "boolean"
variable_declarator
identifier "hsig"
= "="
method_invocation
identifier "updateEvolutionPaths"
argument_list
( "("
identifier "zmean"
, ","
identifier "xold"
) ")"
; ";"
if_statement (+42 nodes collapsed)
line_comment "// Adapt step size sigma - Eq. (5)"
expression_statement (+37 nodes collapsed)
local_variable_declaration
modifiers
final "final"
floating_point_type
double "double"
variable_declarator
identifier "bestFitness"
= "="
array_access
identifier "fitness"
[ "["
array_access
identifier "arindex"
[ "["
decimal_integer_literal "0"
] "]"
] "]"
; ";"
local_variable_declaration (+24 nodes collapsed)
if_statement (+109 nodes collapsed)
line_comment "// handle termination criteria"
line_comment "// Break, if fitness is good enough"
if_statement (+39 nodes collapsed)
local_variable_declaration (+26 nodes collapsed)
local_variable_declaration (+21 nodes collapsed)
for_statement (+84 nodes collapsed)
for_statement (+46 nodes collapsed)
local_variable_declaration
modifiers
final "final"
floating_point_type
double "double"
variable_declarator
identifier "historyBest"
= "="
method_invocation
identifier "min"
argument_list
( "("
identifier "fitnessHistory"
) ")"
; ";"
local_variable_declaration
modifiers
final "final"
floating_point_type
double "double"
variable_declarator
identifier "historyWorst"
= "="
method_invocation
identifier "max"
argument_list
( "("
identifier "fitnessHistory"
) ")"
; ";"
if_statement (+43 nodes collapsed)
if_statement (+28 nodes collapsed)
line_comment "// condition number of the covariance matrix exceeds 1e14"
if_statement (+29 nodes collapsed)
line_comment "// user defined termination"
if_statement (+87 nodes collapsed)
line_comment "// Adjust step size in case of equal function values (flat f"...
if_statement (+56 nodes collapsed)
if_statement (+61 nodes collapsed)
line_comment "// store best in history"
expression_statement
method_invocation
identifier "push"
argument_list
( "("
identifier "fitnessHistory"
, ","
identifier "bestFitness"
) ")"
; ";"
expression_statement
method_invocation
identifier "fitfun"
. "."
identifier "setValueRange"
argument_list
( "("
binary_expression
identifier "worstFitness"
- "-"
identifier "bestFitness"
) ")"
; ";"
if_statement (+68 nodes collapsed)
} "}"
return_statement
return "return"
identifier "optimum"
; ";"
} "}"
block_comment "/**\n * Scans the list of (required and optional) optimiz"...
method_declaration (+118 nodes collapsed)
block_comment "/**\n * Checks dimensions and values of boundaries and in"...
method_declaration (+195 nodes collapsed)
block_comment "/**\n * Initialization of the dynamic search parameters\n "...
method_declaration (+939 nodes collapsed)
block_comment "/**\n * Update of the evolution paths ps and pc.\n *\n "...
method_declaration (+224 nodes collapsed)
block_comment "/**\n * Update of the covariance matrix C for diagonalOnl"...
method_declaration (+201 nodes collapsed)
block_comment "/**\n * Update of the covariance matrix C.\n *\n * "...
method_declaration (+746 nodes collapsed)
block_comment "/**\n * Update B and D from C.\n *\n * @param negcc"...
method_declaration (+453 nodes collapsed)
block_comment "/**\n * Pushes the current best fitness value in a histor"...
method_declaration (+81 nodes collapsed)
block_comment "/**\n * Sorts fitness values.\n *\n * @param double"...
method_declaration (+177 nodes collapsed)
block_comment "/**\n * Used to sort fitness values. Sorting is always in"...
class_declaration (+243 nodes collapsed)
block_comment "/**\n * Normalizes fitness values to the range [0,1]. Add"...
class_declaration (+660 nodes collapsed)
line_comment "// -----Matrix utility functions similar to the Matlab build"...
block_comment "/**\n * @param m Input matrix\n * @return Matrix repre"...
method_declaration (+156 nodes collapsed)
block_comment "/**\n * @param m Input matrix.\n * @return Matrix repr"...
method_declaration (+156 nodes collapsed)
block_comment "/**\n * @param m Input matrix.\n * @return Matrix repr"...
method_declaration (+160 nodes collapsed)
block_comment "/**\n * @param m Input matrix 1.\n * @param n Input ma"...
method_declaration (+167 nodes collapsed)
block_comment "/**\n * @param m Input matrix 1.\n * @param n Input ma"...
method_declaration (+167 nodes collapsed)
block_comment "/**\n * @param m Input matrix.\n * @param cols Columns"...
method_declaration (+158 nodes collapsed)
block_comment "/**\n * @param m Input matrix.\n * @param k Diagonal p"...
method_declaration (+165 nodes collapsed)
block_comment "/**\n * @param m Input matrix.\n * @return Row matrix "...
method_declaration (+157 nodes collapsed)
block_comment "/**\n * @param m Input matrix.\n * @return the diagona"...
method_declaration (+239 nodes collapsed)
block_comment "/**\n * Copies a column from m1 to m2.\n *\n * @par"...
method_declaration (+83 nodes collapsed)
block_comment "/**\n * @param n Number of rows.\n * @param m Number o"...
method_declaration (+99 nodes collapsed)
block_comment "/**\n * @param n Number of rows.\n * @param m Number o"...
method_declaration (+109 nodes collapsed)
block_comment "/**\n * @param n Number of rows.\n * @param m Number o"...
method_declaration (+33 nodes collapsed)
block_comment "/**\n * @param mat Input matrix.\n * @param n Number o"...
method_declaration (+185 nodes collapsed)
block_comment "/**\n * @param start Start value.\n * @param end End v"...
method_declaration (+146 nodes collapsed)
block_comment "/**\n * @param m Input matrix.\n * @return the maximum"...
method_declaration (+128 nodes collapsed)
block_comment "/**\n * @param m Input matrix.\n * @return the minimum"...
method_declaration (+126 nodes collapsed)
block_comment "/**\n * @param m Input array.\n * @return the maximum "...
method_declaration (+92 nodes collapsed)
block_comment "/**\n * @param m Input array.\n * @return the minimum "...
method_declaration (+90 nodes collapsed)
block_comment "/**\n * @param indices Input index array.\n * @return "...
method_declaration (+95 nodes collapsed)
block_comment "/**\n * @param indices Input index array.\n * @return "...
method_declaration (+104 nodes collapsed)
block_comment "/**\n * @param size Length of random array.\n * @retur"...
method_declaration (+84 nodes collapsed)
block_comment "/**\n * @param size Number of rows.\n * @param popSize"...
method_declaration (+125 nodes collapsed)
} "}"