You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
> Tip: Each linked doc contains multiple scenarios; skim the first example for the minimal pattern, then look for advanced sections (weights, tagging, configs).
Adds a directed edge From -> To into the supplied mutable graph. If either -From or -To is not
23
+
already a PSGraph PSVertex it is wrapped in a new PSVertex whose Label is the object's ToString().
24
+
If the vertices already exist (label equality) the existing instances are reused. An optional
25
+
Tag value is stored on the created PSEdge (converted to string when present). The cmdlet does not
26
+
emit a value; use the graph object to inspect results.
20
27
21
28
## EXAMPLES
22
29
23
30
### Example 1
24
-
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.
31
+
Create a graph and add an edge A -> B (vertices auto-created).
Optional label stored inside the created edge's Tag object (stringified).
65
80
66
81
```yaml
67
82
Type: Object
68
83
Parameter Sets: (All)
69
-
Aliases:
84
+
Aliases:
70
85
71
-
Required: True
86
+
Required: False
72
87
Position: Named
73
88
Default value: None
74
89
Accept pipeline input: False
75
90
Accept wildcard characters: False
76
91
```
77
92
78
93
### -To
79
-
Target vertex to use for the edge
94
+
Target vertex (or object to wrap) for the edge.
80
95
81
96
```yaml
82
-
Type: Object
97
+
Type: PSObject
83
98
Parameter Sets: (All)
84
-
Aliases:
99
+
Aliases:
85
100
86
101
Required: True
87
102
Position: Named
@@ -90,19 +105,32 @@ Accept pipeline input: False
90
105
Accept wildcard characters: False
91
106
```
92
107
108
+
### -ProgressAction
109
+
Internal PowerShell progress preference (normally not used).
110
+
111
+
```yaml
112
+
Type: ActionPreference
113
+
Parameter Sets: (All)
114
+
Aliases: proga
115
+
116
+
Required: False
117
+
Position: Named
118
+
Default value: None
119
+
Accept pipeline input: False
120
+
Accept wildcard characters: False
121
+
```
122
+
93
123
### CommonParameters
94
-
This 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).
124
+
This 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).
95
125
96
126
## INPUTS
97
127
98
128
### None
99
-
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.
In this example new graph class is derived from Psgraph.PSGraphVertex exported from the module. This type is used as a base type because it contains all neccessary metadata which is needed to export graph into the DOT language format. Exported file then can be used by graphviz utility to visualize the graph.
This 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).
95
+
This 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).
98
96
99
97
## INPUTS
100
98
101
99
### None
102
-
103
100
## OUTPUTS
104
101
105
-
### System.Object
106
-
102
+
### None
107
103
## NOTES
108
-
When adding new vertecies, library checks to see if they are alreagy in the graph. In case they are a new vertex is not added. For the basic .NET types this type of comparison works by default. However if you use your custom type which stores some additional metadata you need to provide a special method to compare them, see Example 2 for reference.
0 commit comments