getState()
The getState method is used to define the types of the state variables
used by the UDA.
The state variables are passed in to each call of initState,
accumulate, merge, and finalResult. The format of
the table returned by the getState method is identical to the
getArgs and getShape methods.
Example
function getState()
statevars={}
statevars[1] = { "count", integer }
statevars[2] = { "sum", double }
return statevars
end