public MaxEntL2FLPRConstraints(int numFeatures, int numLabels, boolean useValues, boolean normalize) { super(numFeatures, numLabels, useValues); this.constraintIndices = new TIntIntHashMap(); this.normalize = normalize; }
public MaxEntL2FLPRConstraints(int numFeatures, int numLabels, boolean useValues, boolean normalize) { super(numFeatures, numLabels, useValues); this.constraintIndices = new TIntIntHashMap(); this.normalize = normalize; }
private void initializeTypeTopicCounts () { TIntIntHashMap[] newTypeTopicCounts = new TIntIntHashMap[numTypes]; for (int i = 0; i < typeTopicCounts.length; i++) newTypeTopicCounts[i] = typeTopicCounts[i]; for (int i = typeTopicCounts.length; i < numTypes; i++) newTypeTopicCounts[i] = new TIntIntHashMap(); this.typeTopicCounts = newTypeTopicCounts; }
private void initializeTypeTopicCounts () { TIntIntHashMap[] newTypeTopicCounts = new TIntIntHashMap[numTypes]; for (int i = 0; i < typeTopicCounts.length; i++) newTypeTopicCounts[i] = typeTopicCounts[i]; for (int i = typeTopicCounts.length; i < numTypes; i++) newTypeTopicCounts[i] = new TIntIntHashMap(); this.typeTopicCounts = newTypeTopicCounts; }
private void initializeTypeTopicCounts () { TIntIntHashMap[] newTypeTopicCounts = new TIntIntHashMap[numTypes]; for (int i = 0; i < typeTopicCounts.length; i++) newTypeTopicCounts[i] = typeTopicCounts[i]; for (int i = typeTopicCounts.length; i < numTypes; i++) newTypeTopicCounts[i] = new TIntIntHashMap(); this.typeTopicCounts = newTypeTopicCounts; }
public MaxEntL2FLPRConstraints(int numFeatures, int numLabels, boolean useValues, boolean normalize) { super(numFeatures, numLabels, useValues); this.constraintIndices = new TIntIntHashMap(); this.normalize = normalize; }
public TwoLabelGEConstraints() { this.constraintsList = new ArrayList<TwoLabelGEConstraint>(); this.constraintsMap = new TIntIntHashMap(); this.map = null; this.cache = new TIntArrayList(); }
public void ours() { TIntIntHashMap ours = new TIntIntHashMap(SET_SIZE); for (int i = dataset.size(); i-- > 0;) { ours.put(i,i); } }
public TwoLabelGEConstraints() { this.constraintsList = new ArrayList<TwoLabelGEConstraint>(); this.constraintsMap = new TIntIntHashMap(); this.map = null; this.cache = new TIntArrayList(); }
public TwoLabelGEConstraints() { this.constraintsList = new ArrayList<TwoLabelGEConstraint>(); this.constraintsMap = new TIntIntHashMap(); this.map = null; this.cache = new TIntArrayList(); }
public SimpleColoredComponent() { myFragments = new ArrayList<>(3); myLayouts = new ArrayList<>(3); myAttributes = new ArrayList<>(3); myIpad = new JBInsets(1, 2, 1, 2); myIconTextGap = JBUI.scale(2); myBorder = new MyBorder(); myFragmentPadding = new TIntIntHashMap(10); myFragmentAlignment = new TIntIntHashMap(10); setOpaque(true); updateUI(); }
public OneLabelL2PRConstraints(boolean normalized) { this.constraints = new TIntObjectHashMap<OneLabelPRConstraint>(); this.constraintIndices = new TIntIntHashMap(); this.cache = new TIntArrayList(); this.normalized = normalized; }
private void setIndex2Location () { //System.out.println ("HashedSparseVector setIndex2Location indices.length="+indices.length+" maxindex="+indices[indices.length-1]); assert (index2location == null); assert (indices.length > 0); this.maxIndex = indices[indices.length - 1]; this.index2location = new TIntIntHashMap (numLocations ()); //index2location.setDefaultValue (-1); for (int i = 0; i < indices.length; i++) index2location.put (indices[i], i); }
public FeatureCooccurrenceCounter (InstanceList instances) { this.instances = instances; numFeatures = instances.getDataAlphabet().size(); featureFeatureCounts = new TIntIntHashMap[numFeatures]; for (int feature = 0; feature < numFeatures; feature++) { featureFeatureCounts[feature] = new TIntIntHashMap(); } documentFrequencies = new int[numFeatures]; }
public OneLabelL2PRConstraints(boolean normalized) { this.constraints = new TIntObjectHashMap<OneLabelPRConstraint>(); this.constraintIndices = new TIntIntHashMap(); this.cache = new TIntArrayList(); this.normalized = normalized; }
public OneLabelL2PRConstraints(boolean normalized) { this.constraints = new TIntObjectHashMap<OneLabelPRConstraint>(); this.constraintIndices = new TIntIntHashMap(); this.cache = new TIntArrayList(); this.normalized = normalized; }
public FeatureCooccurrenceCounter (InstanceList instances) { this.instances = instances; numFeatures = instances.getDataAlphabet().size(); featureFeatureCounts = new TIntIntHashMap[numFeatures]; for (int feature = 0; feature < numFeatures; feature++) { featureFeatureCounts[feature] = new TIntIntHashMap(); } documentFrequencies = new int[numFeatures]; }
public FeatureCooccurrenceCounter (InstanceList instances) { this.instances = instances; numFeatures = instances.getDataAlphabet().size(); featureFeatureCounts = new TIntIntHashMap[numFeatures]; for (int feature = 0; feature < numFeatures; feature++) { featureFeatureCounts[feature] = new TIntIntHashMap(); } documentFrequencies = new int[numFeatures]; }
private void setIndex2Location () { //System.out.println ("HashedSparseVector setIndex2Location indices.length="+indices.length+" maxindex="+indices[indices.length-1]); assert (index2location == null); assert (indices.length > 0); this.maxIndex = indices[indices.length - 1]; this.index2location = new TIntIntHashMap (numLocations ()); //index2location.setDefaultValue (-1); for (int i = 0; i < indices.length; i++) index2location.put (indices[i], i); }
private void setIndex2Location () { //System.out.println ("HashedSparseVector setIndex2Location indices.length="+indices.length+" maxindex="+indices[indices.length-1]); assert (index2location == null); assert (indices.length > 0); this.maxIndex = indices[indices.length - 1]; this.index2location = new TIntIntHashMap (numLocations ()); index2location.setDefaultValue (-1); for (int i = 0; i < indices.length; i++) index2location.put (indices[i], i); }