Adds an Edge and returns the reference on the new Edge.
@access		public
@param		ADT_Graph_Node	$source		Source Node of this Edge
@param		ADT_Graph_Node	$target		Target Node of this Edge
@param		int				$value		Value of this Edge
@return		ADT_Graph_Edge
548132
public function addEdge( $source, $target, $value = 1 )
	{
		if( $source->getNodeName() < $target->getNodeName() )
			return $this->edgeSet->addEdge( $source, $target, $value );
		else
			return $this->edgeSet->addEdge( $target, $source, $value );
	}
780670
private function addAllRecursive($source, $target, array $path = [])
    {
        foreach ($source as $key => $value)
        {
            if (!isset($target[$key]))
            {
                $target[$key] = $value;
            }
            else
            {
                $tgt = $target[$key];

                if (is_array($source) || $source instanceof Dictionary)
                {
                    if ($tgt instanceof Dictionary)
                        $this->addAllRecursive($value, $tgt);
                    else
                        $target[$key] = $value;
                }
                else
                    $target[$key] = $value;
            }
        }
    }
259799
def move_edge_target(self, edge_id, node_a):
        """"""
        # Grab the edge
        edge = self.get_edge(edge_id)

        # Remove the edge from the original "target node"
        original_target_node_id = edge['vertices'][1]
        original_target_node = self.get_node(original_target_node_id)
        original_target_node['edges'].remove(edge_id)

        # Add the edge to the new target node
        new_target_node_id = node_a
        new_target_node = self.get_node(new_target_node_id)
        new_target_node['edges'].append(edge_id)

        # Alter the vertices on the edge
        edge['vertices'] = (edge['vertices'][0], node_a)
583482
public function add($value)
    {
        $mapping = $this->getMapping();

        $value = $this->getExpr()->value($value);
        $value->setMapping($mapping);

        return $this->getExpr()->addUpdate(new Add($this, $value));
    }
420551
static protected function _resolve_target(\DOMNode $node, $target, $value)
    {
        if ($target[0] === "!") {
            // Function call
            $func = "_" . mb_substr($target, 1);

            return self::$func($node, $value);
        }

        return $value ? sprintf($target, $value) : "";
    }
693760
public static Titan1Edge createEdge(Titan1Graph graph, Edge source) {

        if (source == null) {
            return null;
        }
        return new Titan1Edge(graph, source);
    }
1062081
protected static function addMissingParts($source, $target)
    {
        $pattern = '/'.preg_replace('/[0-9]+/', '[0-9]+', preg_quote($target, '/')).'$/';

        $result = preg_replace($pattern, $target, $source, 1, $count);

        return $count ? $result : $target;
    }
46499
public static function addTo( &$source, $key, $subKey, $value = null )
    {
        $_target = static::clean( static::get( $source, $key, array() ) );
        static::set( $_target, $subKey, $value );
        static::set( $source, $key, $_target );

        return $_target;
    }
337798
def _add_stmt_edge(self, stmt):
        """"""
        # Skip statements with None in the subject position
        source = _get_node_key(stmt.agent_list()[0])
        target = _get_node_key(stmt.agent_list()[1])
        edge_key = (source, target, stmt.__class__.__name__)
        if edge_key in self.existing_edges:
            return
        self.existing_edges.append(edge_key)
        if isinstance(stmt, RemoveModification) or \
             isinstance(stmt, Inhibition) or \
             isinstance(stmt, DecreaseAmount) or \
             isinstance(stmt, Gap) or \
             (isinstance(stmt, Influence) and stmt.overall_polarity() == -1):
            color = '#ff0000'
        else:
            color = '#000000'
        params = {'color': color,
                  'arrowhead': 'normal',
                  'dir': 'forward'}
        self._add_edge(source, target, **params)
1137012
public function connect($sourceId, $sourceValue, $destId, $destValue = null, $reference = null/*, bool $lazy = false, bool $weak = false*/)
    {
        $lazy = func_num_args() >= 6 ? func_get_arg(5) : false;
        $weak = func_num_args() >= 7 ? func_get_arg(6) : false;

        if (null === $sourceId || null === $destId) {
            return;
        }

        $sourceNode = $this->createNode($sourceId, $sourceValue);
        $destNode = $this->createNode($destId, $destValue);
        $edge = new ServiceReferenceGraphEdge($sourceNode, $destNode, $reference, $lazy, $weak);

        $sourceNode->addOutEdge($edge);
        $destNode->addInEdge($edge);
    }
476131
public function add(string $a, string $b, $distance, bool $addInverseEdge = true) : Graph
    {
        if (!is_numeric($distance)) {
            return false;
        }
        $distance = floatval($distance);
        $this->total_cost   += $distance;
        $this->nodes[$a][$b] = $distance;

        if ($addInverseEdge) {
            $this->nodes[$b][$a] = $distance;
        }
        return $this;
    }
1305509
public function setCoreMgrSourceIcon($value)
    {
        $this->setFieldName('mgr_source_icon');
        $this->loadObject(true);
        $this->setFieldValue($value);

        return $this;
    }
494769
public function removeEdge( $source, $target )
	{
		if( $this->isEdge( $source, $target ) )
			$this->edgeSet->removeEdge( $source, $target );
	}
564732
@Override
    protected InterproceduralCallGraphEdge allocateEdge(InterproceduralCallGraphVertex source,
            InterproceduralCallGraphVertex target) {
        return new InterproceduralCallGraphEdge(source, target);
    }
814905
public static Titan0Edge createEdge(Titan0Graph graph, Edge source) {

        if (source == null) {
            return null;
        }
        return new Titan0Edge(graph, source);
    }
13121
static protected function insertValueIntoStructureByPath(array $path, &$target, $value) {
		$segment = array_shift($path);
		if (count($path) > 0) {
			if (!array_key_exists($segment, $target)) {
				$target[$segment] = array();
			}
			self::insertValueIntoStructureByPath($path, $target[$segment], $value);
		} else {
			$target[$segment] = $value;
		}
		ksort($target);
	}
1263479
public function add($key, $value) {
        $node = new Node();
        $node->setKey($key);
        $node->setValue($value);
        $this->append($node);
    }