SSJ API Documentation
Stochastic Simulation in Java
Loading...
Searching...
No Matches
SingletonWeightComparable.java
1package umontreal.ssj.latnetbuilder.weights;
2
15
16public class SingletonWeightComparable<T extends Comparable<T>> extends SingletonWeight<T>
17 implements Comparable<SingletonWeightComparable<T>> {
18
25 SingletonWeightComparable(T ind, double w) {
26 super(ind, w);
27 }
28
34 return getIndex().compareTo(w.getIndex());
35 }
36}
int compareTo(SingletonWeightComparable< T > w)
Method to be able to compare the current weight to another based on the ordering defined on 'T'.
SingletonWeightComparable(T ind, double w)
Constructs a single comparable weight with given 'index' and 'weight'.
SingletonWeight(T ind, double w)
Constructs a weight with given 'index' and 'weight'.