SSJ API Documentation
Stochastic Simulation in Java
Loading...
Searching...
No Matches
umontreal.ssj.latnetbuilder.weights.GeometricWeights Class Reference

Class implementing a special case of OrderDependentWeights, \(\Gamma_{k} = c \rho^{k-1} \) , where each weight is given by a baseWeight \(\rho\) raised to \(k-1\), i.e., the power of the order of the projection it is assigned to - 1. More...

Inheritance diagram for umontreal.ssj.latnetbuilder.weights.GeometricWeights:
umontreal.ssj.latnetbuilder.weights.OrderDependentWeights umontreal.ssj.latnetbuilder.weights.WeightsComparable< Integer >

Public Member Functions

 GeometricWeights (double base, int truncation, double c)
 Constructs geometric weights with given baseWeight 'base' and truncationLevel 'truncation'.
 GeometricWeights (double base, int truncation)
 Constructor that sets \(c=1\).
 GeometricWeights ()
 Default constructor.
double getC ()
 Getter for the constant factor \(c\).
void setC (double c)
 Sets the constant factor \(c\).
double getBaseWeight ()
 Returns the baseWeight.
void setBaseWeight (double base)
 Sets the baseWeight \(\rho\).
int getTruncationLevel ()
 Returns the current truncationLevel.
void setTruncationLevel (int trLevel)
 Sets the truncationLevel.
void setWeights ()
 Computes the weights up to the order truncationLevel and assigns them.
String toString ()
 Creates a formatted output of the geometric order dependent weights ordered w.r.t.
Public Member Functions inherited from umontreal.ssj.latnetbuilder.weights.OrderDependentWeights
 OrderDependentWeights (ArrayList< SingletonWeightComparable< Integer > > weightList)
 Constructs an instance of order dependent weights from a given list of comparable weights indexed by integers.
 OrderDependentWeights ()
 Default constructor.
void setFileDir (String dir)
 Sets the directory to which an output-file can be generated.
String getFileDir ()
 Returns the directory to which an output-file can be generated.
void setFileName (String name)
 Sets the name of the file to which an output can be generated.
String getFileName ()
 Returns the name of the file to which an output can be generated.
void write () throws IOException
 Writes a file with name fileName to the directory fileDir containing information on the weights.
String toLatNetBuilder ()
 Creates a string formatted for passing it to LatticeBuilder.
Public Member Functions inherited from umontreal.ssj.latnetbuilder.weights.WeightsComparable< Integer >
 WeightsComparable (List< SingletonWeightComparable< T > > w)
 Constructs weights from a list of SingletonWeightsComparable.
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.

Additional Inherited Members

Protected Attributes inherited from umontreal.ssj.latnetbuilder.weights.OrderDependentWeights
String fileDir = ""
 Output directory when weights are printed to a file.
String fileName = ""
 Filename when weights are printed to a file.
Package Functions inherited from umontreal.ssj.latnetbuilder.weights.OrderDependentWeights
String printBody ()
 Sorts the weights and creates a rudimentary string containing the order dependent weights separated by commas.

Detailed Description

Class implementing a special case of OrderDependentWeights, \(\Gamma_{k} = c \rho^{k-1} \) , where each weight is given by a baseWeight \(\rho\) raised to \(k-1\), i.e., the power of the order of the projection it is assigned to - 1.

By default, \(\rho=1\). It is also possible to set a truncationLevel, so that for all orders \(k\) larger than this number each weight equals the #defaultWeight.

Author
florian

Definition at line 18 of file GeometricWeights.java.

Constructor & Destructor Documentation

◆ GeometricWeights() [1/3]

umontreal.ssj.latnetbuilder.weights.GeometricWeights.GeometricWeights ( double base,
int truncation,
double c )

Constructs geometric weights with given baseWeight 'base' and truncationLevel 'truncation'.

Parameters
basedesired value for \(\rho\).
truncationorder up to which geometric weights are set. Higher-order projections will be assigned the #defaultWeight.

Definition at line 33 of file GeometricWeights.java.

◆ GeometricWeights() [2/3]

umontreal.ssj.latnetbuilder.weights.GeometricWeights.GeometricWeights ( double base,
int truncation )

Constructor that sets \(c=1\).

Parameters
basedesired value for \(\rho\).
truncationrder up to which geometric weights are set. Higher-order projections will be assigned the #defaultWeight.

Definition at line 49 of file GeometricWeights.java.

◆ GeometricWeights() [3/3]

umontreal.ssj.latnetbuilder.weights.GeometricWeights.GeometricWeights ( )

Default constructor.

Definition at line 56 of file GeometricWeights.java.

Member Function Documentation

◆ getBaseWeight()

double umontreal.ssj.latnetbuilder.weights.GeometricWeights.getBaseWeight ( )

Returns the baseWeight.

Returns
the base value \(\rho\).

Definition at line 84 of file GeometricWeights.java.

◆ getC()

double umontreal.ssj.latnetbuilder.weights.GeometricWeights.getC ( )

Getter for the constant factor \(c\).

Returns
the constant factor \(c\)

Definition at line 66 of file GeometricWeights.java.

◆ getTruncationLevel()

int umontreal.ssj.latnetbuilder.weights.GeometricWeights.getTruncationLevel ( )

Returns the current truncationLevel.

Higher-order projections will be assigned the #defaultWeight.

Returns
truncation order up to which the weights are computed.

Definition at line 103 of file GeometricWeights.java.

◆ setBaseWeight()

void umontreal.ssj.latnetbuilder.weights.GeometricWeights.setBaseWeight ( double base)

Sets the baseWeight \(\rho\).

Parameters
basedesired value for \(\rho\).

Definition at line 93 of file GeometricWeights.java.

◆ setC()

void umontreal.ssj.latnetbuilder.weights.GeometricWeights.setC ( double c)

Sets the constant factor \(c\).

Parameters
cthe constant factor \(c\)

Definition at line 75 of file GeometricWeights.java.

◆ setTruncationLevel()

void umontreal.ssj.latnetbuilder.weights.GeometricWeights.setTruncationLevel ( int trLevel)

Sets the truncationLevel.

Higher-order projections will be assigned the #defaultWeight.

Parameters
trLeveldesired order up to which the weights are computed.

Definition at line 113 of file GeometricWeights.java.

◆ setWeights()

void umontreal.ssj.latnetbuilder.weights.GeometricWeights.setWeights ( )

Computes the weights up to the order truncationLevel and assigns them.

Definition at line 120 of file GeometricWeights.java.

◆ toString()

String umontreal.ssj.latnetbuilder.weights.GeometricWeights.toString ( )

Creates a formatted output of the geometric order dependent weights ordered w.r.t.

to their order \(k\).

Returns
a formatted output of the geometric weights.

Reimplemented from umontreal.ssj.latnetbuilder.weights.OrderDependentWeights.

Definition at line 136 of file GeometricWeights.java.


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