Class: Numeric

Inherits:
Object show all
Defined in:
lib/rust/core/types/datatype.rb,
lib/rust/stats/probabilities.rb

Instance Method Summary collapse

Instance Method Details

#_rust_prob_distance(other) ⇒ Object

Computes the distance between this and another number.

Raises:

  • (TypeError)


8
9
10
11
12
# File 'lib/rust/stats/probabilities.rb', line 8

def _rust_prob_distance(other)
    raise TypeError, "no implicit conversion of #{other.class} into Numeric" unless other.is_a? Numeric
    
    return (self - other).abs
end

#to_RObject



154
155
156
# File 'lib/rust/core/types/datatype.rb', line 154

def to_R
    self.inspect
end