ConjectureChecker
VizualizerWPF.Vertex Struct Reference

Struct to store vertices

Parameters
ellipseDrawing of vertex
centerCenter of vertex
stateState of vertex

Implementing IEqualityComparer<Vertex>, IEquatable<Vertex> to index HashSet and Dictionary More...

Inheritance diagram for VizualizerWPF.Vertex:

Public Member Functions

 Vertex (Ellipse ellipse, Point point, VertexState state)
 
override bool Equals (object obj)
 
override int GetHashCode ()
 GetHashCode by rounding the coordinates to avoid numerical errors More...
 
override string ToString ()
 
bool Equals (Vertex other)
 
bool Equals (Vertex x, Vertex y)
 
int GetHashCode (Vertex obj)
 

Static Public Member Functions

static bool Compare (Point a, Point b)
 Compare points in both coordinates and consider the same if there both coordinates are the same except for small error 0.0001 More...
 
static bool operator== (Vertex a, Vertex b)
 
static bool operator!= (Vertex a, Vertex b)
 

Public Attributes

Ellipse ellipse
 
Point center
 
VertexState state
 

Detailed Description

Struct to store vertices

Parameters
ellipseDrawing of vertex
centerCenter of vertex
stateState of vertex

Implementing IEqualityComparer<Vertex>, IEquatable<Vertex> to index HashSet and Dictionary

Constructor & Destructor Documentation

◆ Vertex()

VizualizerWPF.Vertex.Vertex ( Ellipse  ellipse,
Point  point,
VertexState  state 
)
inline

Member Function Documentation

◆ Compare()

static bool VizualizerWPF.Vertex.Compare ( Point  a,
Point  b 
)
inlinestatic

Compare points in both coordinates and consider the same if there both coordinates are the same except for small error 0.0001

Parameters
a
b
Returns

◆ Equals() [1/3]

override bool VizualizerWPF.Vertex.Equals ( object  obj)
inline

◆ Equals() [2/3]

bool VizualizerWPF.Vertex.Equals ( Vertex  other)
inline

◆ Equals() [3/3]

bool VizualizerWPF.Vertex.Equals ( Vertex  x,
Vertex  y 
)
inline

◆ GetHashCode() [1/2]

override int VizualizerWPF.Vertex.GetHashCode ( )
inline

GetHashCode by rounding the coordinates to avoid numerical errors

Returns

◆ GetHashCode() [2/2]

int VizualizerWPF.Vertex.GetHashCode ( Vertex  obj)
inline

◆ operator!=()

static bool VizualizerWPF.Vertex.operator!= ( Vertex  a,
Vertex  b 
)
inlinestatic

◆ operator==()

static bool VizualizerWPF.Vertex.operator== ( Vertex  a,
Vertex  b 
)
inlinestatic

◆ ToString()

override string VizualizerWPF.Vertex.ToString ( )
inline

Member Data Documentation

◆ center

Point VizualizerWPF.Vertex.center

◆ ellipse

Ellipse VizualizerWPF.Vertex.ellipse

◆ state

VertexState VizualizerWPF.Vertex.state

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