Java SortedMap Usage putWeightToBin(SortedMap hist, double bin, double weight)

Here you can find the source of putWeightToBin(SortedMap hist, double bin, double weight)

Description

put Weight To Bin

License

Open Source License

Declaration

private static void putWeightToBin(SortedMap<Double, Double> hist,
            double bin, double weight) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

import java.util.SortedMap;

public class Main {
    private static void putWeightToBin(SortedMap<Double, Double> hist,
            double bin, double weight) {
        if (null != hist) {
            if (hist.containsKey(bin)) {
                hist.put(bin, hist.get(bin) + weight);
            } else {
                hist.put(bin, weight);//from   ww w  .  j  a  va2 s.  c  om
            }
        }
    }
}

Related

  1. getAll(SortedMap map)
  2. getObjectSortedMap(SortedMap map, T key)
  3. isCollectionClass(Class clazz)
  4. lastElement(List c)
  5. pruneStartAndEndKeys(SortedMap setOfStartKeyByteArray, List listOfStartKeyByteArray)
  6. removeSetFromBulkLm(Set toRemoveSet, List> byteSizeByNameList, String exceptRegex)
  7. sortedMapOf(final Object obj, final Class keyCastTo, final Class valueCastTo)
  8. submapWithPrefix(SortedMap map, String prefix)
  9. unwrapList(SortedMap sortedMap, K fromKey)