|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectgr.demokritos.iit.jinsect.structs.EdgeCachedLocator
public class EdgeCachedLocator
Constructor Summary | |
---|---|
EdgeCachedLocator(int iCacheMaxSize)
Creates a new instance of EdgeCachedLocator, concerning a specific graph. |
Method Summary | |
---|---|
void |
addedEdge(salvo.jesus.graph.Edge e)
Updates cache as needed, if the edges of any vertex already contained within the cache are changed. |
java.util.List |
getOutgoingEdges(UniqueVertexGraph gGraph,
salvo.jesus.graph.Vertex vHead)
Gets the outgoing edges of a given vertex in a directed graph. |
protected java.util.List |
getOutgoingEdgesUncached(UniqueVertexGraph gGraph,
salvo.jesus.graph.Vertex vHead)
Uncached outgoing edge lookup. |
double |
getSuccessRatio()
Returns the success ratio of the cache. |
salvo.jesus.graph.Edge |
locateDirectedEdgeInGraph(UniqueVertexGraph gGraph,
salvo.jesus.graph.Vertex vHead,
salvo.jesus.graph.Vertex vTail)
Looks up a given directed edge in a selected graph. |
salvo.jesus.graph.Edge |
locateEdgeInGraph(UniqueVertexGraph gGraph,
salvo.jesus.graph.Vertex vHead,
salvo.jesus.graph.Vertex vTail)
Looks up a given (undirected) edge in a selected graph. |
salvo.jesus.graph.Vertex |
locateVertexInGraph(UniqueVertexGraph gGraph,
salvo.jesus.graph.Vertex vToFind)
Looks up a vertex in a given graph. |
void |
resetCache()
Clears the cache. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public EdgeCachedLocator(int iCacheMaxSize)
iCacheMaxSize
- The maximum number of edges to cache.Method Detail |
---|
public final salvo.jesus.graph.Edge locateDirectedEdgeInGraph(UniqueVertexGraph gGraph, salvo.jesus.graph.Vertex vHead, salvo.jesus.graph.Vertex vTail)
gGraph
- The graph to use.vHead
- A vertex with the desired label for the head of the edge.vTail
- A vertex with the desired label for the tail of the edge.
public final salvo.jesus.graph.Vertex locateVertexInGraph(UniqueVertexGraph gGraph, salvo.jesus.graph.Vertex vToFind)
gGraph
- The graph to use.vToFind
- The vertex to locate.
public final salvo.jesus.graph.Edge locateEdgeInGraph(UniqueVertexGraph gGraph, salvo.jesus.graph.Vertex vHead, salvo.jesus.graph.Vertex vTail)
gGraph
- The graph to use.vHead
- A vertex with the desired label for the head or tail of the edge.vTail
- A vertex with the desired label for the tail or tail of the edge.
public final java.util.List getOutgoingEdges(UniqueVertexGraph gGraph, salvo.jesus.graph.Vertex vHead)
gGraph
- The graph to use.vHead
- A vertex with the desired label for the head of the edge.
vHead
. If no such edges exist returns an
empty list.public void resetCache()
public void addedEdge(salvo.jesus.graph.Edge e)
e
- The new edge.public double getSuccessRatio()
protected java.util.List getOutgoingEdgesUncached(UniqueVertexGraph gGraph, salvo.jesus.graph.Vertex vHead)
gGraph
- The graph to use.vHead
- A vertex with the desired label for the head of the edge.
vHead
. If no such edges exist returns an
empty list.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |