-
Notifications
You must be signed in to change notification settings - Fork 1
Add Edge
Adds an edge between two vertexes into a graph
Add-Edge -From <Object> -To <Object> -Graph <Object> [-Attribute <Object>] [<CommonParameters>]
Adds an edge between two vertexes into a graph
In this example new graph is created and stored in $g variable. Next line adds an edge from A to B into it. Vertexes A and B are automatically added to the graph. If vertexes are already in the graph they are used as source and target vertexes. In order for this to work vertex types has to be comparable.
PS C:\> $g = New-Graph -Type AdjacencyGraph
PS C:\> Add-Edge -From A -To B -Graph $gNot used in current implementation
Type: Object
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseSource vertex to use for the edge
Type: Object
Parameter Sets: (All)
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseGraph to add vertexes and edges to
Type: Object
Parameter Sets: (All)
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseTarget vertex to use for the edge
Type: Object
Parameter Sets: (All)
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseThis cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).
When addin edges library checks to see if there are such edges and vertices. If they are they are not added to the graph. Instead existing once are used.