This creates interior edge->cells relations. While it's not
        necessary for many applications, it sometimes does come in handy.
761914
def _compute_edges_cells(self):
        
        if self.edges is None:
            self.create_edges()

        num_edges = len(self.edges["nodes"])

        counts = numpy.zeros(num_edges, dtype=int)
        fastfunc.add.at(
            counts,
            self.cells["edges"],
            numpy.ones(self.cells["edges"].shape, dtype=int),
        )

        # <https://stackoverflow.com/a/50395231/353337>
        edges_flat = self.cells["edges"].flat
        idx_sort = numpy.argsort(edges_flat)
        idx_start, count = grp_start_len(edges_flat[idx_sort])
        res1 = idx_sort[idx_start[count == 1]][:, numpy.newaxis]
        idx = idx_start[count == 2]
        res2 = numpy.column_stack([idx_sort[idx], idx_sort[idx + 1]])
        self._edges_cells = [
            [],  # no edges with zero adjacent cells
            res1 // 3,
            res2 // 3,
        ]
        # self._edges_local = [
        #     [],  # no edges with zero adjacent cells
        #     res1 % 3,
        #     res2 % 3,
        #     ]

        # For each edge, store the number of adjacent cells plus the index into
        # the respective edge array.
        self._edge_gid_to_edge_list = numpy.empty((num_edges, 2), dtype=int)
        self._edge_gid_to_edge_list[:, 0] = count
        c1 = count == 1
        l1 = numpy.sum(c1)
        self._edge_gid_to_edge_list[c1, 1] = numpy.arange(l1)
        c2 = count == 2
        l2 = numpy.sum(c2)
        self._edge_gid_to_edge_list[c2, 1] = numpy.arange(l2)
        assert l1 + l2 == len(count)

        return
112258
function(){
		var cell = this.getcell();
		if(cell.isnull || cell===this.mouseCell){ return;}
		if(this.inputData===null){ this.inputData = (cell.ice()?0:6);}

		cell.setQues(this.inputData);
		cell.drawaround();
		this.mouseCell = cell;
	}
1280327
def add_edge(self, u, v, **attr):
        
        if u not in self.vertices:
            self.vertices[u] = []
        if v not in self.vertices:
            self.vertices[v] = []
        vertex = (u, v)
        self.edges[vertex] = {}
        if attr:
            self.edges[vertex].update(attr)
        self.vertices[u].append(v)
        self.vertices[v].append(u)
74811
RelationImpl buildRelation(EdgeElement edge) {
        return getOrBuildConcept(edge, (e) -> RelationImpl.create(RelationEdge.get(edge)));
    }
1337760
function boundary(cells) {
  var res = []
  for(var i=0,il=cells.length; i<il; ++i) {
    var c = cells[i]
    for(var j=0,cl=c.length; j<cl; ++j) {
      var b = new Array(c.length-1)
      for(var k=0, l=0; k<cl; ++k) {
        if(k !== j) {
          b[l++] = c[k]
        }
      }
      res.push(b)
    }
  }
  return normalize(res)
}
449718
private boolean cCreateFromScratch(Bounds i, int from, int to) {
		//Conversion
		long max = i.max;
		long min = i.min;
		if (i.max == APSPSolver.INF) max = H-O;
		if (i.min == -APSPSolver.INF) min = -1 * (H - O);
		i = new Bounds(min,max);

		// Checks
		if (i.min > i.max) return false; 
		if (from == to) return false;
		if (tPoints[from] == null) return false;

		//Already existing edge
		SimpleDistanceConstraint con = tPoints[from].getOut(to);
		if (con != null) {
			//check intersection between active con and new con
			if ( (con.getMinimum() > i.max) || (con.getMaximum() < i.min) ) return false;
			//check con does not contain active con
			if ( (con.getMinimum() > i.min) && (con.getMaximum() < i.max) ) {
				//OK it is. I save con without doing anything else
				if (!con.addInterval(i)) return false;
				return true;
			}
			//Update active con
			long oldd = con.getMinimum();
			long oldD = con.getMaximum();
			if (con.getMinimum() < i.min) con.setMinimum(i.min);
			if (con.getMaximum() > i.max) con.setMaximum(i.max);

			if (!con.addInterval(i)) return false;
			
			if (backupDMatrixSimple) saveDMatrixInternal();
			if (!fromScratchDistanceMatrixComputation()) {
				//Inconsistency. Rollback
				con.removeInterval(i);
				if (backupDMatrixSimple) restoreDMatrixInternal();
				return false;
			}

			//[lb,ub] = [-di0,d0i]
			for (int j = 0; j < MAX_USED+1; j++)
				if (tPoints[j].isUsed()) {
					tPoints[j].setLowerBound(sum(-distance[j][0],O));
					tPoints[j].setUpperBound(sum(distance[0][j],O));
				}
		}				
		else {
			con = new SimpleDistanceConstraint();
			con.setFrom(this.getVariable(from));
			con.setTo(this.getVariable(to));
			con.setMinimum(i.min);
			con.setMaximum(i.max);
			con.addInterval(new Bounds(i.min,i.max));
			//Add edge to tp
			tPoints[from].setOut(to,con);

			if (backupDMatrixSimple) saveDMatrixInternal();
			if (!fromScratchDistanceMatrixComputation()) {
				tPoints[from].setOut(to,null);
				if (backupDMatrixSimple) restoreDMatrixInternal();
				return false;
			}

			//[lb,ub] = [-di0,d0i]
			for (int j = 0; j < MAX_USED+1; j++) {
				if (tPoints[j].isUsed() == true) {
					tPoints[j].setLowerBound (sum(-distance[j][0],O));
					tPoints[j].setUpperBound (sum(distance[0][j],O));
				}
			}
		}
		return true;	
	}
193183
def addEdge(self, outVertex, inVertex, label):
        """"""
        n1 = outVertex.neoelement
        n2 = inVertex.neoelement
        edge = n1.relationships.create(label, n2)
        return Edge(edge)
1277208
def add_edge(self, a, b):
        
        neighbors_of_a = self.adjacency_lists.get(a)
        if not neighbors_of_a:
            neighbors_of_a = set()
            self.adjacency_lists[a] = neighbors_of_a

        neighbors_of_a.add(b)

        neighbors_of_b = self.adjacency_lists.get(b)
        if not neighbors_of_b:
            neighbors_of_b = set()
            self.adjacency_lists[b] = neighbors_of_b

        neighbors_of_b.add(a)
695404
def add_edges(self, edges, *args, **kwargs):
        
        for edge in edges:
            self.add_edge(edge, *args, **kwargs)
172301
function hGrow(xx, edge) {
      const cells = [];
      for (y = range.top; y <= range.bottom; y++) {
        const c = matrix.findCellAt(sheetName, y, xx);
        if (c && c.mark) {
          cells.push(c);
        } else {
          return false;
        }
      }
      range[edge] = xx;
      for (let i = 0; i < cells.length; i++) {
        cells[i].mark = false;
      }
      return true;
    }
1355679
def add_edge (u, v)
      add_vertex(u)                         # ensure key
      add_vertex(v)                         # ensure key
      basic_add_edge(u, v)
    end
945186
function mxTemporaryCellStates(view, scale, cells, isCellVisibleFn, getLinkForCellState)
{
	scale = (scale != null) ? scale : 1;
	this.view = view;
	
	// Stores the previous state
	this.oldValidateCellState = view.validateCellState;
	this.oldBounds = view.getGraphBounds();
	this.oldStates = view.getStates();
	this.oldScale = view.getScale();
	this.oldDoRedrawShape = view.graph.cellRenderer.doRedrawShape;

	var self = this;

	// Overrides doRedrawShape and paint shape to add links on shapes
	if (getLinkForCellState != null)
	{
		view.graph.cellRenderer.doRedrawShape = function(state)
		{
			var oldPaint = state.shape.paint;
			
			state.shape.paint = function(c)
			{
				var link = getLinkForCellState(state);
				
				if (link != null)
				{
					c.setLink(link);
				}
				
				oldPaint.apply(this, arguments);
				
				if (link != null)
				{
					c.setLink(null);
				}
			};
			
			self.oldDoRedrawShape.apply(view.graph.cellRenderer, arguments);
			state.shape.paint = oldPaint;
		};
	}

	// Overrides validateCellState to ignore invisible cells
	view.validateCellState = function(cell, resurse)
	{
		if (cell == null || isCellVisibleFn == null || isCellVisibleFn(cell))
		{
			return self.oldValidateCellState.apply(view, arguments);
		}
		
		return null;
	};
	
	// Creates space for new states
	view.setStates(new mxDictionary());
	view.setScale(scale);
	
	if (cells != null)
	{
		view.resetValidationState();
		var bbox = null;

		// Validates the vertices and edges without adding them to
		// the model so that the original cells are not modified
		for (var i = 0; i < cells.length; i++)
		{
			var bounds = view.getBoundingBox(view.validateCellState(view.validateCell(cells[i])));
			
			if (bbox == null)
			{
				bbox = bounds;
			}
			else
			{
				bbox.add(bounds);
			}
		}

		view.setGraphBounds(bbox || new mxRectangle());
	}
}
517681
private List<HBaseCell> getRelationCell(EntityMetadata m, Object rowId, List<RelationHolder> relations)
            throws IOException
    {
        List<HBaseCell> relationCells = new ArrayList<HBaseCell>();
        for (RelationHolder relation : relations)
        {
            HBaseCell hBaseCell = new HBaseCell(m.getTableName(), relation.getRelationName(),
                    relation.getRelationValue());
            relationCells.add(hBaseCell);
        }
        return relationCells;
    }
1334173
function(){
		var cell = this.getcell();
		if(cell.isnull || cell===this.mouseCell){ return;}
		if(this.inputData===null){ this.decIC(cell);}

		this.mouseCell = cell;

		if(cell.numberRemainsUnshaded && cell.qnums.length!==0 && (this.inputData===1||(this.inputData===2 && !this.puzzle.painter.enablebcolor))){ return;}
		if(this.RBShadeCell && this.inputData===1){
			if(this.firstCell.isnull){ this.firstCell = cell;}
			var cell0 = this.firstCell;
			if(((cell0.bx&2)^(cell0.by&2))!==((cell.bx&2)^(cell.by&2))){ return;}
		}

		(this.inputData===1?cell.setShade:cell.clrShade).call(cell);
		cell.setQsub(this.inputData===2?1:0);

		cell.draw();
	}
1185099
public boolean add(TypedEdge<T> e) {
        if (e.from() == rootVertex) 
            return add(edges, e.to(), e.edgeType());
        else if (e.to() == rootVertex) 
            return add(edges, e.from(), e.edgeType());
        return false;
    }
218698
def add_edge(self, u, v):
        
        # ubin = self.find_root(u)
        ru = self.find_root(u)
        rv = self.find_root(v)
        ru = self.reroot(ru, u)
        rv = self.reroot(rv, v)

        ubin.set_child(vbin)

        pass
1340591
private void interiorAreaBoundaryArea_(int half_edge, int id_a,
			int predicate) {
		if (m_matrix[predicate] == 1)
			return;

		int faceParentage = m_topo_graph.getHalfEdgeFaceParentage(half_edge);
		int twinFaceParentage = m_topo_graph
				.getHalfEdgeFaceParentage(m_topo_graph
						.getHalfEdgeTwin(half_edge));

		if ((faceParentage & id_a) != 0 && (twinFaceParentage & id_a) != 0)
			m_matrix[predicate] = 1;
	}