Add or update an endCxn element for this connector that connects its
        end point to the connection point of *shape* specified by
        *cxn_pt_idx*.
324152
def _connect_end_to(self, shape, cxn_pt_idx):
        
        cNvCxnSpPr = self._element.nvCxnSpPr.cNvCxnSpPr
        endCxn = cNvCxnSpPr.get_or_add_endCxn()
        endCxn.id = shape.shape_id
        endCxn.idx = cxn_pt_idx
1299487
def set_nearest_border(self):
        
        px, py = self._point
        nw_x, nw_y, se_x, se_y = self.get_adjusted_border_positions()

        if self._port.side == SnappedSide.RIGHT:
            _update(px, se_x)
        elif self._port.side == SnappedSide.BOTTOM:
            _update(py, se_y)
        elif self._port.side == SnappedSide.LEFT:
            _update(px, nw_x)
        elif self._port.side == SnappedSide.TOP:
            _update(py, nw_y)
154517
void updateClusterXY(int cluster, Point2D pt) {
		int vertexList = getClusterVertices(cluster);
		for (int vh = m_cluster_vertices.getFirst(vertexList); vh != -1; vh = m_cluster_vertices
				.getNext(vh)) {
			int vertex = m_cluster_vertices.getElement(vh);
			m_shape.setXY(vertex, pt);
		}
	}
833559
function ConnectorEndsInspector()
{
	this.inspect = function(connector)
	{
		var children = connector.htmlElement.childNodes;
		var i;
		for(i = 0; i < children.length; i++)
		{
			if(hasClass(children[i], "connector-end"))
			{
				var newElement = new ConnectorEnd(children[i], connector, END);
				newElement.repaint();
				connector.moveListeners.push(newElement);
			}
			else if(hasClass(children[i], "connector-start"))
			{
				var newElement = new ConnectorEnd(children[i], connector, START);
				newElement.repaint();
				connector.moveListeners.push(newElement);
			}
		}
	}
}
719366
def _AddEdge(self, start_node, end_node):
    

    self.graph[start_node].outgoing.append(end_node)

    # This check is necessary because an artifact can provide attributes that
    # are not covered by the graph because they are not relevant for the
    # requested artifacts.
    if end_node in self.graph:
      self.graph[end_node].incoming.append(start_node)
485776
def _link_vertex_and_edge_types(self):
        """"""
        for edge_class_name in self._edge_class_names:
            edge_element = self._elements[edge_class_name]

            if (EDGE_SOURCE_PROPERTY_NAME not in edge_element.properties or
                    EDGE_DESTINATION_PROPERTY_NAME not in edge_element.properties):
                if edge_element.abstract:
                    continue
                else:
                    raise AssertionError(u'Found a non-abstract edge class with undefined '
                                         u'endpoint types: {}'.format(edge_element))

            from_class_name = edge_element.properties[EDGE_SOURCE_PROPERTY_NAME].qualifier
            to_class_name = edge_element.properties[EDGE_DESTINATION_PROPERTY_NAME].qualifier

            edge_schema_element = self._elements[edge_class_name]

            # Link from_class_name with edge_class_name
            for from_class in self._subclass_sets[from_class_name]:
                from_schema_element = self._elements[from_class]
                from_schema_element.out_connections.add(edge_class_name)
                edge_schema_element.in_connections.add(from_class)

            # Link edge_class_name with to_class_name
            for to_class in self._subclass_sets[to_class_name]:
                to_schema_element = self._elements[to_class]
                edge_schema_element.out_connections.add(to_class)
                to_schema_element.in_connections.add(edge_class_name)
1014467
private AtlasEdge addOrUpdateStruct(AtlasVertex instanceVertex, AttributeInfo attributeInfo,
            ITypedStruct newAttributeValue, AtlasEdge currentEdge,
            String edgeLabel, Operation operation) throws AtlasException {
        AtlasEdge newEdge = null;
        if (GraphHelper.elementExists(currentEdge) && newAttributeValue != null) {
            //update
            updateStructVertex(newAttributeValue, currentEdge, operation);
            newEdge = currentEdge;
        } else if (! GraphHelper.elementExists(currentEdge) && newAttributeValue != null) {
            //add
            newEdge = addStructVertex(newAttributeValue, instanceVertex, attributeInfo, edgeLabel);
        }
        return newEdge;
    }
676348
def addInputPort(self, node, name,
                     i: Union[Value, RtlSignalBase],
                     side=PortSide.WEST):
        
        root = self.node
        port = node.addPort(name, PortType.INPUT, side)
        netCtxs = self.netCtxs

        if isinstance(i, LPort):
            root.addEdge(i, port)
        elif isConst(i):
            i = i.staticEval()
            c, wasThereBefore = self.netCtxs.getDefault(i)
            if not wasThereBefore:
                v = ValueAsLNode(root, i).east[0]
                c.addDriver(v)
            c.addEndpoint(port)
        elif i.hidden:
            # later connect driver of this signal to output port
            ctx, wasThereBefore = netCtxs.getDefault(i)
            if not wasThereBefore:
                self.lazyLoadNet(i)
            ctx.addEndpoint(port)
        else:
            portCtx = self.portCtx
            rootCtx, _ = self.rootNetCtxs.getDefault(i)

            if self.isVirtual:
                # later connect signal in root to input port or input port of
                # wrap node
                rootCtx.addEndpoint(port)
            else:
                # spot input port on this wrap node if required
                isNewlySpotted = (i, PortType.INPUT) not in portCtx.data
                src = portCtx.register(i, PortType.INPUT)
                # connect input port on wrap node with specified output port
                ctx, _ = netCtxs.getDefault(i)
                ctx.addDriver(src)
                ctx.addEndpoint(port)

                if isNewlySpotted:
                    # get input port from parent view
                    _port = portCtx.getOutside(i, PortType.INPUT)
                    rootCtx.addEndpoint(_port)
478879
function addShape( shape ) {

		var i, l, shapeHole;

		var indexOffset = vertices.length / 3;
		var points = shape.extractPoints( curveSegments );

		var shapeVertices = points.shape;
		var shapeHoles = points.holes;

		// check direction of vertices

		if ( ShapeUtils.isClockWise( shapeVertices ) === false ) {

			shapeVertices = shapeVertices.reverse();

		}

		for ( i = 0, l = shapeHoles.length; i < l; i ++ ) {

			shapeHole = shapeHoles[ i ];

			if ( ShapeUtils.isClockWise( shapeHole ) === true ) {

				shapeHoles[ i ] = shapeHole.reverse();

			}

		}

		var faces = ShapeUtils.triangulateShape( shapeVertices, shapeHoles );

		// join vertices of inner and outer paths to a single array

		for ( i = 0, l = shapeHoles.length; i < l; i ++ ) {

			shapeHole = shapeHoles[ i ];
			shapeVertices = shapeVertices.concat( shapeHole );

		}

		// vertices, normals, uvs

		for ( i = 0, l = shapeVertices.length; i < l; i ++ ) {

			var vertex = shapeVertices[ i ];

			vertices.push( vertex.x, vertex.y, 0 );
			normals.push( 0, 0, 1 );
			uvs.push( vertex.x, vertex.y ); // world uvs

		}

		// incides

		for ( i = 0, l = faces.length; i < l; i ++ ) {

			var face = faces[ i ];

			var a = face[ 0 ] + indexOffset;
			var b = face[ 1 ] + indexOffset;
			var c = face[ 2 ] + indexOffset;

			indices.push( a, b, c );
			groupCount += 3;

		}

	}
927376
def _add_interface(self, interface_id, **kw):
        
        base_interface = ElementCache()

        base_interface.update(
            interface_id=str(interface_id),
            interfaces=[])
        
        if 'zone_ref' in kw:
            zone_ref = kw.pop('zone_ref')
            base_interface.update(zone_ref=zone_helper(zone_ref) if zone_ref else None)
                
        if 'comment' in kw:
            base_interface.update(comment=kw.pop('comment'))
            
        self.data = base_interface
                          
        interfaces = kw.pop('interfaces', [])
        if interfaces:
            for interface in interfaces:
                if interface.get('cluster_virtual', None) or \
                    len(interface.get('nodes', [])) > 1:    # Cluster
                    
                    kw.update(interface_id=interface_id, interfaces=interfaces)
                    cvi = ClusterPhysicalInterface(**kw)
                    cvi.data.pop('vlanInterfaces', None)
                    self.data.update(cvi.data)
                else:
                    # Single interface FW
                    for node in interface.get('nodes', []):
                        node.update(nodeid=1)
                        sni = SingleNodeInterface.create(interface_id, **node)
                        base_interface.setdefault('interfaces', []).append(
                            {sni.typeof: sni.data})
150483
def add_endpoint(self, ep):
        """"""
        assert ep.name not in self.endpoints, ep
        self.endpoints[ep.name] = ep
39249
protected void addNeighbor(Queue<ColorPoint> queue, int px, int py, int color, Feature component) {
        if (!inBoundary(px, py, component)) {
            return;
        }

        if (!mask.isTouched(px, py)) {
            queue.add(new ColorPoint(px, py, color));
        }
    }
757985
def add_endpoint(self, name, **kwargs):
        
        self._endpoints[name] = Endpoint(self, **kwargs)
1295601
def _connect_begin_to(self, shape, cxn_pt_idx):
        
        cNvCxnSpPr = self._element.nvCxnSpPr.cNvCxnSpPr
        stCxn = cNvCxnSpPr.get_or_add_stCxn()
        stCxn.id = shape.shape_id
        stCxn.idx = cxn_pt_idx
1216711
def add shape_name, tkar_id, flags, layer, x, y, r, *params
      del(tkar_id)
      
      tkaroid = Tkaroid.new do |t|
        t.shape   = get_shape(shape_name)
        t.id      = tkar_id
        t.flags   = flags
        t.layer   = layer
        t.x       = x
        t.y       = y
        t.r       = r
        t.params  = params
        t.newly_added = true
      end

      @objects[tkar_id] = tkaroid
      @changed[tkar_id] = tkaroid
    end
85187
def add_textbox(self, id_, name, x, y, cx, cy):
        
        sp = CT_Shape.new_textbox_sp(id_, name, x, y, cx, cy)
        self.insert_element_before(sp, 'p:extLst')
        return sp
1327384
void insert(Suffix<I, S> suffix) {
        if (activePoint.isNode()) {
            Node<I, S> node = activePoint.getNode();
            node.insert(suffix, activePoint);
        } else if (activePoint.isEdge()) {
            Edge<I, S> edge = activePoint.getEdge();
            edge.insert(suffix, activePoint);
        }
    }