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

Class implementing order dependent weights. More...

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

Public Member Functions

 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 toString ()
 Creates a formatted output of the order dependent weights sorted w.r.t.
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.

Protected Attributes

String fileDir = ""
 Output directory when weights are printed to a file.
String fileName = ""
 Filename when weights are printed to a file.

Package Functions

String printBody ()
 Sorts the weights and creates a rudimentary string containing the order dependent weights separated by commas.

Detailed Description

Class implementing order dependent weights.

This means that the weights are indexed by integers representing the order of the coordinate projection for which they are defined. More precisely all projections onto coordinate sets of the same cardinality are assigned the same weight \(\gamma_{\mathfrak u} = \Gamma_{|\mathfrak u|}\). For instance, the projection onto the coordinates \((x_1,x_2,x_3)\) is assigned the same weight as every other projection of three variables, such as \((x_2,x_4,x_6)\). Mind that the order (i.e., the index of the SingletonWeightComparable) is at least 1 for non-empty projections. This should be considered when adding weights.

Weights of this type are supported by LatNet Builder and they can be put into the right format for this purpose by toLatNetBuilder. If needed, also the possibility to write these weights to a file is offered, which is also readable by LatNet Builder.

Author
florian

Definition at line 26 of file OrderDependentWeights.java.

Constructor & Destructor Documentation

◆ OrderDependentWeights() [1/2]

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.

Parameters
weightListlist of comparable weights indexed by integers.

Definition at line 43 of file OrderDependentWeights.java.

◆ OrderDependentWeights() [2/2]

umontreal.ssj.latnetbuilder.weights.OrderDependentWeights.OrderDependentWeights ( )

Default constructor.

Definition at line 50 of file OrderDependentWeights.java.

Member Function Documentation

◆ getFileDir()

String umontreal.ssj.latnetbuilder.weights.OrderDependentWeights.getFileDir ( )

Returns the directory to which an output-file can be generated.

Returns
path to an output directory.

Definition at line 68 of file OrderDependentWeights.java.

◆ getFileName()

String umontreal.ssj.latnetbuilder.weights.OrderDependentWeights.getFileName ( )

Returns the name of the file to which an output can be generated.

Returns
name for output file.

Definition at line 86 of file OrderDependentWeights.java.

◆ printBody()

String umontreal.ssj.latnetbuilder.weights.OrderDependentWeights.printBody ( )
package

Sorts the weights and creates a rudimentary string containing the order dependent weights separated by commas.

Missing weights (i.e. a weight for an order which has not been set and lies between two orders, for which the weights are specified) are filled with 'defaultWeight'.

Returns
a string containing the values of the weights separated by commas.

Definition at line 115 of file OrderDependentWeights.java.

◆ setFileDir()

void umontreal.ssj.latnetbuilder.weights.OrderDependentWeights.setFileDir ( String dir)

Sets the directory to which an output-file can be generated.

Parameters
dirpath to an output directory.

Definition at line 59 of file OrderDependentWeights.java.

◆ setFileName()

void umontreal.ssj.latnetbuilder.weights.OrderDependentWeights.setFileName ( String name)

Sets the name of the file to which an output can be generated.

Parameters
namename for output file.

Definition at line 77 of file OrderDependentWeights.java.

◆ toLatNetBuilder()

String umontreal.ssj.latnetbuilder.weights.OrderDependentWeights.toLatNetBuilder ( )

Creates a string formatted for passing it to LatticeBuilder.

Returns
a formatted string that can be processed by LatticeBuilder.

Definition at line 156 of file OrderDependentWeights.java.

◆ toString()

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

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

the order they are assigned to.

Returns
a formatted output of the order dependent weights.

Reimplemented in umontreal.ssj.latnetbuilder.weights.GeometricWeights.

Definition at line 142 of file OrderDependentWeights.java.

◆ write()

void umontreal.ssj.latnetbuilder.weights.OrderDependentWeights.write ( ) throws IOException

Writes a file with name fileName to the directory fileDir containing information on the weights.

This file is formatted to be further processed by LatNet Builder.

Exceptions
IOException

Definition at line 97 of file OrderDependentWeights.java.

Member Data Documentation

◆ fileDir

String umontreal.ssj.latnetbuilder.weights.OrderDependentWeights.fileDir = ""
protected

Output directory when weights are printed to a file.

Definition at line 31 of file OrderDependentWeights.java.

◆ fileName

String umontreal.ssj.latnetbuilder.weights.OrderDependentWeights.fileName = ""
protected

Filename when weights are printed to a file.

Definition at line 35 of file OrderDependentWeights.java.


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