lib/mcg/signal_analysis/sar.rb
# Count the number of indexes that are positive
Count the number of indexes that are positive
Count the number of indexes that are positive
def count_indexes( indexes=nil )
          if not indexes
            indexes = @indexes.map{ |x| x.name }
          end
          sum = 0
          indexes.each do |idx| 
            sum += ((index(idx).is_set?) ? 1 : 0)
          end
          return sum
        end
def count_indexes ( indexes = nil ) if not indexes indexes = @indexes . map { | x | x . name } end sum = 0 indexes . each do | idx | sum += ( ( index ( idx ) . is_set? ) ? 1 : 0 ) end return sum end
Count the number of indexes that are positive
Count the number of indexes that are positive
indexes