Ejemplo n.º 1
0
        public void AddTuple(DataSetTuple dataSetTuple)
        {
            _lifeTime  = 0;
            _weight    = 0;
            _frequency = 0;

            DataAggregatorTuple tuple = new DataAggregatorTuple();

            tuple.OldFeatures.Frequency = this.Frequency;
            tuple.OldFeatures.Weight    = this.Weight;
            tuple.OldFeatures.LifeTime  = this.LifeTime;

            this.DataSetTuples.Add(dataSetTuple);

            tuple.NewFeatures.Frequency = this.Frequency;
            tuple.NewFeatures.Weight    = this.Weight;
            tuple.NewFeatures.LifeTime  = this.LifeTime;

            tuple.SourceCluster = this;
            tuple.StartTime     = this.StartTime;
            DCC.Receive(tuple);
        }
Ejemplo n.º 2
0
        public void Purge(double newT0)
        {
            _lifeTime  = 0;
            _weight    = 0;
            _frequency = 0;

            DataAggregatorTuple tuple = new DataAggregatorTuple();

            tuple.OldFeatures.Frequency = this.Frequency;
            tuple.OldFeatures.Weight    = this.Weight;
            tuple.OldFeatures.LifeTime  = this.LifeTime;

            this.DataSetTuples.RemoveAll(x => x.StartTime < newT0);

            tuple.NewFeatures.Frequency = this.Frequency;
            tuple.NewFeatures.Weight    = this.Weight;
            tuple.NewFeatures.LifeTime  = this.LifeTime;

            tuple.SourceCluster = this;
            tuple.StartTime     = this.StartTime;

            DCC.Receive(tuple);
        }