Commit in lcsim/src/org/lcsim/event/base on MAIN | |||
BaseRelationalTable.java | +11 | 1.3 -> 1.4 |
diff -u -r1.3 -r1.4 --- BaseRelationalTable.java 10 Sep 2007 23:45:49 -0000 1.3 +++ BaseRelationalTable.java 16 Apr 2013 23:35:45 -0000 1.4 @@ -1,5 +1,6 @@
package org.lcsim.event.base;
+import java.util.Collection;
import java.util.Collections; import java.util.Comparator; import java.util.HashMap;
@@ -8,6 +9,8 @@
import java.util.Map; import java.util.Set; import java.util.TreeSet;
+ +import org.lcsim.event.LCRelation;
import org.lcsim.event.RelationalTable; /**
@@ -47,6 +50,7 @@
{ this(Mode.MANY_TO_MANY,Weighting.WEIGHTED); }
+
public BaseRelationalTable(Mode mode, Weighting weighting) { this.mode = mode;
@@ -348,4 +352,11 @@
else return (int) Math.signum(w2 - w1); } }
+ + public void addRelations(Collection<LCRelation> relations) + { + for (LCRelation r : relations) { + this.add((F)r.getFrom(), (T)r.getTo(), r.getWeight()); + } + }
}
\ No newline at end of file
Use REPLY-ALL to reply to list
To unsubscribe from the LCD-CVS list, click the following link:
https://listserv.slac.stanford.edu/cgi-bin/wa?SUBED1=LCD-CVS&A=1