List of usage examples for com.google.common.collect HashBasedTable create
public static <R, C, V> HashBasedTable<R, C, V> create(Table<? extends R, ? extends C, ? extends V> table)
From source file:i5.las2peer.services.recommender.librec.data.SymmMatrix.java
/** * Construct a symmetric matrix by deeply copying data from a given matrix */ public SymmMatrix(SymmMatrix mat) { dim = mat.dim; data = HashBasedTable.create(mat.data); }
From source file:uk.ac.york.mondo.integration.api.EffectiveMetamodelRuleset.java
/** Copy constructor. */ public EffectiveMetamodelRuleset(EffectiveMetamodelRuleset toCopy) { this.inclusions = HashBasedTable.create(toCopy.inclusions); this.exclusions = HashBasedTable.create(toCopy.exclusions); }
From source file:com.fredhopper.core.connector.index.generate.data.FhAttributeData.java
public final void setValues(final Table<Optional<String>, Optional<Locale>, String> values) { this.values = HashBasedTable.create(values); }
From source file:com.dmdirc.addons.ui_swing.components.TableTableModel.java
/** * Creates a new table model.//from w w w. j a v a 2 s .c om * * @param headers The headers to use for the table. * @param table The table backing this table. * @param editableFunction The function to decide if a cell will be editable */ public TableTableModel(final Iterable<String> headers, final Table<Integer, Integer, String> table, final BiFunction<Integer, Integer, Boolean> editableFunction) { this.headers = Lists.newArrayList(headers); this.table = HashBasedTable.create(table); this.editableFunction = editableFunction; }
From source file:es.upm.dit.xsdinferencer.datastructures.ExtendedAutomaton.java
/** * Copy constructor.//from w ww .j a v a 2 s . c o m * @param otherExtendedAutomaton ExtendedAutomaton to copy */ public ExtendedAutomaton(ExtendedAutomaton otherExtendedAutomaton) { super(otherExtendedAutomaton); sourceWordSymbolOccurrences = HashBasedTable.create(otherExtendedAutomaton.sourceWordSymbolOccurrences); }
From source file:net.exclaimindustries.paste.braket.server.backends.ExpectoValues.java
@Override public Object clone() { ExpectoValues v = new ExpectoValues(); v.iterations = 0;//w ww .ja v a2 s. c o m v.lastUpdate = new Date(lastUpdate.getTime()); v.tournament = tournament; v.valueTable = HashBasedTable.create(valueTable); v.sumTotalProbability = 0; return v; }
From source file:rapture.sheet.memory.InMemorySheet.java
@SuppressWarnings("unchecked") public InMemorySheet(InMemorySheet source) { this.dimToData = new HashMap<Integer, Table<Integer, Integer, RaptureSheetCell>>(); for (Integer dim : source.dimToData.keySet()) { Table<Integer, Integer, RaptureSheetCell> table = source.dimToData.get(dim); dimToData.put(dim, HashBasedTable.create(table)); }/* w ww .j a v a 2 s . c o m*/ this.scriptMap = ((Map<String, RaptureSheetScript>) ((Object) JacksonUtil .getMapFromJson(JacksonUtil.jsonFromObject(source.scriptMap)))); this.noteMap = (Map<String, RaptureSheetNote>) (Object) JacksonUtil .getMapFromJson(JacksonUtil.jsonFromObject(source.noteMap)); this.rangeMap = (Map<String, RaptureSheetRange>) (Object) JacksonUtil .getMapFromJson(JacksonUtil.jsonFromObject(source.rangeMap)); this.styleMap = (Map<String, RaptureSheetStyle>) (Object) JacksonUtil .getMapFromJson(JacksonUtil.jsonFromObject(source.styleMap)); }
From source file:Model.Environment.Intersection.java
/** * Copy Constructor//from w w w . j av a 2 s . co m * * @param other an another intersection */ public Intersection(Intersection other) { super(other); this.nb_ways = HashBasedTable.create(other.nb_ways); this.ways_size = HashBasedTable.create(other.ways_size); this.conflict_zone_size = new HashMap<>(other.conflict_zone_size); this.indonesian_cross = other.indonesian_cross; //Initialize conflict zone, trajectories and sizes update(); }
From source file:org.eclipse.incquery.runtime.evm.api.ActivationLifeCycle.java
/** * Creates a complete copy of the life-cycle * /*from www.j a v a 2s . com*/ * @param lifeCycle the life-cyce to be copied * @return the copy of the life-cycle */ public static ActivationLifeCycle copyOf(final ActivationLifeCycle lifeCycle) { checkNotNull(lifeCycle, "Null life cycle cannot be copied!"); ActivationLifeCycle lc = new ActivationLifeCycle(lifeCycle.inactiveState); lc.stateTransitionTable = HashBasedTable.create(lifeCycle.stateTransitionTable); return lc; }
From source file:es.upm.dit.xsdinferencer.statistics.ComplexTypeStatisticsEntry.java
/** * Copy constructor.//w ww . j a va 2 s. co m * Data structure objects are duplicated (not the original ones) but they point to the * original contents (BasicStatisticEntry objects etc.) * @param complexTypeStatisticsEntryScenario2CB the entry to copy */ public ComplexTypeStatisticsEntry(ComplexTypeStatisticsEntry complexTypeStatisticsEntryScenario2CB) { this.inputDocumentsCount = complexTypeStatisticsEntryScenario2CB.inputDocumentsCount; this.elementInfo = new HashMap<SchemaElement, BasicStatisticsEntry>( complexTypeStatisticsEntryScenario2CB.elementInfo); this.subpatternsInfo = new HashMap<List<SchemaElement>, Integer>( complexTypeStatisticsEntryScenario2CB.subpatternsInfo); this.attributeOccurrencesInfo = new HashMap<SchemaAttribute, BasicStatisticsEntry>( complexTypeStatisticsEntryScenario2CB.attributeOccurrencesInfo); this.valuesInfo = HashBasedTable.create(complexTypeStatisticsEntryScenario2CB.valuesInfo); this.lastAllValuesTablesHash = complexTypeStatisticsEntryScenario2CB.lastAllValuesTablesHash; }