problemutils.extensions
Members list
Extensions
Extensions
Recursively applies a function f: A => A
on any object a
until f(a)
is equal to a
.
Recursively applies a function f: A => A
on any object a
until f(a)
is equal to a
.
Attributes
Recursively applies a function f: A => A
on any object a
until the predicate p
is satisfied.
Recursively applies a function f: A => A
on any object a
until the predicate p
is satisfied.
Attributes
Returns a set of all elements reachable from the starting point a
using a "neighbour function" f: A => IterableOnce[A]
.
Returns a set of all elements reachable from the starting point a
using a "neighbour function" f: A => IterableOnce[A]
.
Attributes
Applies any function A => A
on any object n
times. If n
is less than or equal to 0, the original object is returned without function application.
Applies any function A => A
on any object n
times. If n
is less than or equal to 0, the original object is returned without function application.
Attributes
Applies any function A => B
on any object a
and then returns the result.
Applies any function A => B
on any object a
and then returns the result.
Attributes
Applies any function A => Unit
on any object a
and then returns the object without modifying it.
Applies any function A => Unit
on any object a
and then returns the object without modifying it.
Attributes
Logs any object a
in the console without the "[*]" prefix and then returns the object without modifying it.
Logs any object a
in the console without the "[*]" prefix and then returns the object without modifying it.
Attributes
Logs any object a
in the console and then returns the object without modifying it.
Logs any object a
in the console and then returns the object without modifying it.
Attributes
Logs any attribute of object a
in the console and then returns the object without modifying it.
Logs any attribute of object a
in the console and then returns the object without modifying it.
Attributes
Logs any attribute of object a
in the console if the condition p
is satisfied and then returns the object without modifying it.
Logs any attribute of object a
in the console if the condition p
is satisfied and then returns the object without modifying it.
Attributes
Similar to log
, but takes a color parameter.
Similar to log
, but takes a color parameter.
Attributes
Logs any object a
in the console if the condition p
is satisfied and then returns the object without modifying it.
Logs any object a
in the console if the condition p
is satisfied and then returns the object without modifying it.
Attributes
Prints an empty line in the console and returns the object without modifying it. Useful for debugging.
Prints an empty line in the console and returns the object without modifying it. Useful for debugging.
Attributes
Computes the root mean square of this sequence.
Reshapes this sequence into a problemutils.classes.Matrix of the given width and height.
Computes the dot product of 2 vectors of the same length.
Computes the cross product of 2 vectors of length 3.
Returns the magnitude of this vector.
Returns a normalized version of this vector.