it.unimi.dsi.fastutil.ints.Int2FloatRBTreeMap Java Examples

The following examples show how to use it.unimi.dsi.fastutil.ints.Int2FloatRBTreeMap. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: MovieService.java    From jstarcraft-example with Apache License 2.0 5 votes vote down vote up
@LockableMethod(strategy = HashLockableStrategy.class)
public void click(@LockableParameter int userIndex, int itemIndex, float score) {
    Int2IntSortedMap qualityFeatures = new Int2IntRBTreeMap();
    qualityFeatures.put(userDimension, userIndex);
    qualityFeatures.put(itemDimension, itemIndex);
    Int2FloatSortedMap quantityFeatures = new Int2FloatRBTreeMap();
    quantityFeatures.put(scoreDimension, score);
    dataModule.associateInstance(qualityFeatures, quantityFeatures, 5F);
}
 
Example #2
Source File: HashInstance.java    From jstarcraft-ai with Apache License 2.0 5 votes vote down vote up
public HashInstance(int qualityOrder, int quantityOrder) {
    this.qualityOrder = qualityOrder;
    this.quantityOrder = quantityOrder;
    this.qualityFeatures = new Int2IntRBTreeMap();
    this.qualityFeatures.defaultReturnValue(DataInstance.defaultInteger);
    this.quantityFeatures = new Int2FloatRBTreeMap();
    this.quantityFeatures.defaultReturnValue(DataInstance.defaultFloat);
    this.qualityMark = defaultInteger;
    this.quantityMark = defaultFloat;
    this.weight = DataInstance.defaultWeight;
}