def compute(self, inputVector, learn, activeArray, applyLateralInhibition=True):
    """
    This is the primary public method of the LateralPooler class. This
    function takes a input vector and outputs the indices of the active columns.
    If 'learn' is set to True, this method also updates the permanences of the
    columns and their lateral inhibitory connection weights.
    """
    if not isinstance(inputVector, np.ndarray):
      raise TypeError("Input vector must be a numpy array, not %s" %
                      str(type(inputVector)))

    if inputVector.size != self._numInputs:
      raise ValueError(
          "Input vector dimensions don't match. Expecting %s but got %s" % (
              inputVector.size, self._numInputs))

    self._updateBookeepingVars(learn)
    inputVector = np.array(inputVector, dtype=realDType)
    inputVector.reshape(-1)
    self._overlaps = self._calculateOverlap(inputVector)

    # Apply boosting when learning is on
    if learn:
      self._boostedOverlaps = self._boostFactors * self._overlaps
    else:
      self._boostedOverlaps = self._overlaps

    # Apply inhibition to determine the winning columns
    if applyLateralInhibition == True:
      activeColumns = self._inhibitColumnsWithLateral(self._boostedOverlaps, self.lateralConnections)
    else:
      activeColumns = self._inhibitColumns(self._boostedOverlaps)
    activeArray.fill(0)
    activeArray[activeColumns] = 1.0

    if learn:
      self._adaptSynapses(inputVector, activeColumns, self._boostedOverlaps)
      self._updateDutyCycles(self._overlaps, activeColumns)
      self._bumpUpWeakColumns()
      self._updateBoostFactors()
      self._updateAvgActivityPairs(activeArray)

      epsilon = self.lateralLearningRate
      if epsilon > 0:
        self._updateLateralConnections(epsilon, self.avgActivityPairs)

      if self._isUpdateRound():
        self._updateInhibitionRadius()
        self._updateMinDutyCycles()

    return activeArray
This is the primary public method of the LateralPooler class. This
    function takes a input vector and outputs the indices of the active columns.
    If 'learn' is set to True, this method also updates the permanences of the
    columns and their lateral inhibitory connection weights.