Trait/Object

breeze.numerics

Scaling

Related Docs: object Scaling | package numerics

Permalink

trait Scaling extends AnyRef

Scaling utilities.

Often, in order to avoid underflow, we can offload some of the exponent of a double into an int. To make things more efficient, we can actually share that exponent between doubles.

The scales used in this trait are in log space: they can be safely added and subtracted.

Linear Supertypes
AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Scaling
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Abstract Value Members

  1. abstract val scaleConstant: Int

    Permalink

    the largest (log) power of two we want to deal with

Concrete Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @HotSpotIntrinsicCandidate() @throws( ... )
  6. def computeScaleDelta(scores: Array[Double]): Int

    Permalink

    Computes the log power of two we'd need to scale by so that the max double is between (2 ** scaleConstant, 2 ** -scaleConstant).

  7. def determineScale(score: Double, oldScale: Int): Int

    Permalink
  8. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  9. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  10. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
    Annotations
    @HotSpotIntrinsicCandidate()
  11. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
    Annotations
    @HotSpotIntrinsicCandidate()
  12. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  13. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  14. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @HotSpotIntrinsicCandidate()
  15. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @HotSpotIntrinsicCandidate()
  16. def scaleArray(scores: Array[Double], currentScale: Int): Int

    Permalink

    Ensures that the max double is between (2**scaleConstant,2**-scaleConstant), scaling the array as necessary.

    Ensures that the max double is between (2**scaleConstant,2**-scaleConstant), scaling the array as necessary.

    returns

    newScale

  17. def scaleArrayToScale(scores: Array[Double], currentScale: Int, targetScale: Int): Unit

    Permalink
  18. def scaleValue(score: Double, currentScale: Int, targetScale: Int): Double

    Permalink

    Converts the scaled value into "normal" space

  19. def sumArrays(src: Array[Double], srcScale: Int, dest: Array[Double], destScale: Int): Int

    Permalink

    Sums src into dest assuming they're at different scales.

    Sums src into dest assuming they're at different scales. src may be longer than dest, which is useful for allocating a large work buffer.

    returns

    the new scale

  20. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  21. def toLogSpace(score: Double, currentScale: Int): Double

    Permalink
  22. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  23. def unscaleValue(score: Double, currentScale: Int): Double

    Permalink

    Converts the scaled value into "normal" space

  24. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  25. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  26. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Deprecated Value Members

  1. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @Deprecated @deprecated @throws( classOf[java.lang.Throwable] )
    Deprecated

    (Since version ) see corresponding Javadoc for more information.

Inherited from AnyRef

Inherited from Any

Ungrouped