cass.rollup.processors.predictor.PapUpdate Maven / Gradle / Ivy
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;}
}