Object

hedgehog.core

Shrink

Related Doc: package core

Permalink

object Shrink extends XCompat

Linear Supertypes
XCompat, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Shrink
  2. XCompat
  3. AnyRef
  4. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

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. val StreamOrLazyList: Stream.type

    Permalink
    Definition Classes
    XCompat
  5. final def asInstanceOf[T0]: T0

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

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @HotSpotIntrinsicCandidate() @throws( ... )
  7. def consNub[A](x: A, ys0: List[A]): List[A]

    Permalink

    Cons an element on to the front of a list unless it is already there.

  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 halves[A](a: A)(implicit I: Integral[A]): List[A]

    Permalink

    Produce a list containing the progressive halving of an integral.

    Produce a list containing the progressive halving of an integral.

    scala> halves(15)
    List(15, 7, 3, 1)
    
    scala> halves(100)
    List(100, 50, 25, 12, 6, 3, 1)
    
    scala> halves(-26)
    List(-26, -13, -6, -3, -1)
  12. def hashCode(): Int

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

    Permalink
    Definition Classes
    Any
  14. def list[A](xs: List[A]): List[List[A]]

    Permalink

    Shrink a list by edging towards the empty list.

    Shrink a list by edging towards the empty list.

    scala> list(List(1, 2, 3))
    List(List(), List(2, 3), List(1, 3), List(1, 2))
    
    >>> list("abcd".toList)
    List("", "cd", "ab", "bcd", "acd", "abd", "abc")

    Note we always try the empty list first, as that is the optimal shrink.

  15. final def ne(arg0: AnyRef): Boolean

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

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @HotSpotIntrinsicCandidate()
  18. def removes[A](k0: Int, xs0: List[A]): List[List[A]]

    Permalink

    Produce all permutations of removing 'k' elements from a list.

    Produce all permutations of removing 'k' elements from a list.

    scala> removes(2, "abcdef".toList)
    List("cdef", "abef", "abcd")
  19. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  20. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  21. def towards[A](destination: A, x: A)(implicit I: Integral[A]): List[A]

    Permalink

    Shrink an integral number by edging towards a destination.

    Shrink an integral number by edging towards a destination.

    scala> towards(0, 100)
    List(0, 50, 75, 88, 94, 97, 99)
    
    scala> towards(500, 1000)
    List(500, 750, 875, 938, 969, 985, 993, 997, 999)
    
    scala> towards(-50,  -26)
    List(-50, -38, -32, -29, -27)

    Note we always try the destination first, as that is the optimal shrink.

  22. def towardsFloat[A](destination: Double, x: Double): List[Double]

    Permalink

    Shrink a floating-point number by edging towards a destination.

    Shrink a floating-point number by edging towards a destination.

    scala> towards(0.0, 100)
    List(0.0, 50.0, 75.0, 87.5, 93.75, 96.875, 98.4375...)
    
    scala> towards(1.0, 0.5)
    List(1.0, 0.75, 0.625, 0.5625, 0.53125, 0.515625, 0.5078125...)

    Note we always try the destination first, as that is the optimal shrink.

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

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  25. 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 XCompat

Inherited from AnyRef

Inherited from Any

Ungrouped