-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathSigma.fs
More file actions
51 lines (35 loc) · 1.81 KB
/
Copy pathSigma.fs
File metadata and controls
51 lines (35 loc) · 1.81 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
namespace SigmaGraph.NET
open DynamicObj
/// <summary>Represents a graph within the SigmaGraph.NET framework.</summary>
type SigmaGraph() =
inherit DynamicObj ()
let tmpGraphData = new GraphData()
let tmpLayout = Layout.Random (RandomOptions())
let tmpSetting = Render.Settings()
let tmpWidgets =
let tmp = ResizeArray<string>()
tmp.Add("")
tmp
let tmpWidth = Defaults.DefaultWidth
let tmpHeight = Defaults.DefaultHeight
/// <summary>Adds a node to the graph.</summary>
member this.AddNode (node:Node) =
tmpGraphData.addNode (node)
/// <summary>Adds an edge to the graph.</summary>
member this.AddEdge (edge:Edge) =
tmpGraphData.addEdge(edge)
/// <summary>Returns a string representation of the widgets in the graph.</summary>
member this.GetWidgetsAsString () =
tmpWidgets |> Seq.reduce (fun acc x -> acc + x + " ")
/// <summary>Gets or sets the graph data for this SigmaGraph instance.</summary>
member val GraphData = tmpGraphData with get,set
/// <summary>Gets or sets the layout configuration for this SigmaGraph instance.</summary>
member val Layout = tmpLayout with get,set
/// <summary>Gets or sets the rendering settings for this SigmaGraph instance.</summary>
member val Settings = tmpSetting with get,set
/// <summary>Gets or sets the collection of widgets associated with this SigmaGraph instance.</summary>
member val Widgets = tmpWidgets with get,set
/// <summary>Gets or sets the width of the graph visualization.</summary>
member val Width = tmpWidth with get,set
/// <summary>Gets or sets the height of the graph visualization.</summary>
member val Height = tmpHeight with get,set