FuzzStringOps

com.phasmidsoftware.number.core.numerical.Number.FuzzStringOps
implicit class FuzzStringOps(w: String)

Implicit class which takes a String, and using method ~ and an Int parameter, yields a Number with the appropriate degree of fuzziness. This class provides an alternative to having to parse a fuzzy number from a String. Really, the only function it provides is the ability to put the error bounds after the exponent. It is parallel to FuzzOps except for two differences: the input is a String, and this is is so that trailing zeros in the fractional part don't get ignored, thus messing up the fuzziness; And, secondly, the result of ~ is a Try[Number], not just a Number.

Value parameters

w

a String.

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Value members

Concrete methods

def ~(n: Int): Try[Number]

Method to yield a (scalar) Number, whose value is x, and whose fuzziness is Gaussian with standard deviation defined by y. The magnitude of the fuzziness is determined by the number of decimal places of x.

Method to yield a (scalar) Number, whose value is x, and whose fuzziness is Gaussian with standard deviation defined by y. The magnitude of the fuzziness is determined by the number of decimal places of x.

Value parameters

n

a two-digit Int.

Attributes

Returns

a Try[Number] with absolute, Gaussian fuzziness, whose std. dev. is y.