def updateHistory(self, activeCells, forceOutput=False):
    """
    Computes one cycle of the Union Pooler algorithm. Return the union SDR
    Parameters:
    ----------------------------
    @param activeCells: A list that stores indices of active cells

    @param forceOutput: if True, a union will be created without regard to
                        minHistory
    """
    self._activeCellsHistory.append(activeCells)
    if len(self._activeCellsHistory) > self._historyLength:
      self._activeCellsHistory.pop(0)

    self._unionSDR = numpy.zeros(shape=(self._numInputs,))
    if (len(self._activeCellsHistory) >= self._minHistory) or forceOutput:
      for i in self._activeCellsHistory:
        self._unionSDR[i] = 1

    return self._unionSDR