def _updateInhibitionRadius(self):
if self._globalInhibition:<EOL><INDENT>self._inhibitionRadius = int(self._columnDimensions.max())<EOL>return<EOL><DEDENT>avgConnectedSpan = numpy.average(<EOL>[self._avgConnectedSpanForColumnND(i)<EOL>for i in range(self._numColumns)]<EOL>)<EOL>columnsPerInput = self._avgColumnsPerInput()<EOL>diameter = avgConnectedSpan * columnsPerInput<EOL>radius = (diameter - <NUM_LIT:1>) / <NUM_LIT><EOL>radius = max(<NUM_LIT:1.0>, radius)<EOL>self._inhibitionRadius = int(radius + <NUM_LIT:0.5>)<EOL>
Update the inhibition radius. The inhibition radius is a measure of the
square (or hypersquare) of columns that each a column is "connected to"
on average. Since columns are are not connected to each other directly, we
determine this quantity by first figuring out how many *inputs* a column is
connected to, and then multiplying it by the total number of columns that
exist for each input. For multiple dimension the aforementioned
calculations are averaged over all dimensions of inputs and columns. This
value is meaningless if global inhibition is enabled.