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–114 unchanged (114 lines)
115 *
116 * @return the parameters of the Gaussian function that best fits the
117 * observed points (in the same order as above).
118 */
119 public double[] fit() {
120 final double[] guess = (new ParameterGuesser(getObservations())).guess();
121 return fit(new Gaussian.Parametric(), guess);
122 }
123
124 /**
125 * Guesses the parameters {@code norm}, {@code mean}, and {@code sigma}
126 * of a {@link org.apache.commons.math.analysis.function.Gaussian.Parametric}
127 * based on the specified observed points.
…lines 128–337 unchanged (210 lines)

After

…lines 1–114 unchanged (114 lines)
115 *
116 * @return the parameters of the Gaussian function that best fits the
117 * observed points (in the same order as above).
118 */
119 public double[] fit() {
120 final double[] guess = (new ParameterGuesser(getObservations())).guess();
121 return fit(guess);
122 }
123
124 /**
125 * Guesses the parameters {@code norm}, {@code mean}, and {@code sigma}
126 * of a {@link org.apache.commons.math.analysis.function.Gaussian.Parametric}
127 * based on the specified observed points.
…lines 128–337 unchanged (210 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
scoped_identifier
identifier "org"
. "."
identifier "apache"
. "."
identifier "commons"
. "."
identifier "math"
. "."
identifier "optimization"
. "."
identifier "fitting"
; ";"
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 "Comparator"
; ";"
import_declaration (+22 nodes collapsed)
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "apache"
. "."
identifier "commons"
. "."
identifier "math"
. "."
identifier "analysis"
. "."
identifier "ParametricUnivariateRealFunction"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "apache"
. "."
identifier "commons"
. "."
identifier "math"
. "."
identifier "exception"
. "."
identifier "NullArgumentException"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "apache"
. "."
identifier "commons"
. "."
identifier "math"
. "."
identifier "exception"
. "."
identifier "NumberIsTooSmallException"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "apache"
. "."
identifier "commons"
. "."
identifier "math"
. "."
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 "math"
. "."
identifier "exception"
. "."
identifier "ZeroException"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "apache"
. "."
identifier "commons"
. "."
identifier "math"
. "."
identifier "exception"
. "."
identifier "NotStrictlyPositiveException"
; ";"
import_declaration (+22 nodes collapsed)
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "apache"
. "."
identifier "commons"
. "."
identifier "math"
. "."
identifier "optimization"
. "."
identifier "DifferentiableMultivariateVectorialOptimizer"
; ";"
import_declaration (+22 nodes collapsed)
import_declaration (+22 nodes collapsed)
block_comment "/**\n * Fits points to a {@link\n * org.apache.commons.math.an"...
class_declaration
modifiers
public "public"
class "class"
identifier "GaussianFitter"
superclass
extends "extends"
type_identifier "CurveFitter"
class_body
{ "{"
block_comment "/**\n * Constructs an instance using the specified optimi"...
constructor_declaration
modifiers
public "public"
identifier "GaussianFitter"
formal_parameters
( "("
formal_parameter
type_identifier "DifferentiableMultivariateVectorialOptimizer"
identifier "optimizer"
) ")"
constructor_body
{ "{"
explicit_constructor_invocation
super "super"
argument_list
( "("
identifier "optimizer"
) ")"
; ";"
} "}"
block_comment "/**\n * Fits a Gaussian function to the observed points.\n"...
method_declaration (+235 nodes collapsed)
block_comment "/**\n * Fits a Gaussian function to the observed points.\n"...
method_declaration
modifiers
public "public"
array_type
floating_point_type
double "double"
dimensions
[ "["
] "]"
identifier "fit"
formal_parameters
( "("
) ")"
block
{ "{"
local_variable_declaration (+33 nodes collapsed)
return_statement
return "return"
method_invocation
identifier "fit"
argument_list
( "("
object_creation_expression
new "new"
scoped_type_identifier
type_identifier "Gaussian"
. "."
type_identifier "Parametric"
argument_list
( "("
) ")"
, ","
identifier "guess"
) ")"
; ";"
} "}"
block_comment "/**\n * Guesses the parameters {@code norm}, {@code mean}"...
class_declaration (+1448 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
scoped_identifier
identifier "org"
. "."
identifier "apache"
. "."
identifier "commons"
. "."
identifier "math"
. "."
identifier "optimization"
. "."
identifier "fitting"
; ";"
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 "Comparator"
; ";"
import_declaration (+22 nodes collapsed)
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "apache"
. "."
identifier "commons"
. "."
identifier "math"
. "."
identifier "analysis"
. "."
identifier "ParametricUnivariateRealFunction"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "apache"
. "."
identifier "commons"
. "."
identifier "math"
. "."
identifier "exception"
. "."
identifier "NullArgumentException"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "apache"
. "."
identifier "commons"
. "."
identifier "math"
. "."
identifier "exception"
. "."
identifier "NumberIsTooSmallException"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "apache"
. "."
identifier "commons"
. "."
identifier "math"
. "."
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 "math"
. "."
identifier "exception"
. "."
identifier "ZeroException"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "apache"
. "."
identifier "commons"
. "."
identifier "math"
. "."
identifier "exception"
. "."
identifier "NotStrictlyPositiveException"
; ";"
import_declaration (+22 nodes collapsed)
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "apache"
. "."
identifier "commons"
. "."
identifier "math"
. "."
identifier "optimization"
. "."
identifier "DifferentiableMultivariateVectorialOptimizer"
; ";"
import_declaration (+22 nodes collapsed)
import_declaration (+22 nodes collapsed)
block_comment "/**\n * Fits points to a {@link\n * org.apache.commons.math.an"...
class_declaration
modifiers
public "public"
class "class"
identifier "GaussianFitter"
superclass
extends "extends"
type_identifier "CurveFitter"
class_body
{ "{"
block_comment "/**\n * Constructs an instance using the specified optimi"...
constructor_declaration
modifiers
public "public"
identifier "GaussianFitter"
formal_parameters
( "("
formal_parameter
type_identifier "DifferentiableMultivariateVectorialOptimizer"
identifier "optimizer"
) ")"
constructor_body
{ "{"
explicit_constructor_invocation
super "super"
argument_list
( "("
identifier "optimizer"
) ")"
; ";"
} "}"
block_comment "/**\n * Fits a Gaussian function to the observed points.\n"...
method_declaration (+235 nodes collapsed)
block_comment "/**\n * Fits a Gaussian function to the observed points.\n"...
method_declaration
modifiers
public "public"
array_type
floating_point_type
double "double"
dimensions
[ "["
] "]"
identifier "fit"
formal_parameters
( "("
) ")"
block
{ "{"
local_variable_declaration (+33 nodes collapsed)
return_statement
return "return"
method_invocation
identifier "fit"
argument_list
( "("
identifier "guess"
) ")"
; ";"
} "}"
block_comment "/**\n * Guesses the parameters {@code norm}, {@code mean}"...
class_declaration (+1448 nodes collapsed)
} "}"