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–44 unchanged (44 lines)
45 * @param checker Convergence checker.
46 */
47 protected BaseOptimizer(ConvergenceChecker<PAIR> checker) {
48 this.checker = checker;
49
50 evaluations = new Incrementor(0, new MaxEvalCallback());
51 iterations = new Incrementor(0, new MaxIterCallback());
52 }
53
54 /**
55 * Gets the maximal number of function evaluations.
56 *
57 * @return the maximal number of function evaluations.
…lines 58–232 unchanged (175 lines)

After

…lines 1–44 unchanged (44 lines)
45 * @param checker Convergence checker.
46 */
47 protected BaseOptimizer(ConvergenceChecker<PAIR> checker) {
48 this.checker = checker;
49
50 evaluations = new Incrementor(0, new MaxEvalCallback());
51 iterations = new Incrementor(Integer.MAX_VALUE, new MaxIterCallback());
52 }
53
54 /**
55 * Gets the maximal number of function evaluations.
56 *
57 * @return the maximal number of function evaluations.
…lines 58–232 unchanged (175 lines)

Before

program
block_comment "/*\n * Licensed to the Apache Software Foundation (ASF) under"...
package_declaration
package "package"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "apache"
. "."
identifier "commons"
. "."
identifier "math3"
. "."
identifier "optim"
; ";"
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 "Incrementor"
; ";"
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 "exception"
. "."
identifier "TooManyIterationsException"
; ";"
block_comment "/**\n * Base class for implementing optimizers.\n * It contain"...
class_declaration
modifiers
public "public"
abstract "abstract"
class "class"
identifier "BaseOptimizer"
type_parameters
< "<"
type_parameter
type_identifier "PAIR"
> ">"
class_body
{ "{"
block_comment "/** Evaluations counter. */"
field_declaration
modifiers
protected "protected"
final "final"
type_identifier "Incrementor"
variable_declarator
identifier "evaluations"
; ";"
block_comment "/** Iterations counter. */"
field_declaration
modifiers
protected "protected"
final "final"
type_identifier "Incrementor"
variable_declarator
identifier "iterations"
; ";"
block_comment "/** Convergence checker. */"
field_declaration
modifiers
private "private"
generic_type
type_identifier "ConvergenceChecker"
type_arguments
< "<"
type_identifier "PAIR"
> ">"
variable_declarator
identifier "checker"
; ";"
block_comment "/**\n * @param checker Convergence checker.\n */"
constructor_declaration
modifiers
protected "protected"
identifier "BaseOptimizer"
formal_parameters
( "("
formal_parameter
generic_type
type_identifier "ConvergenceChecker"
type_arguments
< "<"
type_identifier "PAIR"
> ">"
identifier "checker"
) ")"
constructor_body
{ "{"
expression_statement
assignment_expression
field_access
this "this"
. "."
identifier "checker"
= "="
identifier "checker"
; ";"
expression_statement
assignment_expression
identifier "evaluations"
= "="
object_creation_expression
new "new"
type_identifier "Incrementor"
argument_list
( "("
decimal_integer_literal "0"
, ","
object_creation_expression
new "new"
type_identifier "MaxEvalCallback"
argument_list
( "("
) ")"
) ")"
; ";"
expression_statement
assignment_expression
identifier "iterations"
= "="
object_creation_expression
new "new"
type_identifier "Incrementor"
argument_list
( "("
decimal_integer_literal "0"
, ","
object_creation_expression
new "new"
type_identifier "MaxIterCallback"
argument_list
( "("
) ")"
) ")"
; ";"
} "}"
block_comment "/**\n * Gets the maximal number of function evaluations.\n"...
method_declaration (+22 nodes collapsed)
block_comment "/**\n * Gets the number of evaluations of the objective f"...
method_declaration (+22 nodes collapsed)
block_comment "/**\n * Gets the maximal number of iterations.\n *\n "...
method_declaration (+22 nodes collapsed)
block_comment "/**\n * Gets the number of iterations performed by the al"...
method_declaration (+22 nodes collapsed)
block_comment "/**\n * Gets the convergence checker.\n *\n * @retu"...
method_declaration
modifiers
public "public"
generic_type
type_identifier "ConvergenceChecker"
type_arguments
< "<"
type_identifier "PAIR"
> ">"
identifier "getConvergenceChecker"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
identifier "checker"
; ";"
} "}"
block_comment "/**\n * Stores data and performs the optimization.\n *"...
method_declaration (+58 nodes collapsed)
block_comment "/**\n * Performs the bulk of the optimization algorithm.\n"...
method_declaration
modifiers
protected "protected"
abstract "abstract"
type_identifier "PAIR"
identifier "doOptimize"
formal_parameters
( "("
) ")"
; ";"
block_comment "/**\n * Increment the evaluation count.\n *\n * @th"...
method_declaration (+23 nodes collapsed)
block_comment "/**\n * Increment the iteration count.\n *\n * @thr"...
method_declaration (+23 nodes collapsed)
block_comment "/**\n * Scans the list of (required and optional) optimiz"...
method_declaration (+105 nodes collapsed)
block_comment "/**\n * Defines the action to perform when reaching the m"...
class_declaration (+42 nodes collapsed)
block_comment "/**\n * Defines the action to perform when reaching the m"...
class_declaration (+42 nodes collapsed)
} "}"

After

program
block_comment "/*\n * Licensed to the Apache Software Foundation (ASF) under"...
package_declaration
package "package"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "apache"
. "."
identifier "commons"
. "."
identifier "math3"
. "."
identifier "optim"
; ";"
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 "Incrementor"
; ";"
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 "exception"
. "."
identifier "TooManyIterationsException"
; ";"
block_comment "/**\n * Base class for implementing optimizers.\n * It contain"...
class_declaration
modifiers
public "public"
abstract "abstract"
class "class"
identifier "BaseOptimizer"
type_parameters
< "<"
type_parameter
type_identifier "PAIR"
> ">"
class_body
{ "{"
block_comment "/** Evaluations counter. */"
field_declaration
modifiers
protected "protected"
final "final"
type_identifier "Incrementor"
variable_declarator
identifier "evaluations"
; ";"
block_comment "/** Iterations counter. */"
field_declaration
modifiers
protected "protected"
final "final"
type_identifier "Incrementor"
variable_declarator
identifier "iterations"
; ";"
block_comment "/** Convergence checker. */"
field_declaration
modifiers
private "private"
generic_type
type_identifier "ConvergenceChecker"
type_arguments
< "<"
type_identifier "PAIR"
> ">"
variable_declarator
identifier "checker"
; ";"
block_comment "/**\n * @param checker Convergence checker.\n */"
constructor_declaration
modifiers
protected "protected"
identifier "BaseOptimizer"
formal_parameters
( "("
formal_parameter
generic_type
type_identifier "ConvergenceChecker"
type_arguments
< "<"
type_identifier "PAIR"
> ">"
identifier "checker"
) ")"
constructor_body
{ "{"
expression_statement
assignment_expression
field_access
this "this"
. "."
identifier "checker"
= "="
identifier "checker"
; ";"
expression_statement
assignment_expression
identifier "evaluations"
= "="
object_creation_expression
new "new"
type_identifier "Incrementor"
argument_list
( "("
decimal_integer_literal "0"
, ","
object_creation_expression
new "new"
type_identifier "MaxEvalCallback"
argument_list
( "("
) ")"
) ")"
; ";"
expression_statement
assignment_expression
identifier "iterations"
= "="
object_creation_expression
new "new"
type_identifier "Incrementor"
argument_list
( "("
field_access
identifier "Integer"
. "."
identifier "MAX_VALUE"
, ","
object_creation_expression
new "new"
type_identifier "MaxIterCallback"
argument_list
( "("
) ")"
) ")"
; ";"
} "}"
block_comment "/**\n * Gets the maximal number of function evaluations.\n"...
method_declaration (+22 nodes collapsed)
block_comment "/**\n * Gets the number of evaluations of the objective f"...
method_declaration (+22 nodes collapsed)
block_comment "/**\n * Gets the maximal number of iterations.\n *\n "...
method_declaration (+22 nodes collapsed)
block_comment "/**\n * Gets the number of iterations performed by the al"...
method_declaration (+22 nodes collapsed)
block_comment "/**\n * Gets the convergence checker.\n *\n * @retu"...
method_declaration
modifiers
public "public"
generic_type
type_identifier "ConvergenceChecker"
type_arguments
< "<"
type_identifier "PAIR"
> ">"
identifier "getConvergenceChecker"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
identifier "checker"
; ";"
} "}"
block_comment "/**\n * Stores data and performs the optimization.\n *"...
method_declaration (+58 nodes collapsed)
block_comment "/**\n * Performs the bulk of the optimization algorithm.\n"...
method_declaration
modifiers
protected "protected"
abstract "abstract"
type_identifier "PAIR"
identifier "doOptimize"
formal_parameters
( "("
) ")"
; ";"
block_comment "/**\n * Increment the evaluation count.\n *\n * @th"...
method_declaration (+23 nodes collapsed)
block_comment "/**\n * Increment the iteration count.\n *\n * @thr"...
method_declaration (+23 nodes collapsed)
block_comment "/**\n * Scans the list of (required and optional) optimiz"...
method_declaration (+105 nodes collapsed)
block_comment "/**\n * Defines the action to perform when reaching the m"...
class_declaration (+42 nodes collapsed)
block_comment "/**\n * Defines the action to perform when reaching the m"...
class_declaration (+42 nodes collapsed)
} "}"