|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecthelix.graph.algo.c3part.compressor.AbstractCompressor
public abstract class AbstractCompressor
A basic skeleton for compressors with default implementations.
You mostly have to implement the two methods:
subsume(v, u) : tells if v S u
restore(u) : restore the compressed vertex u to its initial state
Constructor Summary | |
---|---|
AbstractCompressor()
|
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 root |
void |
expand(Graph graph)
expand graph to its uncompressed state |
void |
flatten(Graph graph)
expand graph without edges |
Iterable<Vertex> |
getAliases(Vertex v)
get aliases of root vertex |
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 (i.e. |
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 a copy of previously stored set optional operation |
void |
storeSet(GSet<Vertex> set)
temporarily stores a copy of set of vertices optional operation |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface helix.graph.algo.c3part.compressor.GraphCompressor |
---|
expandVertex, subsumes |
Constructor Detail |
---|
public AbstractCompressor()
Method Detail |
---|
public void compressVertex(Vertex v, Vertex root, Graph graph)
compressVertex
in interface GraphCompressor
public void compress(Graph graph)
compress
in interface GraphCompressor
public void compress(Graph graph, Logger logger)
compress
with logging compression rate
compress
in interface GraphCompressor
public void expand(Graph graph)
expand
in interface GraphCompressor
public Iterable<Vertex> getVertices(Graph graph)
getVertices
in interface GraphCompressor
public int nbVertices(Graph graph)
nbVertices
in interface GraphCompressor
public Iterable<Vertex> getNeighbors(Vertex v)
getNeighbors
in interface GraphCompressor
public boolean isAlias(Vertex v)
isAlias
in interface GraphCompressor
public boolean isRoot(Vertex v)
isRoot
in interface GraphCompressor
public boolean isNormal(Vertex v)
isNormal
in interface GraphCompressor
public Vertex getRoot(Vertex v)
getRoot
in interface GraphCompressor
public Iterable<Vertex> getAliases(Vertex v)
getAliases
in interface GraphCompressor
public void flatten(Graph graph)
flatten
in interface GraphCompressor
public void storeSet(GSet<Vertex> set)
storeSet
in interface GraphCompressor
public GSet<Vertex> retrieveSet()
retrieveSet
in interface GraphCompressor
public String getParamInfo()
getParamInfo
in interface GraphCompressor
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |