package it.univr.di.labeledvalue; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertTrue; import java.time.Duration; import java.time.Instant; import java.util.AbstractMap.SimpleEntry; import java.util.Map.Entry; import org.apache.commons.math3.stat.descriptive.SummaryStatistics; import org.junit.Assert; import org.junit.Before; import org.junit.Test; import it.unimi.dsi.fastutil.objects.AbstractObject2IntMap; import it.unimi.dsi.fastutil.objects.Object2IntMap; import it.unimi.dsi.fastutil.objects.ObjectArraySet; import it.unimi.dsi.fastutil.objects.ObjectSet; import it.univr.di.labeledvalue.ALabelAlphabet.ALetter; /** * @author posenato */ public class LabeledALabelIntTreeMapTest { /** * */ LabeledALabelIntTreeMap map, result; /** * */ ALabelAlphabet alpha; /** * @throws Exception */ @Before public void setUp() throws Exception { this.map = new LabeledALabelIntTreeMap(); this.result = new LabeledALabelIntTreeMap(); this.alpha = new ALabelAlphabet(); } /** * */ @Test public final void generazioneSet() { this.map.clear(); this.map.mergeTriple("¬a¬b", new ALabel("N9", this.alpha), 13); this.map.mergeTriple("¬a", new ALabel("N9", this.alpha), 13); this.map.mergeTriple(Label.emptyLabel, new ALabel("N9", this.alpha), 12); this.map.mergeTriple(Label.parse("¬a"), new ALabel("N9", this.alpha), 14); this.map.mergeTriple(Label.parse("¬a¬b"), new ALabel("N9", this.alpha), 11); this.map.mergeTriple(Label.parse("¬a¬b"), new ALabel("N8", this.alpha), 11); this.map.mergeTriple(Label.parse("¬ab"), new ALabel("N7", this.alpha), 11); this.map.mergeTriple(Label.parse("¬ba"), new ALabel("N9", this.alpha), 15); this.map.mergeTriple(Label.parse("ab"), new ALabel("N6", this.alpha), 1); final ObjectSet>> set = new ObjectArraySet<>(); for (ALabel aleph : this.map.keySet()) { for (it.unimi.dsi.fastutil.objects.Object2IntMap.Entry