com.espertech.esper.view.stat
Class RegressionLinestView

java.lang.Object
  extended by com.espertech.esper.view.ViewSupport
      extended by com.espertech.esper.view.stat.BaseBivariateStatisticsView
          extended by com.espertech.esper.view.stat.RegressionLinestView
All Implemented Interfaces:
CloneableView, DerivedValueView, EventCollection, GroupableView, View, Viewable, java.lang.Iterable<EventBean>

public class RegressionLinestView
extends BaseBivariateStatisticsView
implements CloneableView

A view that calculates regression on two fields. The view uses internally a BaseStatisticsBean instance for the calculations, it also returns this bean as the result. This class accepts most of its behaviour from its parent, BaseBivariateStatisticsView. It adds the usage of the regression bean and the appropriate schema.


Field Summary
 
Fields inherited from class com.espertech.esper.view.stat.BaseBivariateStatisticsView
additionalProps, agentInstanceContext, eventType, lastValuesEventNew, statisticsBean, viewFactory
 
Fields inherited from class com.espertech.esper.view.ViewSupport
EMPTY_VIEW_ARRAY, parent
 
Constructor Summary
RegressionLinestView(ViewFactory viewFactory, AgentInstanceContext agentInstanceContext, ExprNode xFieldName, ExprNode yFieldName, EventType eventType, StatViewAdditionalProps additionalProps)
          Constructor.
 
Method Summary
 View cloneView()
          Duplicates the view.
protected static EventType createEventType(StatementContext statementContext, StatViewAdditionalProps additionalProps, int streamNum)
          Creates the event type for this view.
static EventBean doPopulateMap(BaseStatisticsBean baseStatisticsBean, EventAdapterService eventAdapterService, EventType eventType, StatViewAdditionalProps additionalProps, java.lang.Object[] decoration)
           
 EventType getEventType()
          Provides metadata information about the type of object the event collection contains.
 EventBean populateMap(BaseStatisticsBean baseStatisticsBean, EventAdapterService eventAdapterService, EventType eventType, StatViewAdditionalProps additionalProps, java.lang.Object[] decoration)
          Populate bean.
 java.lang.String toString()
           
 
Methods inherited from class com.espertech.esper.view.stat.BaseBivariateStatisticsView
getAdditionalProps, getExpressionX, getExpressionY, getLastValuesEventNew, getStatisticsBean, getViewFactory, iterator, setLastValuesEventNew, update
 
Methods inherited from class com.espertech.esper.view.ViewSupport
addView, addView, dumpChildViews, dumpUpdateParams, dumpUpdateParams, findDescendent, findViewIndex, getParent, getViews, hasViews, removeAllViews, removeView, removeView, setParent, updateChildren, updateChildren
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.espertech.esper.view.View
getParent, setParent
 
Methods inherited from interface com.espertech.esper.view.Viewable
addView, getViews, hasViews, removeAllViews, removeView
 

Constructor Detail

RegressionLinestView

public RegressionLinestView(ViewFactory viewFactory,
                            AgentInstanceContext agentInstanceContext,
                            ExprNode xFieldName,
                            ExprNode yFieldName,
                            EventType eventType,
                            StatViewAdditionalProps additionalProps)
Constructor.

Parameters:
xFieldName - is the field name of the field providing X data points
yFieldName - is the field name of the field providing X data points
agentInstanceContext - contains required view services
Method Detail

cloneView

public View cloneView()
Description copied from interface: CloneableView
Duplicates the view.

Expected to return a same view in initialized state for grouping.

Specified by:
cloneView in interface CloneableView

getEventType

public EventType getEventType()
Description copied from interface: EventCollection
Provides metadata information about the type of object the event collection contains.

Specified by:
getEventType in interface EventCollection
Returns:
metadata for the objects in the collection

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

populateMap

public EventBean populateMap(BaseStatisticsBean baseStatisticsBean,
                             EventAdapterService eventAdapterService,
                             EventType eventType,
                             StatViewAdditionalProps additionalProps,
                             java.lang.Object[] decoration)
Description copied from class: BaseBivariateStatisticsView
Populate bean.

Specified by:
populateMap in class BaseBivariateStatisticsView
Parameters:
baseStatisticsBean - results
eventAdapterService - event adapters
eventType - type
additionalProps - additional props
decoration - decoration values
Returns:
bean

doPopulateMap

public static EventBean doPopulateMap(BaseStatisticsBean baseStatisticsBean,
                                      EventAdapterService eventAdapterService,
                                      EventType eventType,
                                      StatViewAdditionalProps additionalProps,
                                      java.lang.Object[] decoration)

createEventType

protected static EventType createEventType(StatementContext statementContext,
                                           StatViewAdditionalProps additionalProps,
                                           int streamNum)
Creates the event type for this view.

Parameters:
statementContext - is the event adapter service
Returns:
event type of view

© 2006-2015 EsperTech Inc.
All rights reserved.
Visit us at espertech.com