-
Notifications
You must be signed in to change notification settings - Fork 27
Expand file tree
/
Copy pathNode.java
More file actions
42 lines (36 loc) · 1.04 KB
/
Node.java
File metadata and controls
42 lines (36 loc) · 1.04 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
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package fxsimulator;
import java.util.ArrayList;
import java.util.List;
/**
*
* @author sowme
*/
public class Node implements Comparable<Node> {
public String name;
public List<Edge> adjacents = new ArrayList<Edge>();
public List<Edge> revAdjacents = new ArrayList<Edge>();
public Node previous;
public CanvasController.NodeFX circle;
public double minDistance = Double.POSITIVE_INFINITY;
public boolean visited, isArticulationPoint;
public int visitTime = 0, lowTime = 0;
public int DAGColor;
public Node(String argName) {
name = argName;
visited = false;
}
public Node(String argName, CanvasController.NodeFX c) {
name = argName;
circle = c;
visited = false;
}
@Override
public int compareTo(Node o) {
return Double.compare(minDistance, o.minDistance);
}
}