Variance

com.phasmidsoftware.number.core.misc.Variance
object Variance extends App

Object defining a set of mathematical operations related to variance and statistical computations.

Attributes

Graph
Supertypes
trait App
trait DelayedInit
class Object
trait Matchable
class Any
Self type
Variance.type

Members list

Value members

Concrete methods

def convolution(x: Double, y: Double): Double

Computes a transformation on two Double values by calculating the square root of the sum of the square of the first value and twice the product of the two input values.

Computes a transformation on two Double values by calculating the square root of the sum of the square of the first value and twice the product of the two input values.

This is an approximation of the full formula which is: σ²(XY)/(XY)² = σ²(X)/X² + σ²(Y)/Y² + σ²(X)σ²(Y)/(X²Y²)

Value parameters

x

the first Double value

y

the second Double value

Attributes

Returns

a Double representing the computed result of the transformation

def rootMeanSquare(xs: Seq[Double]): Double

Calculates the root-mean-square of a sequence of doubles.

Calculates the root-mean-square of a sequence of doubles.

Value parameters

xs

a sequence of Double values for which the root-mean-square is to be computed

Attributes

Returns

the root-mean-square value of the given sequence

def rootMeanSquare(x: Double, y: Double): Double

Computes the root-mean-square of two given Double values.

Computes the root-mean-square of two given Double values.

Value parameters

x

the first value

y

the second value

Attributes

Returns

the root-mean-square of the two input values

def rootSumSquares(xs: Seq[Double]): Double

Computes the square root of the sum of squares of the elements in the given sequence.

Computes the square root of the sum of squares of the elements in the given sequence.

Value parameters

xs

a sequence of Double values

Attributes

Returns

the square root of the sum of the squares of the elements in the sequence

def rootSumSquares(x: Double, y: Double): Double

Computes the square root of the sum of the squares of two Double values.

Computes the square root of the sum of the squares of two Double values.

Value parameters

x

the first Double value

y

the second Double value

Attributes

Returns

the square root of the sum of the squares of the two input values

def sumOfSquares(xs: Seq[Double]): Double

Computes the sum of the squares of the elements in the given sequence.

Computes the sum of the squares of the elements in the given sequence.

Value parameters

xs

a sequence of Double values

Attributes

Returns

the sum of the squares of the elements in the sequence

def sumOfSquares(x: Double, y: Double): Double

Computes the sum of the squares of two Double values.

Computes the sum of the squares of two Double values.

Value parameters

x

the first Double value

y

the second Double value

Attributes

Returns

the sum of the squares of the two provided Double values

Inherited methods

final protected def args: Array[String]

The command line arguments passed to the application's main method.

The command line arguments passed to the application's main method.

Attributes

Inherited from:
App
final def main(args: Array[String]): Unit

The main method. This stores all arguments so that they can be retrieved with args and then executes all initialization code segments in the order in which they were passed to delayedInit.

The main method. This stores all arguments so that they can be retrieved with args and then executes all initialization code segments in the order in which they were passed to delayedInit.

Value parameters

args

the arguments passed to the main method

Attributes

Inherited from:
App

Deprecated and Inherited methods

override def delayedInit(body: => Unit): Unit

The init hook. This saves all initialization code for execution within main. This method is normally never called directly from user code. Instead it is called as compiler-generated code for those classes and objects (but not traits) that inherit from the DelayedInit trait and that do not themselves define a delayedInit method.

The init hook. This saves all initialization code for execution within main. This method is normally never called directly from user code. Instead it is called as compiler-generated code for those classes and objects (but not traits) that inherit from the DelayedInit trait and that do not themselves define a delayedInit method.

Value parameters

body

the initialization code to be stored for later execution

Attributes

Deprecated
[Since version 2.11.0] the delayedInit mechanism will disappear
Definition Classes
App -> DelayedInit
Inherited from:
App

Inherited fields

final val executionStart: Long

The time when the execution of this program started, in milliseconds since 1 January 1970 UTC.

The time when the execution of this program started, in milliseconds since 1 January 1970 UTC.

Attributes

Inherited from:
App