All Downloads are FREE. Search and download functionalities are using the official Maven repository.

cass.rollup.processors.predictor.PapUpdate Maven / Gradle / Ivy

There is a newer version: 3.1.8
Show newest version
package cass.rollup.processors.predictor;

import org.stjs.javascript.Array;

public class PapUpdate {

    private int index;
    private Array visited;
    private double change;
    private boolean positive;

    public PapUpdate(int index, double change, boolean positive) {
        this.index = index;
        this.change = change;
        this.visited = new Array();
        this.positive = positive;
    }

    public boolean hasVisited(int index) {
        for (int i=0;i";
    }

    public int compare(PapUpdate other){
        double diff = change - other.getChange();
        if (diff < 0) return 1;
        if (diff > 0) return -1;
        return 0;
    }

    private Array cloneVisited() {
        Array newVis = new Array();
        //Integer newI;
        for (int i=0;i getVisited() {return visited;}
    public void setVisited(Array visited) {this.visited = visited;}

    public double getChange() {return change;}
    public void setChange(double change) {this.change = change;}

    public boolean getPositive() {return positive;}
    public void setPositive(boolean positive) {this.positive = positive;}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy