public class Vertex extends Object
Constructor and Description |
---|
Vertex()
Create empty vertex.
|
Modifier and Type | Method and Description |
---|---|
void |
addPoint(Point p)
Add point to the vertex.
|
Vertex |
cloneUnconnected()
Clones the Vertex disconnected from its
Graph |
ArrayList<Edge> |
getBranches()
Get branch list.
|
ArrayList<Point> |
getPoints()
Get list of points.
|
Edge |
getPredecessor()
Get predecessor edge.
|
int |
getVisitOrder()
Get DFS visit order.
|
boolean |
isVertexPoint(Point p)
Check if a point belongs to the vertex list of points.
|
boolean |
isVisited()
Check visit status.
|
String |
pointsToString()
Convert list of points to String.
|
void |
setBranch(Edge e)
Add a new branch to the vertex.
|
void |
setPredecessor(Edge pred)
Set predecessor (for DFS).
|
void |
setVisited(boolean b)
Set vertex as visited or not.
|
void |
setVisited(boolean b,
int visitOrder)
Set vertex as visited or not.
|
public void addPoint(Point p)
p
- input pointpublic boolean isVertexPoint(Point p)
p
- input pointspublic String pointsToString()
public void setBranch(Edge e)
e
- neighbor edgepublic void setVisited(boolean b)
b
- boolean flagpublic void setVisited(boolean b, int visitOrder)
b
- boolean flagpublic boolean isVisited()
public void setPredecessor(Edge pred)
pred
- predecessor edge in DFS visit.public Edge getPredecessor()
public int getVisitOrder()
Copyright © 2015–2021 Fiji. All rights reserved.