@Override
    public void updateState(MapState<LofDataSet> state, List<TridentTuple> tuples,
            TridentCollector collector)
    {
        // Get model
        List<LofDataSet> dataSets = state.multiGet(Arrays.asList(Arrays.asList((Object) this.stateName)));
        LofDataSet dataSet = null;
        if (dataSets != null && !dataSets.isEmpty())
        {
            dataSet = dataSets.get(0);
        }
        else
        {
            dataSet = this.initialState;
        }

        for (TridentTuple targetTuple : tuples)
        {
            this.receiveCount++;
            LofPoint recievedPoint = (LofPoint) targetTuple.get(0);
            double lofScore = receivePoint(recievedPoint, dataSet);

            if (this.dataNotifier != null)
            {
                this.dataNotifier.notifyResult(new LofResult(lofScore, recievedPoint));
            }
        }

        // Save model
        state.multiPut(Arrays.asList(Arrays.asList((Object) this.stateName)),
                Arrays.asList(dataSet));

        if (this.batchNotifier != null)
        {
            this.batchNotifier.notifyResult(dataSet);
        }
    }
@ Override public void updateState ( MapState < LofDataSet > state , List < TridentTuple > tuples , TridentCollector collector ) { List < LofDataSet > dataSets = state . multiGet ( Arrays . asList ( Arrays . asList ( ( Object ) this . stateName ) ) ) ; LofDataSet dataSet = null ; if ( dataSets != null && ! dataSets . isEmpty ( ) ) { dataSet = dataSets . get ( 0 ) ; } else { dataSet = this . initialState ; } for ( TridentTuple targetTuple : tuples ) { this . receiveCount ++ ; LofPoint recievedPoint = ( LofPoint ) targetTuple . get ( 0 ) ; double lofScore = receivePoint ( recievedPoint , dataSet ) ; if ( this . dataNotifier != null ) { this . dataNotifier . notifyResult ( new LofResult ( lofScore , recievedPoint ) ) ; } } state . multiPut ( Arrays . asList ( Arrays . asList ( ( Object ) this . stateName ) ) , Arrays . asList ( dataSet ) ) ; if ( this . batchNotifier != null ) { this . batchNotifier . notifyResult ( dataSet ) ; } }
{@inheritDoc}