SSJ API Documentation
Stochastic Simulation in Java
Loading...
Searching...
No Matches
umontreal.ssj.latnetbuilder.weights.Weights< T > Class Template Referenceabstract

This abstract class implements generic weights that can be used to search for good quasi-Monte Carlo point sets such as Rank1Lattice, DigitalNet, etc. More...

Inheritance diagram for umontreal.ssj.latnetbuilder.weights.Weights< T >:
umontreal.ssj.latnetbuilder.weights.PODWeights umontreal.ssj.latnetbuilder.weights.WeightsComparable< T extends Comparable< T > >

Public Member Functions

 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.
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.
String toString ()
 Basic formatted string-output.
abstract String toLatNetBuilder ()
 Provides a String that can be interpreted by the command line interface of LatNetBuilder.

Protected Attributes

double defaultWeight = 0.0
 Weight to be used for indices that were not explicitly set.

Detailed Description

This abstract class implements generic weights that can be used to search for good quasi-Monte Carlo point sets such as Rank1Lattice, DigitalNet, etc.

via search tools like LatNet Builder. The template parameter 'T' indicates the data type of the underlying index. Common choices are integers (e.g. the order for OrderDependentWeights, CoordinateSet for ProjectionDependentWeights, etc.). The abstract method toLatNetBuilder is used to communicate with the commandline tool of LatNet Builder.

Author
florian
Parameters
<T>indicates the data type of the index of the weight (e.g. CoordinateSet, Integer,...).

Definition at line 20 of file Weights.java.

Constructor & Destructor Documentation

◆ Weights() [1/2]

Constructs weights from a list of SingletonWeights.

Parameters
wlist of weights with index type 'T'.

Definition at line 33 of file Weights.java.

◆ Weights() [2/2]

Initializes an empty list of weights.

Definition at line 40 of file Weights.java.

Member Function Documentation

◆ add() [1/2]

void umontreal.ssj.latnetbuilder.weights.Weights< T >.add ( SingletonWeight< T > singletonWeight)

Adds a new weight.

In case the weight for the respective index had already been set, it is overwritten.

Parameters
singletonWeightweight to be added.

Definition at line 77 of file Weights.java.

◆ add() [2/2]

void umontreal.ssj.latnetbuilder.weights.Weights< 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.

Parameters
indexindex of the weight to be added.
weightvalue of the weight to be added.

Reimplemented in umontreal.ssj.latnetbuilder.weights.WeightsComparable< T extends Comparable< T > >.

Definition at line 96 of file Weights.java.

◆ getDefaultWeight()

double umontreal.ssj.latnetbuilder.weights.Weights< T >.getDefaultWeight ( )

Returns the current 'defaultWeight'.

Returns
the value of the default weight.

Definition at line 67 of file Weights.java.

◆ getWeights()

ArrayList< SingletonWeight< T > > umontreal.ssj.latnetbuilder.weights.Weights< T >.getWeights ( )

Returns the current weights as a list.

Returns
the list of weights.

Definition at line 49 of file Weights.java.

◆ setDefaultWeight()

void umontreal.ssj.latnetbuilder.weights.Weights< T >.setDefaultWeight ( double dWeight)

Sets 'dWeight' as the current 'defaultWeight'.

Parameters
dWeightdesired default weight.

Definition at line 58 of file Weights.java.

◆ toLatNetBuilder()

abstract String umontreal.ssj.latnetbuilder.weights.Weights< T >.toLatNetBuilder ( )
abstract

Provides a String that can be interpreted by the command line interface of LatNetBuilder.

Returns
String for LatNetBuilder.

Reimplemented in umontreal.ssj.latnetbuilder.weights.PODWeights.

◆ toString()

Basic formatted string-output.

Reimplemented in umontreal.ssj.latnetbuilder.weights.PODWeights.

Definition at line 103 of file Weights.java.

Member Data Documentation

◆ defaultWeight

double umontreal.ssj.latnetbuilder.weights.Weights< T >.defaultWeight = 0.0
protected

Weight to be used for indices that were not explicitly set.

Its default value is zero.

Definition at line 25 of file Weights.java.


The documentation for this class was generated from the following file:
  • src/main/java/umontreal/ssj/latnetbuilder/weights/Weights.java