|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface GraphCompressor
A graph compressor is used to compress vertices and edges of graphs.
It is based on a compression condition that is expressed by
a subsumption relation S
between vertices.
v S u => u can be removed from graph, u is stored in Alias(v), v is stored as Root(u).
(note that S is either a partial order or an equivalence relation)
The storage allows for further expansion of the graph to its initial state.
Method Summary | |
---|---|
void |
compress(Graph graph)
compress graph |
void |
compress(Graph graph,
Logger logger)
same as compress with logging compression rate |
void |
compressVertex(Vertex v,
Vertex root,
Graph graph)
compress single vertex v on root vertex |
void |
expand(Graph graph)
expand graph to its uncompressed (initial) state |
void |
expandVertex(Vertex v,
Graph graph)
restore compressed alias vertex v to its initial state |
void |
flatten(Graph graph)
expand graph without edges AV TODO temporary placeholder |
Iterable<Vertex> |
getAliases(Vertex v)
get aliases of root vertex return empty set if v is not root |
Iterable<Vertex> |
getNeighbors(Vertex v)
return neighbors of vertex v, including aliases of neighbors |
String |
getParamInfo()
get optional parameters info |
Vertex |
getRoot(Vertex v)
get root of a compressed vertex |
Iterable<Vertex> |
getVertices(Graph graph)
return all vertices in compressed graph. |
boolean |
isAlias(Vertex v)
tell if vertex is an Alias vertex. |
boolean |
isNormal(Vertex v)
tell if vertex is a normal vertex. |
boolean |
isRoot(Vertex v)
tell if vertex is a root vertex. |
int |
nbVertices(Graph graph)
return the number of vertices in graph (including compressed one) |
GSet<Vertex> |
retrieveSet()
retrieve previously stored set this is an optional operation |
void |
storeSet(GSet<Vertex> set)
temporarily stores a set of vertices this is an optional operation |
boolean |
subsumes(Vertex v,
Vertex u,
Graph graph)
tells if vertex v subsumes vertex u |
Method Detail |
---|
boolean subsumes(Vertex v, Vertex u, Graph graph)
void compressVertex(Vertex v, Vertex root, Graph graph)
void compress(Graph graph)
void compress(Graph graph, Logger logger)
compress
with logging compression rate
void expandVertex(Vertex v, Graph graph) throws NotExpandableVertexException
NotExpandableVertexException
void expand(Graph graph)
Iterable<Vertex> getVertices(Graph graph)
int nbVertices(Graph graph)
Iterable<Vertex> getNeighbors(Vertex v)
boolean isAlias(Vertex v)
boolean isRoot(Vertex v)
boolean isNormal(Vertex v)
Vertex getRoot(Vertex v)
Iterable<Vertex> getAliases(Vertex v)
void flatten(Graph graph)
void storeSet(GSet<Vertex> set)
GSet<Vertex> retrieveSet()
String getParamInfo()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |