SSJ API Documentation
Stochastic Simulation in Java
Loading...
Searching...
No Matches
umontreal.ssj.latnetbuilder.weights.SingletonWeightComparable< T extends Comparable< T > > Class Template Reference

Implements single instances of weights. More...

Inheritance diagram for umontreal.ssj.latnetbuilder.weights.SingletonWeightComparable< T extends Comparable< T > >:
umontreal.ssj.latnetbuilder.weights.SingletonWeight< T >

Public Member Functions

int compareTo (SingletonWeightComparable< T > w)
 Method to be able to compare the current weight to another based on the ordering defined on 'T'.
Public Member Functions inherited from umontreal.ssj.latnetbuilder.weights.SingletonWeight< T >
getIndex ()
 Returns the current 'index'.
void setIndex (T ind)
 Sets the index of the weight to 'ind'.
double getWeight ()
 Returns the current value of the weight.
void setWeight (double w)
 Sets the value of the weight to 'w'.

Package Functions

 SingletonWeightComparable (T ind, double w)
 Constructs a single comparable weight with given 'index' and 'weight'.
Package Functions inherited from umontreal.ssj.latnetbuilder.weights.SingletonWeight< T >
 SingletonWeight (T ind, double w)
 Constructs a weight with given 'index' and 'weight'.

Detailed Description

Implements single instances of weights.

The template parameter 'T' indicates the data type of the associated index, for instance, 'Integer' for the order of an OrderDependentWeight. In contrast to its superclass SingletonWeight, weights from this class can be compared via an ordering defined on 'T'.

Author
florian
Parameters
<T>indicates the data type of the index of the weight (e.g. Integer,...). This data type needs to be comparable.

Definition at line 16 of file SingletonWeightComparable.java.

Constructor & Destructor Documentation

◆ SingletonWeightComparable()

umontreal.ssj.latnetbuilder.weights.SingletonWeightComparable< T extends Comparable< T > >.SingletonWeightComparable ( T ind,
double w )
package

Constructs a single comparable weight with given 'index' and 'weight'.

Parameters
indthe desired index.
wthe desired value for the weight.

Definition at line 25 of file SingletonWeightComparable.java.

Member Function Documentation

◆ compareTo()

Method to be able to compare the current weight to another based on the ordering defined on 'T'.

This enables sorting the weights by their index.

Definition at line 33 of file SingletonWeightComparable.java.


The documentation for this class was generated from the following file: