Skip to content

Commit

Permalink
Minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
wedesoft committed Jun 17, 2011
1 parent 11d6fb7 commit e70ffca
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions lib/multiarray/node.rb
Expand Up @@ -314,18 +314,11 @@ def height

# Get size (number of elements) of this value
#
# @return [Integer] Returns +array_type.size+.
# @return [Integer] Returns number of elements of this value.
def size
shape.inject(1) { |a,b| a * b }
end

# Get memory size of object
#
# @return [Integer] Returns required storage size of this array.
def storage_size
array_type.storage_size
end

# Duplicate array expression if it is not in row-major format
#
# @return [Node] Duplicate of array or +self+.
Expand Down Expand Up @@ -385,7 +378,7 @@ def shape

# Get dimension of this term
#
# @return [Array<Integer>] Returns +array_type.dimension+.
# @return [Array<Integer>] Returns number of dimensions of this term.
def dimension
shape.size
end
Expand Down

0 comments on commit e70ffca

Please sign in to comment.