Class: Statkit::Spec::MaxFuncExp

Inherits:
BaseExp
  • Object
show all
Defined in:
lib/statkit/specexp.rb

Instance Method Summary collapse

Methods inherited from BaseExp

#add_input

Constructor Details

#initializeMaxFuncExp

Returns a new instance of MaxFuncExp.



95
96
97
# File 'lib/statkit/specexp.rb', line 95

def initialize
  @max = nil
end

Instance Method Details

#add_input_chunk(input_chunk) ⇒ Object



103
104
105
106
107
108
109
# File 'lib/statkit/specexp.rb', line 103

def add_input_chunk(input_chunk)
  if @max.nil?
    @max = input_chunk.max
  else
    @max = (input_chunk + [@max]).max
  end
end

#evaluateObject



111
112
113
# File 'lib/statkit/specexp.rb', line 111

def evaluate()
  @max
end

#streaming?Boolean

Returns:

  • (Boolean)


99
100
101
# File 'lib/statkit/specexp.rb', line 99

def streaming?
  true
end