예제 #1
0
 /**
  * Clones all fields of this into
  *
  * <pre>other</pre>
  */
 protected void deepCloneInto(at.dms.kjc.sir.SIRJoiner other) {
   super.deepCloneInto(other);
   other.type = (at.dms.kjc.sir.SIRJoinType) at.dms.kjc.AutoCloner.cloneToplevel(this.type);
   other.weights = (at.dms.kjc.JExpression[]) at.dms.kjc.AutoCloner.cloneToplevel(this.weights);
   other.uniform = this.uniform;
   other.oldSumWeights = this.oldSumWeights;
 }
예제 #2
0
 /**
  * Tests whether or not this has the same type and the same weights as obj. This can return true
  * for splitters with different numbers of outputs if the type is not a weighted round robin.
  */
 public boolean equals(SIRJoiner obj) {
   if (type != SIRJoinType.WEIGHTED_RR || obj.type != SIRJoinType.WEIGHTED_RR) {
     return type == obj.type;
   } else {
     return Utils.equalArrays(getWeights(), obj.getWeights());
   }
 }