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

#distance(other) ⇒ Object

Raises:

  • (TypeError)


4
5
6
7
8
# File 'lib/rust/stats/probabilities.rb', line 4

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

#to_RObject



120
121
122
# File 'lib/rust/core/types/datatype.rb', line 120

def to_R
    self.inspect
end