Box

com.phasmidsoftware.number.core.numerical.Box
case object Box extends Shape

Uniform probability density over a specific range, otherwise zero. CONSIDER making this a case class with a member corresponding to the l value of wiggle.

Attributes

Graph
Supertypes
trait Singleton
trait Product
trait Mirror
trait Serializable
trait Product
trait Equals
trait Shape
class Object
trait Matchable
class Any
Show all
Self type
Box.type

Members list

Type members

Inherited types

type MirroredElemLabels = EmptyTuple

The names of the product elements.

The names of the product elements.

Attributes

Inherited from:
Singleton
type MirroredElemTypes = EmptyTuple

Attributes

Inherited from:
Singleton
type MirroredMonoType = this.type

The mirrored *-type.

The mirrored *-type.

Attributes

Inherited from:
Singleton
type MirroredType = this.type

Attributes

Inherited from:
Singleton

Inherited and Abstract types

type MirroredLabel <: String

The name of the type.

The name of the type.

Attributes

Inherited from:
Mirror

Value members

Concrete methods

def effectiveMagnitude(l: Double): Double

Calculates the effective magnitude of a given size or scale. This method is used to evaluate the effective magnitude associated with specific properties of a distribution.

Calculates the effective magnitude of a given size or scale. This method is used to evaluate the effective magnitude associated with specific properties of a distribution.

Value parameters

l

the size or scale of the distribution (e.g., width or extent).

Attributes

Returns

the effective magnitude for the given input size or scale.

def probability(l: Double, x: Double): Double

Computes the probability that random points will be found with the range -x to +x where l half the width of the box.

Computes the probability that random points will be found with the range -x to +x where l half the width of the box.

Value parameters

l

the size or scale of the probability density function (e.g., standard deviation for a Gaussian distribution).

x

the specific point that bounds the region we're interested in (this number is always positive)

Attributes

Returns

the calculated probability density at the given point.

def thresholdConfidence(x: Double, l: Double): Double

wiggle(c) = l * c (linear) Inverting: c = x / l

wiggle(c) = l * c (linear) Inverting: c = x / l

Attributes

def toGaussianAbsolute[T : HasValue](t: T): T

This method is to simulate a uniform distribution with a normal distribution.

This method is to simulate a uniform distribution with a normal distribution.

Value parameters

t

the magnitude of the Box distribution.

Attributes

Returns

t/2 which will be used as the standard deviation.

def toGaussianRelative(x: Double): Double

This method is to simulate a uniform distribution with a normal distribution.

This method is to simulate a uniform distribution with a normal distribution.

Value parameters

x

half the length of the basis of the uniform distribution.

Attributes

Returns

x/2 which will be used as the standard deviation.

def wiggle(l: Double, confidence: Double = ...): Double

Calculates an adjusted scale or measure for a given size or range, based on the specified confidence level.

Calculates an adjusted scale or measure for a given size or range, based on the specified confidence level.

  • If confidence is 0.0, it returns positive infinity, representing maximum uncertainty.
  • If confidence is 1.0, it returns 0, representing no variability.
  • For other confidence levels, it returns half the input size l.

Value parameters

confidence

the confidence level, where 0.0 represents no certainty and 1.0 represents full certainty.

l

the size or scale of the probability density function (e.g., the width of the uniform distribution).

Attributes

Returns

the adjusted scale or measure based on the confidence level.

Inherited methods

def fromProduct(p: Product): MirroredMonoType

Creates a new instance of type T with elements taken from product p.

Creates a new instance of type T with elements taken from product p.

Attributes

Inherited from:
Singleton
def productElementNames: Iterator[String]

An iterator over the names of all the elements of this product.

An iterator over the names of all the elements of this product.

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

An iterator over all the elements of this product.

An iterator over all the elements of this product.

Attributes

Returns

in the default implementation, an Iterator[Any]

Inherited from:
Product