Module: Klam::Primitives::Vectors
- Included in:
- Environment
- Defined in:
- lib/klam/primitives/vectors.rb
Instance Method Summary collapse
- #absvec_read(vec, n) ⇒ Object (also: #<-address)
- #absvec_store(vec, n, val) ⇒ Object (also: #address->)
- #absvector(n) ⇒ Object
- #absvector?(v) ⇒ Boolean
Instance Method Details
#absvec_read(vec, n) ⇒ Object Also known as: <-address
14 15 16 |
# File 'lib/klam/primitives/vectors.rb', line 14 def absvec_read(vec, n) vec[n] end |
#absvec_store(vec, n, val) ⇒ Object Also known as: address->
8 9 10 |
# File 'lib/klam/primitives/vectors.rb', line 8 def absvec_store(vec, n, val) vec.store(n, val) end |
#absvector(n) ⇒ Object
4 5 6 |
# File 'lib/klam/primitives/vectors.rb', line 4 def absvector(n) ::Klam::Absvector.new(n) end |
#absvector?(v) ⇒ Boolean
20 21 22 |
# File 'lib/klam/primitives/vectors.rb', line 20 def absvector?(v) v.instance_of?(::Klam::Absvector) end |