MCPcopy Create free account
hub / github.com/WinVector/Logistic / observe

Method observe

src/com/winvector/util/CountMapV.java:30–37  ·  view source on GitHub ↗

Invariant: key set calls all keys ever observed (even those with net-zero count) @param key @param delta

(final T key, final int index, final double delta)

Source from the content-addressed store, hash-verified

28 * @param delta
29 */
30 public void observe(final T key, final int index, final double delta) {
31 double[] v = counts.get(key);
32 if(v==null) {
33 v = new double[dim];
34 counts.put(key,v);
35 }
36 v[index] += delta;
37 }
38
39 public boolean contains(final T key) {
40 return counts.containsKey(key);

Callers

nothing calls this directly

Calls 1

getMethod · 0.45

Tested by

no test coverage detected