1package umontreal.ssj.latnetbuilder.weights;
3import java.util.ArrayList;
47 StringBuffer sb =
new StringBuffer(
"");
48 if (weights.size() > 0) {
51 while (index < w.getIndex()) {
52 sb.append(getDefaultWeight() +
",");
55 sb.append(w.getWeight() +
",");
58 sb.deleteCharAt(sb.length() - 1);
73 StringBuffer sb =
new StringBuffer(
"");
74 sb.append(
"Product weights [default = " + getDefaultWeight() +
"]:\n");
75 if (weights.size() > 0)
78 return sb.toString() + (weights.size() > 0 ?
"]" :
"");
87 StringBuffer sb =
new StringBuffer(
"");
88 sb.append(
"product:" + getDefaultWeight());
89 if (weights.size() > 0) {
String toLatNetBuilder()
Creates a string formatted for passing it to LatNet Builder.
String toString()
Creates a formatted output of the product weights ordered w.r.t.
ProductWeights(ArrayList< SingletonWeightComparable< Integer > > weightList)
Constructor for product weights from a list of SingletonWeightComparable indexed by integers indicati...
String printBody()
Sorts the weights and creates a rudimentary string containing the product weights separated by commas...
ProductWeights()
Default constructor.
Implements single instances of weights.
WeightsComparable(List< SingletonWeightComparable< T > > w)