VizualizerWPF
VizualizerWPF.ForceDirectedAlgorithms Class Reference

Class to apply (iteratively) force-directed algorithm. More...

Static Public Member Functions

static void Init (MainWindow mainWindow2)
 
static Vector Min (Vector vector1, Vector vector2)
 Function to get smaller vector. More...
 
static Vector CountAttractionForce (Point a, Point b)
 Get attraction force of b when a is fixed. More...
 
static Vector CountRepulsionForce (Point a, Point b)
 Get repulsion force of b when a is fixed. More...
 
static Vector CountRepulsionEdgeForce (Point v, Point a, Point b)
 Get repulsion force of <v>c</v> with edge determined by a and b fixed. More...
 
static Point CountForceInnerVertex (Point v, HashSet< Point > neighbors, HashSet< Point > vertices, List< Edge > edges, Dictionary< Point, double[]> Rs)
 Function to count and add forces to vertex v. More...
 
static GraphCoordinates CountAndMoveByForces (GraphCoordinates graphCoordinates)
 Apply force-directed algorithm to all vertices on canvas. More...
 

Static Private Member Functions

static Vertex FindVertex (GraphCoordinates graphCoordinates, Point center)
 
static HashSet< Point > FindNeighbors (GraphCoordinates graphCoordinates, Vertex vertex)
 Get all opposite point to vertex in graphCoordinates More...
 
static double Determinant (Vector a, Vector b)
 
static bool IsAcute (Vector first, Vector second)
 
static bool IsBetween (Vector first, Vector second, Vector middle)
 Function to detect if the midlle vector is between (the smaller part) determined by first and second. More...
 
static double Distance (Point a, Point b)
 
static Point Projection (Point v, Point a, Point b)
 Get projection of v on the line determined by a and b. More...
 
static void CountRadii (HashSet< Point > vertices, List< Edge > edges, Dictionary< Point, double[]> Rs)
 Function to count the radii of zones to preserve the crossing properties. More...
 

Static Private Attributes

static readonly double gamma = 3
 
static readonly double delta = 20
 The desider length of all edges More...
 
static readonly int INF = 1000
 Maximal force we want to apply More...
 
static readonly Point origin = new Point(0, 0)
 
static MainWindow mainWindow
 
static readonly Vector[] RegionVectors
 Vectors of borders of zones More...
 

Detailed Description

Class to apply (iteratively) force-directed algorithm.

Member Function Documentation

◆ CountAndMoveByForces()

static GraphCoordinates VizualizerWPF.ForceDirectedAlgorithms.CountAndMoveByForces ( GraphCoordinates  graphCoordinates)
static

Apply force-directed algorithm to all vertices on canvas.

Parameters
graphCoordinates
Returns

◆ CountAttractionForce()

static Vector VizualizerWPF.ForceDirectedAlgorithms.CountAttractionForce ( Point  a,
Point  b 
)
static

Get attraction force of b when a is fixed.

Parameters
a
b
Returns

◆ CountForceInnerVertex()

static Point VizualizerWPF.ForceDirectedAlgorithms.CountForceInnerVertex ( Point  v,
HashSet< Point >  neighbors,
HashSet< Point >  vertices,
List< Edge edges,
Dictionary< Point, double[]>  Rs 
)
static

Function to count and add forces to vertex v.

Parameters
v
neighbors
vertices
edges
Rs
Returns

◆ CountRadii()

static void VizualizerWPF.ForceDirectedAlgorithms.CountRadii ( HashSet< Point >  vertices,
List< Edge edges,
Dictionary< Point, double[]>  Rs 
)
staticprivate

Function to count the radii of zones to preserve the crossing properties.

Parameters
vertices
edges
Rs

◆ CountRepulsionEdgeForce()

static Vector VizualizerWPF.ForceDirectedAlgorithms.CountRepulsionEdgeForce ( Point  v,
Point  a,
Point  b 
)
static

Get repulsion force of <v>c</v> with edge determined by a and b fixed.

Parameters
v
a
b
Returns

◆ CountRepulsionForce()

static Vector VizualizerWPF.ForceDirectedAlgorithms.CountRepulsionForce ( Point  a,
Point  b 
)
static

Get repulsion force of b when a is fixed.

Parameters
a
b
Returns

◆ Determinant()

static double VizualizerWPF.ForceDirectedAlgorithms.Determinant ( Vector  a,
Vector  b 
)
staticprivate

◆ Distance()

static double VizualizerWPF.ForceDirectedAlgorithms.Distance ( Point  a,
Point  b 
)
staticprivate

◆ FindNeighbors()

static HashSet<Point> VizualizerWPF.ForceDirectedAlgorithms.FindNeighbors ( GraphCoordinates  graphCoordinates,
Vertex  vertex 
)
staticprivate

Get all opposite point to vertex in graphCoordinates

Parameters
graphCoordinates
vertex
Returns

◆ FindVertex()

static Vertex VizualizerWPF.ForceDirectedAlgorithms.FindVertex ( GraphCoordinates  graphCoordinates,
Point  center 
)
staticprivate

◆ Init()

static void VizualizerWPF.ForceDirectedAlgorithms.Init ( MainWindow  mainWindow2)
static

◆ IsAcute()

static bool VizualizerWPF.ForceDirectedAlgorithms.IsAcute ( Vector  first,
Vector  second 
)
staticprivate

◆ IsBetween()

static bool VizualizerWPF.ForceDirectedAlgorithms.IsBetween ( Vector  first,
Vector  second,
Vector  middle 
)
staticprivate

Function to detect if the midlle vector is between (the smaller part) determined by first and second.

Parameters
first
second
middle
Returns

◆ Min()

static Vector VizualizerWPF.ForceDirectedAlgorithms.Min ( Vector  vector1,
Vector  vector2 
)
static

Function to get smaller vector.

Parameters
vector1
vector2
Returns

◆ Projection()

static Point VizualizerWPF.ForceDirectedAlgorithms.Projection ( Point  v,
Point  a,
Point  b 
)
staticprivate

Get projection of v on the line determined by a and b.

Parameters
v
a
b
Returns

Field Documentation

◆ delta

readonly double VizualizerWPF.ForceDirectedAlgorithms.delta = 20
staticprivate

The desider length of all edges

◆ gamma

readonly double VizualizerWPF.ForceDirectedAlgorithms.gamma = 3
staticprivate

◆ INF

readonly int VizualizerWPF.ForceDirectedAlgorithms.INF = 1000
staticprivate

Maximal force we want to apply

◆ mainWindow

MainWindow VizualizerWPF.ForceDirectedAlgorithms.mainWindow
staticprivate

◆ origin

readonly Point VizualizerWPF.ForceDirectedAlgorithms.origin = new Point(0, 0)
staticprivate

◆ RegionVectors

readonly Vector [] VizualizerWPF.ForceDirectedAlgorithms.RegionVectors
staticprivate
Initial value:
=
{
new Vector(10, 0),
new Vector(10, 10),
new Vector(0, 10),
new Vector(-10, 10),
new Vector(-10, 0),
new Vector(-10, -10),
new Vector(0, -10),
new Vector(10, -10)
}

Vectors of borders of zones


The documentation for this class was generated from the following file: