Class Accumulator

java.lang.Object
  extended byAccumulator

public class Accumulator
extends java.lang.Object

Accumulator Class

This class represents a two-dimensional array of double


Constructor Summary
Accumulator(int N)
          Creates a N wide accumulator
 
Method Summary
 double get(int x, int y)
          Returns the value of the square at (x,y)
 void init()
          Sets every squares to zero
 boolean update(BooleanMatrix boolMat, double gradient)
          Increments each square of the accumulator that correspond with a "true" value square of the boolean matrix
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Accumulator

public Accumulator(int N)
Creates a N wide accumulator

Method Detail

init

public void init()
Sets every squares to zero


update

public boolean update(BooleanMatrix boolMat,
                      double gradient)
Increments each square of the accumulator that correspond with a "true" value square of the boolean matrix

Parameters:
boolMat - a boolean array with the same dimension than the accumulator (strongly recommanded)
gradient - the incrementation value

get

public double get(int x,
                  int y)
Returns the value of the square at (x,y)