Implements comparable Weights. More...
Public Member Functions | |
| WeightsComparable (List< SingletonWeightComparable< T > > w) | |
| Constructs weights from a list of SingletonWeightsComparable. | |
| WeightsComparable () | |
| Initializes an empty list of comparable weights. | |
| ArrayList< SingletonWeightComparable< T > > | getComparableWeights () |
| Returns the current comparable weights. | |
| void | add (SingletonWeightComparable< T > singletonWeight) |
| Adds a new comparable weight to the list. | |
| void | sort () |
| Sorts the weights w.r.t. | |
| void | add (T index, double weight) |
| Adds a new weight with index 'index' and weight 'weight' or overwrites it, if the index already exists in the list. | |
| Public Member Functions inherited from umontreal.ssj.latnetbuilder.weights.Weights< T > | |
| Weights (List< SingletonWeight< T > > w) | |
| Constructs weights from a list of SingletonWeights. | |
| Weights () | |
| Initializes an empty list of weights. | |
| ArrayList< SingletonWeight< T > > | getWeights () |
| Returns the current weights as a list. | |
| void | setDefaultWeight (double dWeight) |
| Sets 'dWeight' as the current 'defaultWeight'. | |
| double | getDefaultWeight () |
| Returns the current 'defaultWeight'. | |
| void | add (SingletonWeight< T > singletonWeight) |
| Adds a new weight. | |
| String | toString () |
| Basic formatted string-output. | |
| abstract String | toLatNetBuilder () |
| Provides a String that can be interpreted by the command line interface of LatNetBuilder. | |
Additional Inherited Members | |
| Protected Attributes inherited from umontreal.ssj.latnetbuilder.weights.Weights< T > | |
| double | defaultWeight = 0.0 |
| Weight to be used for indices that were not explicitly set. | |
Implements comparable Weights.
| <T> | indicates the data type of the index of the weight (e.g Integer). Needs to be comparable. |
Definition at line 16 of file WeightsComparable.java.
| umontreal.ssj.latnetbuilder.weights.WeightsComparable< T extends Comparable< T > >.WeightsComparable | ( | List< SingletonWeightComparable< T > > | w | ) |
Constructs weights from a list of SingletonWeightsComparable.
| w | list of weights with index type 'T'. |
Definition at line 26 of file WeightsComparable.java.
| umontreal.ssj.latnetbuilder.weights.WeightsComparable< T extends Comparable< T > >.WeightsComparable | ( | ) |
Initializes an empty list of comparable weights.
Definition at line 33 of file WeightsComparable.java.
| void umontreal.ssj.latnetbuilder.weights.WeightsComparable< T extends Comparable< T > >.add | ( | SingletonWeightComparable< T > | singletonWeight | ) |
Adds a new comparable weight to the list.
In case the weight for the respective index had already been set, it is overwritten.
| singletonWeight | comparable weight to be added. |
Definition at line 54 of file WeightsComparable.java.
| void umontreal.ssj.latnetbuilder.weights.WeightsComparable< T extends Comparable< T > >.add | ( | T | index, |
| double | weight ) |
Adds a new weight with index 'index' and weight 'weight' or overwrites it, if the index already exists in the list.
| index | index of the weight to be added. |
| weight | value of the weight to be added. |
Reimplemented from umontreal.ssj.latnetbuilder.weights.Weights< T >.
Definition at line 83 of file WeightsComparable.java.
| ArrayList< SingletonWeightComparable< T > > umontreal.ssj.latnetbuilder.weights.WeightsComparable< T extends Comparable< T > >.getComparableWeights | ( | ) |
Returns the current comparable weights.
Definition at line 44 of file WeightsComparable.java.
| void umontreal.ssj.latnetbuilder.weights.WeightsComparable< T extends Comparable< T > >.sort | ( | ) |
Sorts the weights w.r.t.
the ordering defined on 'T', i.e., on the indices.
Definition at line 71 of file WeightsComparable.java.