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–137 unchanged (137 lines)
138 * {@link #inverseCumulativeProbability(double)} to find critical values.
139 *
140 * @param p the desired probability for the critical value
141 * @return initial domain value
142 */
143 protected double getInitialDomain(double p) {
144 double ret;
145 double d = getDenominatorDegreesOfFreedom();
146 // use mean
147 ret = d / (d - 2.0);
148 return ret;
149 }
150
151 /**
152 * Modify the numerator degrees of freedom.
153 * @param degreesOfFreedom the new numerator degrees of freedom.
154 * @throws IllegalArgumentException if <code>degreesOfFreedom</code> is not
…lines 155–195 unchanged (41 lines)

After

…lines 1–137 unchanged (137 lines)
138 * {@link #inverseCumulativeProbability(double)} to find critical values.
139 *
140 * @param p the desired probability for the critical value
141 * @return initial domain value
142 */
143 protected double getInitialDomain(double p) {
144 double ret = 1.0;
145 double d = getDenominatorDegreesOfFreedom();
146 if (d > 2.0) {
147 // use mean
148 ret = d / (d - 2.0);
149 }
150 return ret;
151 }
152
153 /**
154 * Modify the numerator degrees of freedom.
155 * @param degreesOfFreedom the new numerator degrees of freedom.
…lines 156–197 unchanged (42 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 "math"
. "."
identifier "distribution"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "io"
. "."
identifier "Serializable"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "apache"
. "."
identifier "commons"
. "."
identifier "math"
. "."
identifier "MathException"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "apache"
. "."
identifier "commons"
. "."
identifier "math"
. "."
identifier "special"
. "."
identifier "Beta"
; ";"
block_comment "/**\n * Default implementation of\n * {@link org.apache.common"...
class_declaration
modifiers
public "public"
class "class"
identifier "FDistributionImpl"
superclass
extends "extends"
type_identifier "AbstractContinuousDistribution"
super_interfaces
implements "implements"
type_list
type_identifier "FDistribution"
, ","
type_identifier "Serializable"
class_body
{ "{"
block_comment "/** Serializable version identifier */"
field_declaration
modifiers
private "private"
static "static"
final "final"
integral_type
long "long"
variable_declarator
identifier "serialVersionUID"
= "="
unary_expression
- "-"
decimal_integer_literal "8516354193418641566L"
; ";"
block_comment "/** The numerator degrees of freedom*/"
field_declaration
modifiers
private "private"
floating_point_type
double "double"
variable_declarator
identifier "numeratorDegreesOfFreedom"
; ";"
block_comment "/** The numerator degrees of freedom*/"
field_declaration
modifiers
private "private"
floating_point_type
double "double"
variable_declarator
identifier "denominatorDegreesOfFreedom"
; ";"
block_comment "/**\n * Create a F distribution using the given degrees o"...
constructor_declaration (+41 nodes collapsed)
block_comment "/**\n * For this distribution, X, this method returns P(X"...
method_declaration (+116 nodes collapsed)
block_comment "/**\n * For this distribution, X, this method returns the"...
method_declaration (+67 nodes collapsed)
block_comment "/**\n * Access the domain value lower bound, based on <co"...
method_declaration
modifiers
protected "protected"
floating_point_type
double "double"
identifier "getDomainLowerBound"
formal_parameters
( "("
formal_parameter
floating_point_type
double "double"
identifier "p"
) ")"
block
{ "{"
return_statement
return "return"
decimal_floating_point_literal "0.0"
; ";"
} "}"
block_comment "/**\n * Access the domain value upper bound, based on <co"...
method_declaration (+23 nodes collapsed)
block_comment "/**\n * Access the initial domain value, based on <code>p"...
method_declaration
modifiers
protected "protected"
floating_point_type
double "double"
identifier "getInitialDomain"
formal_parameters
( "("
formal_parameter
floating_point_type
double "double"
identifier "p"
) ")"
block
{ "{"
local_variable_declaration
floating_point_type
double "double"
variable_declarator
identifier "ret"
; ";"
local_variable_declaration
floating_point_type
double "double"
variable_declarator
identifier "d"
= "="
method_invocation
identifier "getDenominatorDegreesOfFreedom"
argument_list
( "("
) ")"
; ";"
line_comment "// use mean"
expression_statement
assignment_expression
identifier "ret"
= "="
binary_expression
identifier "d"
/ "/"
parenthesized_expression
( "("
binary_expression
identifier "d"
- "-"
decimal_floating_point_literal "2.0"
) ")"
; ";"
return_statement
return "return"
identifier "ret"
; ";"
} "}"
block_comment "/**\n * Modify the numerator degrees of freedom.\n * @"...
method_declaration (+49 nodes collapsed)
block_comment "/**\n * Access the numerator degrees of freedom.\n * @"...
method_declaration
modifiers
public "public"
floating_point_type
double "double"
identifier "getNumeratorDegreesOfFreedom"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
identifier "numeratorDegreesOfFreedom"
; ";"
} "}"
block_comment "/**\n * Modify the denominator degrees of freedom.\n *"...
method_declaration (+49 nodes collapsed)
block_comment "/**\n * Access the denominator degrees of freedom.\n *"...
method_declaration
modifiers
public "public"
floating_point_type
double "double"
identifier "getDenominatorDegreesOfFreedom"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
identifier "denominatorDegreesOfFreedom"
; ";"
} "}"
} "}"

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 "math"
. "."
identifier "distribution"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "io"
. "."
identifier "Serializable"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "apache"
. "."
identifier "commons"
. "."
identifier "math"
. "."
identifier "MathException"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "apache"
. "."
identifier "commons"
. "."
identifier "math"
. "."
identifier "special"
. "."
identifier "Beta"
; ";"
block_comment "/**\n * Default implementation of\n * {@link org.apache.common"...
class_declaration
modifiers
public "public"
class "class"
identifier "FDistributionImpl"
superclass
extends "extends"
type_identifier "AbstractContinuousDistribution"
super_interfaces
implements "implements"
type_list
type_identifier "FDistribution"
, ","
type_identifier "Serializable"
class_body
{ "{"
block_comment "/** Serializable version identifier */"
field_declaration
modifiers
private "private"
static "static"
final "final"
integral_type
long "long"
variable_declarator
identifier "serialVersionUID"
= "="
unary_expression
- "-"
decimal_integer_literal "8516354193418641566L"
; ";"
block_comment "/** The numerator degrees of freedom*/"
field_declaration
modifiers
private "private"
floating_point_type
double "double"
variable_declarator
identifier "numeratorDegreesOfFreedom"
; ";"
block_comment "/** The numerator degrees of freedom*/"
field_declaration
modifiers
private "private"
floating_point_type
double "double"
variable_declarator
identifier "denominatorDegreesOfFreedom"
; ";"
block_comment "/**\n * Create a F distribution using the given degrees o"...
constructor_declaration (+41 nodes collapsed)
block_comment "/**\n * For this distribution, X, this method returns P(X"...
method_declaration (+116 nodes collapsed)
block_comment "/**\n * For this distribution, X, this method returns the"...
method_declaration (+67 nodes collapsed)
block_comment "/**\n * Access the domain value lower bound, based on <co"...
method_declaration
modifiers
protected "protected"
floating_point_type
double "double"
identifier "getDomainLowerBound"
formal_parameters
( "("
formal_parameter
floating_point_type
double "double"
identifier "p"
) ")"
block
{ "{"
return_statement
return "return"
decimal_floating_point_literal "0.0"
; ";"
} "}"
block_comment "/**\n * Access the domain value upper bound, based on <co"...
method_declaration (+23 nodes collapsed)
block_comment "/**\n * Access the initial domain value, based on <code>p"...
method_declaration
modifiers
protected "protected"
floating_point_type
double "double"
identifier "getInitialDomain"
formal_parameters
( "("
formal_parameter
floating_point_type
double "double"
identifier "p"
) ")"
block
{ "{"
local_variable_declaration
floating_point_type
double "double"
variable_declarator
identifier "ret"
= "="
decimal_floating_point_literal "1.0"
; ";"
local_variable_declaration
floating_point_type
double "double"
variable_declarator
identifier "d"
= "="
method_invocation
identifier "getDenominatorDegreesOfFreedom"
argument_list
( "("
) ")"
; ";"
if_statement
if "if"
parenthesized_expression
( "("
binary_expression
identifier "d"
> ">"
decimal_floating_point_literal "2.0"
) ")"
block
{ "{"
line_comment "// use mean"
expression_statement
assignment_expression
identifier "ret"
= "="
binary_expression
identifier "d"
/ "/"
parenthesized_expression
( "("
binary_expression
identifier "d"
- "-"
decimal_floating_point_literal "2.0"
) ")"
; ";"
} "}"
return_statement
return "return"
identifier "ret"
; ";"
} "}"
block_comment "/**\n * Modify the numerator degrees of freedom.\n * @"...
method_declaration (+49 nodes collapsed)
block_comment "/**\n * Access the numerator degrees of freedom.\n * @"...
method_declaration
modifiers
public "public"
floating_point_type
double "double"
identifier "getNumeratorDegreesOfFreedom"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
identifier "numeratorDegreesOfFreedom"
; ";"
} "}"
block_comment "/**\n * Modify the denominator degrees of freedom.\n *"...
method_declaration (+49 nodes collapsed)
block_comment "/**\n * Access the denominator degrees of freedom.\n *"...
method_declaration
modifiers
public "public"
floating_point_type
double "double"
identifier "getDenominatorDegreesOfFreedom"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
identifier "denominatorDegreesOfFreedom"
; ";"
} "}"
} "}"