VizualizerWPF
|
Public Member Functions | |
MainWindow () | |
Vertex? | FindVertexSave (Point center) |
void | ellipse_MouseDown (object sender, RoutedEventArgs e) |
Function to either select vertices. After two are selected then line between them is created. Or to delete vertex and all edges neighbouring with it. More... | |
void | line_MouseDown (object sender, RoutedEventArgs e) |
Function to remove line if clicked on If remove button activated then the edge is removed If Invariant button is activated then invariant edges are counted for this edge More... | |
Data Fields | |
GraphCoordinates | graphCoordinates = new GraphCoordinates() |
double | scale |
double | sizeOfVertex |
Dictionary< StateCalculation, bool > | statesCalculation = new Dictionary<StateCalculation, bool>() |
Protected Member Functions | |
override void | OnMouseLeftButtonDown (MouseButtonEventArgs e) |
Properties | |
int | Smoothing [get] |
Smoothing constant determining the number of iterations of force-directed algorithm More... | |
Private Member Functions | |
void | NumberValidationTextBox (object sender, TextCompositionEventArgs e) |
void | SmoothingChecker (object sender, TextCompositionEventArgs e) |
void | MinMaxValueEdgeChecker (object sender, TextCompositionEventArgs e) |
void | MinMaxValueVertexChecker (object sender, TextCompositionEventArgs e) |
void | InitializeRightValuesOfKedges () |
Function to initialize wanted values More... | |
void | Canvas_Loaded (object sender, RoutedEventArgs e) |
Function to set width and height of canvas due to dynamic setting (at the beggining, it is 0) More... | |
void | MakeAllLinesNotSharp () |
Shortening all edges to redraw uselessly long edges after force-directed algorithm More... | |
void | CreateVerticesFromPoints (GraphCoordinates graphCoordinates) |
Update the vertices to contains only the points after shortening More... | |
void | MakeSmootherAndDraw () |
Subdivide edges, apply force-directed algorithm Smoothing-times, shorten the edges and then draw on canvas More... | |
int | optimalCrossingNumber () |
Get the value of Z(n) More... | |
void | dispatcherTimer_Tick (object sender, EventArgs e) |
void | RedrawGraph (GraphCoordinates graphCoordinates) |
Function to redraw the drawing (when canvas resize) More... | |
void | ResizeWindowEvent (object sender, EventArgs e) |
Function to hangle minimazing and maximazing window More... | |
void | AutoButton_Click (object sender, RoutedEventArgs e) |
Function to change the state of Automoving Button More... | |
void | Adding_Click (object sender, RoutedEventArgs e) |
Function to change the state of Adding Button More... | |
void | Removing_Click (object sender, RoutedEventArgs e) |
Function to change the state of Removing Button More... | |
void | AddingPolyline_Click (object sender, RoutedEventArgs e) |
Function to change the state of AddingPolyline Button More... | |
void | Invariant_Click (object sender, RoutedEventArgs e) |
Function to change the state of Invariant Button More... | |
void | MakeAllVerticesBlue () |
void | RefferenceFace_Click (object sender, RoutedEventArgs e) |
Function to change the state of Face button More... | |
void | Intersections_Click (object sender, RoutedEventArgs e) |
Function to change if intersection are visible or not, intersection can be recognized by green color More... | |
void | SaveDrawing_Click (object sender, RoutedEventArgs e) |
Function to save the current drawing when we click on Save Button More... | |
void | FlushFromBackUpToNormal () |
Function to flush the data when we change to custom file working More... | |
void | NextDrawing_Click (object sender, RoutedEventArgs e) |
Function to generate new drawing of clique from data If value of vertices textbox has changed then new data file is loaded More... | |
void | PreviousDrawing_Click (object sender, RoutedEventArgs e) |
Function to generate previous drawing of clique from data More... | |
Vertex | FindEdgeEnds (Edge edge) |
void | AddIntersectionsWithLines (List< Line > lines) |
Edge | FindEdge (Line line) |
Function to find edge containg line More... | |
void | RemoveIntersections (Line line) |
Function to remove all intersection with line from canvas and coordinates More... | |
void | RemoveIntersectionsAndMiddleOnes (Edge edge) |
void | RecalculateKEdgesAndUpdateButtonTexts (List< Vertex > withouts=null, Edge withoutEdge=null) |
void | UpdateButtonTexts (List< Vertex > withouts, Edge withoutEdge, int[] kEdgesValues, int[] invariantKEdges) |
Function to update buttons values by kEdgesValues and invariantKEdges values depending on invariant state More... | |
void | ZeroInvariantEdgesValues () |
Function to restore values of invariant textblock to zeroes and redraw all lines to non-dashed More... | |
void | PrintAMKEdges (int size, int[,] AMKEdgesArray) |
Function to Print values of AMKEdgesArray to respective textblocks Checking also the 3AMK theorem (a messagebox shows up when something wrong) More... | |
void | UpdateStats () |
Function to coun intersections and to update all other stats regading $k$-edges More... | |
void | canvas_MouseDown (object sender, RoutedEventArgs e) |
Function to add vertex when the place is empty and to detect a change of a reference face More... | |
double | FindClipingSizes (HashSet< Point > points) |
List< Line > | CreateLinesFromPoints (List< Point > points) |
Function to connect consecutive points and get the line segments More... | |
List< Point > | SubDivideLine (Line line, GraphCoordinates graphCoordinates) |
void | SubDivideEdge (Edge edge, GraphCoordinates graphCoordinates) |
Function to subdivide all lines contained in the edge More... | |
void | SubDivideEdges (GraphCoordinates graphCoordinates) |
Function to subdivide all the edges in graphCoordinates More... | |
void | CloseButton_Click (object sender, RoutedEventArgs e) |
void | RestoreButton_Click (object sender, RoutedEventArgs e) |
void | MinimizeButton_Click (object sender, RoutedEventArgs e) |
void | UpdateCanvasWidthWhenClose () |
void | UpdateCanvasWidthWhenOpen () |
void | ButtonOpenMenu_Click (object sender, RoutedEventArgs e) |
void | ButtonCloseMenu_Click (object sender, RoutedEventArgs e) |
void | DrawGraph (GraphCoordinates graphCoordinates, double scale) |
Function to draw a graph even when the canvas is not loaded yet The main difference to ReDraw the graph that here we first create ellipses, lines and so on, because graphCoordinates consists only of Vertices and Edges only containing points after generating More... | |
Private Attributes | |
double | actualHeight = 500 |
Actual Height and Actual Width of canvas due to initialization set manually More... | |
double | actualWidth = 1000 |
Brush[] | colors |
double | cx = 81.25 |
Shift from 0,0 origin Shift from 0,0 origin More... | |
double | cy = 219.75 |
readonly DispatcherTimer | dispatcherTimer = new DispatcherTimer() |
readonly int | divisionConst = 50 |
GraphGenerator | graphGenerator |
It is class for generating all drawings More... | |
List< Vertex > | invariantWithRescpectTo = new List<Vertex>() |
Set of vertices for which we count invariant edges More... | |
readonly double | lambda = 1.1 |
Resizing paramater to get a drawing little bit from borders More... | |
bool | savedGraphs |
Default point determining outer face More... | |
readonly List< Vertex > | selectedCanvasPlaces = new List<Vertex>() |
readonly List< Vertex > | selectedVertices = new List<Vertex>() |
List of vertices forming new edge More... | |
StateAutoMoving | stateAutoMoving = StateAutoMoving.None |
StateChanging | stateChanging = StateChanging.None |
Vertex | |
Function to find ends of edge More... | |
double | |
Function to find appropriate shift and rescaling so all the points fit into the canvas More... | |
List< Line > | |
Function to subdivide line depending on the divisionConstant (line is divided so that every line segment is now shorter than that divisionConstant) More... | |
VizualizerWPF.MainWindow.MainWindow | ( | ) |
|
private |
Function to change the state of Adding Button
sender | |
e |
|
private |
Function to change the state of AddingPolyline Button
sender | |
e |
|
private |
|
private |
Function to change the state of Automoving Button
sender | |
e |
|
private |
|
private |
|
private |
Function to set width and height of canvas due to dynamic setting (at the beggining, it is 0)
sender | |
e |
|
private |
Function to add vertex when the place is empty and to detect a change of a reference face
sender | |
e |
|
private |
|
private |
Function to connect consecutive points and get the line segments
points |
|
private |
Update the vertices to contains only the points after shortening
graphCoordinates |
|
private |
|
private |
Function to draw a graph even when the canvas is not loaded yet The main difference to ReDraw the graph that here we first create ellipses, lines and so on, because graphCoordinates consists only of Vertices and Edges only containing points after generating
graphCoordinates | Class to store graph |
scale |
void VizualizerWPF.MainWindow.ellipse_MouseDown | ( | object | sender, |
RoutedEventArgs | e | ||
) |
Function to either select vertices. After two are selected then line between them is created. Or to delete vertex and all edges neighbouring with it.
sender | |
e |
|
private |
|
private |
Function to find edge containg line
line |
Vertex? VizualizerWPF.MainWindow.FindVertexSave | ( | Point | center | ) |
|
private |
Function to flush the data when we change to custom file working
|
private |
Function to initialize wanted values
|
private |
Function to change if intersection are visible or not, intersection can be recognized by green color
sender | |
e |
|
private |
Function to change the state of Invariant Button
sender | |
e |
void VizualizerWPF.MainWindow.line_MouseDown | ( | object | sender, |
RoutedEventArgs | e | ||
) |
Function to remove line if clicked on If remove button activated then the edge is removed If Invariant button is activated then invariant edges are counted for this edge
sender | |
e |
|
private |
Shortening all edges to redraw uselessly long edges after force-directed algorithm
|
private |
|
private |
Subdivide edges, apply force-directed algorithm Smoothing-times, shorten the edges and then draw on canvas
|
private |
|
private |
|
private |
|
private |
Function to generate new drawing of clique from data If value of vertices textbox has changed then new data file is loaded
sender | |
e |
|
private |
|
protected |
|
private |
Get the value of Z(n)
|
private |
Function to generate previous drawing of clique from data
sender | |
e |
|
private |
Function to Print values of AMKEdgesArray
to respective textblocks Checking also the 3AMK theorem (a messagebox shows up when something wrong)
size | |
AMKEdgesArray |
|
private |
|
private |
Function to redraw the drawing (when canvas resize)
graphCoordinates | To store graph topical |
scale | To know if it is maximized or minimized |
|
private |
Function to change the state of Face button
sender | |
e |
|
private |
Function to remove all intersection with line
from canvas and coordinates
line |
|
private |
|
private |
Function to change the state of Removing Button
sender | |
e |
|
private |
Function to hangle minimazing and maximazing window
sender | |
e |
|
private |
|
private |
Function to save the current drawing when we click on Save Button
sender | |
e |
|
private |
|
private |
Function to subdivide all lines contained in the edge
edge | |
graphCoordinates |
|
private |
Function to subdivide all the edges in graphCoordinates
graphCoordinates |
|
private |
|
private |
Function to update buttons values by kEdgesValues
and invariantKEdges
values depending on invariant state
withouts | |
withoutEdge | |
kEdgesValues | |
invariantKEdges |
|
private |
|
private |
|
private |
Function to coun intersections and to update all other stats regading $k$-edges
|
private |
Function to restore values of invariant textblock to zeroes and redraw all lines to non-dashed
|
private |
Actual Height and Actual Width of canvas due to initialization set manually
|
private |
|
private |
|
private |
Shift from 0,0 origin Shift from 0,0 origin
|
private |
|
private |
|
private |
|
private |
Function to find appropriate shift and rescaling so all the points
fit into the canvas
points |
GraphCoordinates VizualizerWPF.MainWindow.graphCoordinates = new GraphCoordinates() |
|
private |
It is class for generating all drawings
Set of vertices for which we count invariant edges
|
private |
Resizing paramater to get a drawing little bit from borders
|
private |
Function to subdivide line depending on the divisionConstant (line is divided so that every line segment is now shorter than that divisionConstant)
line | |
graphCoordinates |
|
private |
Default point determining outer face
Whether we use custom files at moment.
double VizualizerWPF.MainWindow.scale |
List of vertices forming new edge
double VizualizerWPF.MainWindow.sizeOfVertex |
|
private |
|
private |
Dictionary<StateCalculation, bool> VizualizerWPF.MainWindow.statesCalculation = new Dictionary<StateCalculation, bool>() |
|
private |
Function to find ends of edge
edge |
|
getprivate |
Smoothing constant determining the number of iterations of force-directed algorithm