Class Vertex
- java.lang.Object
-
- org.spectrumauctions.sats.core.model.cats.graphalgorithms.Vertex
-
public class Vertex extends java.lang.ObjectA class for a vertex of the graph.- Author:
- Dmitry Moor
-
-
Constructor Summary
Constructors Constructor Description Vertex(int id)Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddChildVertex(Vertex child)VertexcloneIt()The method returns a deep copy of the object.booleanequals(java.lang.Object other)(non-Javadoc)intgetAdjacencyListIndex()The method returns the index of the associated adjacency listVertexgetChildVertex(int i)intgetColor()The method returns the color of the vertexintgetID()The method returns ID of the vertexintgetNumberOfChilds()intgetPredecessor(int i)The method returns the predecessor of the current vertex in the shortest path tree from some sourcedoublegetShortestPathEst()The method returns the estimation for the shortest path from some source to this vertexdoublegetShortestPathEst(int i)The method returns the estimation for the shortest path from some source to this vertexbooleanisAggregative()voidsetAdjacencyListIndex(int idx)The method setup the index of the adjacency list associated with this vertexvoidsetColor(int color)The method sets the color for the vertexvoidsetPredecessor(int p, int i)The method set up the predecessor of the current vertex in the shortest path tree from some sourcevoidsetShortestPathEst(double d, int i)The method set up the estimation for the shortest path from some source to this vertex
-
-
-
Method Detail
-
cloneIt
public Vertex cloneIt()
The method returns a deep copy of the object.- Returns:
- a deep copy of the class
-
equals
public boolean equals(java.lang.Object other)
(non-Javadoc)- Overrides:
equalsin classjava.lang.Object- See Also:
Object.equals(Object)
-
getID
public int getID()
The method returns ID of the vertex- Returns:
- vertex id
-
getAdjacencyListIndex
public int getAdjacencyListIndex()
The method returns the index of the associated adjacency list- Returns:
- the index of the adjacency list associated with this vertex
-
getShortestPathEst
public double getShortestPathEst(int i)
The method returns the estimation for the shortest path from some source to this vertex- Parameters:
i- - the index of shortest path estimation (there may be several estimations)- Returns:
- the estimation
-
getShortestPathEst
public double getShortestPathEst()
The method returns the estimation for the shortest path from some source to this vertex- Returns:
- the estimation
-
getPredecessor
public int getPredecessor(int i)
The method returns the predecessor of the current vertex in the shortest path tree from some source- Parameters:
i- - the index of the predecessor (there may be several predecessors - each for one tree)- Returns:
- the predecessor
-
getColor
public int getColor()
The method returns the color of the vertex- Returns:
- the color
-
getChildVertex
public Vertex getChildVertex(int i)
- Parameters:
i- index of the child- Returns:
- the child vertex
-
getNumberOfChilds
public int getNumberOfChilds()
-
setAdjacencyListIndex
public void setAdjacencyListIndex(int idx)
The method setup the index of the adjacency list associated with this vertex- Parameters:
idx- - the index of the adjacency list of interest
-
setShortestPathEst
public void setShortestPathEst(double d, int i)The method set up the estimation for the shortest path from some source to this vertex- Parameters:
d- - the estimation
-
setPredecessor
public void setPredecessor(int p, int i)The method set up the predecessor of the current vertex in the shortest path tree from some source
-
setColor
public void setColor(int color)
The method sets the color for the vertex- Parameters:
color- - the value of color to be set
-
addChildVertex
public void addChildVertex(Vertex child)
-
isAggregative
public boolean isAggregative()
-
-