Increase count of entity using a geometry.
343993
function incrementCacheCount (cacheCount, hash) {
  cacheCount[hash] = cacheCount[hash] === undefined ? 1 : cacheCount[hash] + 1;
}
740935
def update(self, pointvol):
        """"""

        # Initialize a K-D Tree to assist nearest neighbor searches.
        if self.use_kdtree:
            kdtree = spatial.KDTree(self.live_u)
        else:
            kdtree = None

        # Check if we should use the provided pool for updating.
        if self.use_pool_update:
            pool = self.pool
        else:
            pool = None

        # Update the N-spheres.
        self.radfriends.update(self.live_u, pointvol=pointvol,
                               rstate=self.rstate, bootstrap=self.bootstrap,
                               pool=pool, kdtree=kdtree)
        if self.enlarge != 1.:
            self.radfriends.scale_to_vol(self.radfriends.vol_ball *
                                         self.enlarge)

        return copy.deepcopy(self.radfriends)
965948
function addPointToEntity(
  entity,
  tableColumnStyle,
  scale,
  pixelSize,
  color,
  show
) {
  //no image so use point
  if (
    !defined(tableColumnStyle) ||
    !defined(tableColumnStyle.imageUrl) ||
    tableColumnStyle.imageUrl === ""
  ) {
    entity.point = {
      outlineColor: new Color(0, 0, 0, 1),
      outlineWidth: 1,
      pixelSize: pixelSize,
      color: color,
      show: show
    };
  } else {
    entity.billboard = {
      horizontalOrigin: HorizontalOrigin.CENTER,
      verticalOrigin: VerticalOrigin.BOTTOM,
      image: tableColumnStyle.imageUrl,
      scale: scale,
      color: color,
      show: show
    };
  }
}
493067
public void put(Entity entity) {
    int bytesHere = EntityTranslator.convertToPb(entity).getSerializedSize();

    // Do this before the add so that we guarantee that size is never > sizeLimit
    if (putsBytes + bytesHere >= params.getBytesLimit()) {
      flushPuts();
    }

    putsBytes += bytesHere;
    puts.add(entity);

    if (puts.size() >= params.getCountLimit()) {
      flushPuts();
    }
  }
1373370
public GeometryIndex populate(TableIndex tableIndex, long geomId,
			GeometryEnvelope envelope) {

		GeometryIndex geometryIndex = new GeometryIndex();
		geometryIndex.setTableIndex(tableIndex);
		geometryIndex.setGeomId(geomId);
		geometryIndex.setMinX(envelope.getMinX());
		geometryIndex.setMaxX(envelope.getMaxX());
		geometryIndex.setMinY(envelope.getMinY());
		geometryIndex.setMaxY(envelope.getMaxY());
		if (envelope.hasZ()) {
			geometryIndex.setMinZ(envelope.getMinZ());
			geometryIndex.setMaxZ(envelope.getMaxZ());
		}
		if (envelope.hasM()) {
			geometryIndex.setMinM(envelope.getMinM());
			geometryIndex.setMaxM(envelope.getMaxM());
		}
		return geometryIndex;
	}
622197
private List<EnhanceEntity> populateEnhanceEntities(EntityMetadata m, List<String> relationNames, Client client,
            String sqlQuery)
    {
        List<EnhanceEntity> ls = null;
        List result = ((HibernateClient) client).find(sqlQuery, relationNames, m);

        if (!result.isEmpty())
        {
            ls = new ArrayList<EnhanceEntity>(result.size());
            for (Object o : result)
            {
                EnhanceEntity entity = null;
                if (!o.getClass().isAssignableFrom(EnhanceEntity.class))
                {
                    entity = new EnhanceEntity(o, getId(o, m), null);
                }
                else
                {
                    entity = (EnhanceEntity) o;
                }
                ls.add(entity);
            }
        }
        return ls;
    }
437397
private void insertAfterEdge(Geometry geom, GeometryIndex index, Coordinate coordinate)
			throws GeometryIndexNotFoundException {
		// First we check the geometry type:
		if (!Geometry.LINE_STRING.equals(geom.getGeometryType())
				&& !Geometry.LINEAR_RING.equals(geom.getGeometryType())) {
			throw new GeometryIndexNotFoundException("Could not match index with given geometry.");
		}
		if (index.getValue() < 0) {
			throw new GeometryIndexNotFoundException("Cannot insert in a negative index.");
		}

		// Then we check if the edge exists:
		if (geom.getCoordinates() != null && geom.getCoordinates().length > index.getValue() + 1) {
			// Inserting on edges allows only to insert on existing edges. No adding at the end:
			Coordinate[] result = new Coordinate[geom.getCoordinates().length + 1];
			int count = 0;
			for (int i = 0; i < geom.getCoordinates().length; i++) {
				if (i == (index.getValue() + 1)) {
					result[i] = coordinate;
					count++;
				}
				result[i + count] = geom.getCoordinates()[i];
			}
			geom.setCoordinates(result);
		} else {
			throw new GeometryIndexNotFoundException("Cannot insert a vertex into an edge that does not exist.");
		}
	}
58306
def add(self, entity):
        
        characteristic = self.extract_traits(entity)
        if not characteristic.traits:
            return

        if characteristic.is_matching:
            self.add_match(entity, *characteristic.traits)
        else:
            self.add_mismatch(entity, *characteristic.traits)
181713
def _update_result(self, result, insertions, dimension_index):
        """"""
        for j, (ind_insertion, value) in enumerate(insertions):
            result = np.insert(
                result, ind_insertion + j + 1, value, axis=dimension_index
            )
        return result
321998
private void expandEntity(EntityDecl ed, boolean allowExt)
        throws XMLStreamException
    {
        String id = ed.getName();

        /* Very first thing; we can immediately check if expanding
         * this entity would result in infinite recursion:
         */
        if (mInput.isOrIsExpandedFrom(id)) {
            throwRecursionError(id);
        }

        /* Should not refer unparsed entities from attribute values
         * or text content (except via notation mechanism, but that's
         * not parsed here)
         */
        if (!ed.isParsed()) {
            throwParseError("Illegal reference to unparsed external entity \"{0}\"", id, null);
        }

        // 28-Jun-2004, TSa: Do we support external entity expansion?
        boolean isExt = ed.isExternal();
        if (isExt) {
            if (!allowExt) { // never ok in attribute value...
                throwParseError("Encountered a reference to external parsed entity \"{0}\" when expanding attribute value: not legal as per XML 1.0/1.1 #3.1", id, null);
            }
            if (!mConfig.willSupportExternalEntities()) {
                throwParseError("Encountered a reference to external entity \"{0}\", but stream reader has feature \"{1}\" disabled",
                                id, XMLInputFactory.IS_SUPPORTING_EXTERNAL_ENTITIES);
            }
        }
        verifyLimit("Maximum entity expansion count", mConfig.getMaxEntityCount(), ++mEntityExpansionCount);
        // First, let's give current context chance to save its stuff
        WstxInputSource oldInput = mInput;
        oldInput.saveContext(this);
        WstxInputSource newInput = null;
        try {
            newInput = ed.expand(oldInput, mEntityResolver, mConfig, mDocXmlVersion);
        } catch (FileNotFoundException fex) {
            /* Let's catch and rethrow this just so we get more meaningful
             * description (with input source position etc)
             */
            throwParseError("(was {0}) {1}", fex.getClass().getName(), fex.getMessage());
        } catch (IOException ioe) {
            throw constructFromIOE(ioe);
        }
        /* And then we'll need to make sure new input comes from the new
         * input source
         */
        initInputSource(newInput, isExt, id);
    }
671102
private List<EnhanceEntity> populateEnhanceEntities(EntityMetadata m, List<String> relationNames, List result)
    {

        List<EnhanceEntity> ls = null;
        if (!result.isEmpty())
        {
            ls = new ArrayList<EnhanceEntity>(result.size());
            for (Object o : result)
            {
                EnhanceEntity entity = null;
                if (!o.getClass().isAssignableFrom(EnhanceEntity.class))
                {
                    entity = new EnhanceEntity(o, PropertyAccessorHelper.getId(o, m), null);
                }
                else
                {
                    entity = (EnhanceEntity) o;
                }
                ls.add(entity);
            }
        }
        return ls;
    }
1061833
def add(self, v):
        ""
        self.population.append(v)
        self._current_popsize += 1
        v.position = len(self._hist)
        self._hist.append(v)
        self.bsf = v
        self.estopping = v
        self._density += self.get_density(v)
73288
function expandVertically() {
		var growWith = 0;
		for (var i = 0; i < this.virtualGridMatrix.length; i++) {
			if (this.virtualGridMatrix[i][0] !== 0) {
				growWith++;
			}
		}
		if (growWith > 0) {
			this.addEmptyRows(growWith);
		}
	}
866119
def _add_count_to_params_if_needed(self, params):
        

        if self.count is not None:
            params[self.PARAM_COUNT] = str(self.count)
494246
def balance(self):
        """"""
        if len(self.records) > len(self._shapes):
            self.null()
        elif len(self.records) < len(self._shapes):
            self.record()
865938
def create(self, count):
        """"""
        space, self.space = tee(self.space)
        limit = reduce(mul, map(len, self.sets)) * self.position
        logging.debug('limit: %s', limit)
        if limit >= count:
            return ''.join(islice(space, count))
        else:
            raise IndexError('{count} Overflows {sets}!'.format(
                count=count, sets=self.sets))
570465
private void modifyBeliefCount(int count){
        introspector.setBeliefValue(getLocalName(), Definitions.RECEIVED_MESSAGE_COUNT, getBeliefCount()+count, null);
    }