1package umontreal.ssj.latnetbuilder.weights;
3import java.io.IOException;
4import java.util.ArrayList;
20 protected double baseWeight = 1.0;
21 protected int truncationLevel;
36 truncationLevel = truncation;
50 this(base, truncation, 1.0);
75 public void setC(
double c) {
104 return truncationLevel;
114 truncationLevel = trLevel;
122 weights =
new ArrayList<SingletonWeightComparable<Integer>>(truncationLevel);
123 for (
int order = 1; order <= truncationLevel; order++) {
137 StringBuffer sb =
new StringBuffer(
"");
139 "Geometric order dependent weights [default = " + getDefaultWeight() +
", base = " + baseWeight +
"]:\n");
140 if (weights.size() > 0)
143 return sb.toString() + (weights.size() > 0 ?
"]" :
"");
GeometricWeights(double base, int truncation, double c)
Constructs geometric weights with given baseWeight 'base' and truncationLevel 'truncation'.
void setC(double c)
Sets the constant factor .
void setTruncationLevel(int trLevel)
Sets the truncationLevel.
GeometricWeights(double base, int truncation)
Constructor that sets .
String toString()
Creates a formatted output of the geometric order dependent weights ordered w.r.t.
double getC()
Getter for the constant factor .
void setWeights()
Computes the weights up to the order truncationLevel and assigns them.
double getBaseWeight()
Returns the baseWeight.
GeometricWeights()
Default constructor.
int getTruncationLevel()
Returns the current truncationLevel.
void setBaseWeight(double base)
Sets the baseWeight .
String printBody()
Sorts the weights and creates a rudimentary string containing the order dependent weights separated b...
OrderDependentWeights(ArrayList< SingletonWeightComparable< Integer > > weightList)
Constructs an instance of order dependent weights from a given list of comparable weights indexed by ...
Implements single instances of weights.