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–36 unchanged (36 lines)
37 * Creates a diagonal weight matrix.
38 *
39 * @param weight List of the values of the diagonal.
40 */
41 public Weight(double[] weight) {
42 final int dim = weight.length;
43 weightMatrix = org.apache.commons.math3.linear.MatrixUtils.createRealMatrix(dim, dim);
44 for (int i = 0; i < dim; i++) {
45 weightMatrix.setEntry(i, i, weight[i]);
46 }
47 }
48
49 /**
50 * @param weight Weight matrix.
51 * @throws NonSquareMatrixException if the argument is not
52 * a square matrix.
…lines 53–72 unchanged (20 lines)

After

…lines 1–36 unchanged (36 lines)
37 * Creates a diagonal weight matrix.
38 *
39 * @param weight List of the values of the diagonal.
40 */
41 public Weight(double[] weight) {
42 final int dim = weight.length;
43 weightMatrix = new DiagonalMatrix(weight);
44 }
45
46 /**
47 * @param weight Weight matrix.
48 * @throws NonSquareMatrixException if the argument is not
49 * a square matrix.
50 */
…lines 51–69 unchanged (19 lines)

Before

program
block_comment "/*\n * Licensed to the Apache Software Foundation (ASF) under"...
package_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 "math3"
. "."
identifier "optim"
. "."
identifier "OptimizationData"
; ";"
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 "linear"
. "."
identifier "DiagonalMatrix"
; ";"
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 "NonSquareMatrixException"
; ";"
block_comment "/**\n * Weight matrix of the residuals between model and obse"...
class_declaration
modifiers
public "public"
class "class"
identifier "Weight"
super_interfaces
implements "implements"
type_list
type_identifier "OptimizationData"
class_body
{ "{"
block_comment "/** Weight matrix. */"
field_declaration
modifiers
private "private"
final "final"
type_identifier "RealMatrix"
variable_declarator
identifier "weightMatrix"
; ";"
block_comment "/**\n * Creates a diagonal weight matrix.\n *\n * @"...
constructor_declaration
modifiers
public "public"
identifier "Weight"
formal_parameters
( "("
formal_parameter
array_type
floating_point_type
double "double"
dimensions
[ "["
] "]"
identifier "weight"
) ")"
constructor_body
{ "{"
local_variable_declaration
modifiers
final "final"
integral_type
int "int"
variable_declarator
identifier "dim"
= "="
field_access
identifier "weight"
. "."
identifier "length"
; ";"
expression_statement
assignment_expression
identifier "weightMatrix"
= "="
method_invocation
field_access
field_access
field_access
field_access
field_access
identifier "org"
. "."
identifier "apache"
. "."
identifier "commons"
. "."
identifier "math3"
. "."
identifier "linear"
. "."
identifier "MatrixUtils"
. "."
identifier "createRealMatrix"
argument_list
( "("
identifier "dim"
, ","
identifier "dim"
) ")"
; ";"
for_statement
for "for"
( "("
local_variable_declaration
integral_type
int "int"
variable_declarator
identifier "i"
= "="
decimal_integer_literal "0"
; ";"
binary_expression
identifier "i"
< "<"
identifier "dim"
; ";"
update_expression
identifier "i"
++ "++"
) ")"
block
{ "{"
expression_statement
method_invocation
identifier "weightMatrix"
. "."
identifier "setEntry"
argument_list
( "("
identifier "i"
, ","
identifier "i"
, ","
array_access
identifier "weight"
[ "["
identifier "i"
] "]"
) ")"
; ";"
} "}"
} "}"
block_comment "/**\n * @param weight Weight matrix.\n * @throws NonSq"...
constructor_declaration (+73 nodes collapsed)
block_comment "/**\n * Gets the initial guess.\n *\n * @return the"...
method_declaration (+21 nodes collapsed)
} "}"

After

program
block_comment "/*\n * Licensed to the Apache Software Foundation (ASF) under"...
package_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 "math3"
. "."
identifier "optim"
. "."
identifier "OptimizationData"
; ";"
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 "linear"
. "."
identifier "DiagonalMatrix"
; ";"
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 "NonSquareMatrixException"
; ";"
block_comment "/**\n * Weight matrix of the residuals between model and obse"...
class_declaration
modifiers
public "public"
class "class"
identifier "Weight"
super_interfaces
implements "implements"
type_list
type_identifier "OptimizationData"
class_body
{ "{"
block_comment "/** Weight matrix. */"
field_declaration
modifiers
private "private"
final "final"
type_identifier "RealMatrix"
variable_declarator
identifier "weightMatrix"
; ";"
block_comment "/**\n * Creates a diagonal weight matrix.\n *\n * @"...
constructor_declaration
modifiers
public "public"
identifier "Weight"
formal_parameters
( "("
formal_parameter
array_type
floating_point_type
double "double"
dimensions
[ "["
] "]"
identifier "weight"
) ")"
constructor_body
{ "{"
local_variable_declaration
modifiers
final "final"
integral_type
int "int"
variable_declarator
identifier "dim"
= "="
field_access
identifier "weight"
. "."
identifier "length"
; ";"
expression_statement
assignment_expression
identifier "weightMatrix"
= "="
object_creation_expression
new "new"
type_identifier "DiagonalMatrix"
argument_list
( "("
identifier "weight"
) ")"
; ";"
} "}"
block_comment "/**\n * @param weight Weight matrix.\n * @throws NonSq"...
constructor_declaration (+73 nodes collapsed)
block_comment "/**\n * Gets the initial guess.\n *\n * @return the"...
method_declaration (+21 nodes collapsed)
} "}"