Class: Vector
- Inherits:
-
Object
- Object
- Vector
- Defined in:
- lib/statsample/matrix.rb
Instance Method Summary collapse
Instance Method Details
#coerce(other) ⇒ Object
5 6 7 8 9 10 11 12 |
# File 'lib/statsample/matrix.rb', line 5 def coerce(other) case other when Numeric return Matrix::Scalar.new(other), self else raise TypeError, "#{self.class} can't be coerced into #{other.class}" end end |
#old_coerce ⇒ Object
4 |
# File 'lib/statsample/matrix.rb', line 4 alias_method :old_coerce, :coerce |