helix.graph.algo.c3part.compressor
Class NoCompressor

java.lang.Object
  extended by helix.graph.algo.c3part.compressor.NoCompressor
All Implemented Interfaces:
GraphCompressor, MultiGraphCompressor

public class NoCompressor
extends Object
implements MultiGraphCompressor

A compressor that does nothing


Constructor Summary
NoCompressor()
           
 
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
 RColorSet getColors(Vertex V, Vertex U)
          get proper colors of edge (v, u).
 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
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NoCompressor

public NoCompressor()
Method Detail

subsumes

public boolean subsumes(Vertex v,
                        Vertex u,
                        Graph graph)
Description copied from interface: GraphCompressor
tells if vertex v subsumes vertex u

Specified by:
subsumes in interface GraphCompressor

compressVertex

public void compressVertex(Vertex v,
                           Vertex root,
                           Graph graph)
Description copied from interface: GraphCompressor
compress single vertex v on root vertex

Specified by:
compressVertex in interface GraphCompressor

compress

public void compress(Graph graph)
Description copied from interface: GraphCompressor
compress graph

Specified by:
compress in interface GraphCompressor

compress

public void compress(Graph graph,
                     Logger logger)
Description copied from interface: GraphCompressor
same as compress with logging compression rate

Specified by:
compress in interface GraphCompressor

expandVertex

public void expandVertex(Vertex v,
                         Graph graph)
Description copied from interface: GraphCompressor
restore compressed alias vertex v to its initial state

Specified by:
expandVertex in interface GraphCompressor

expand

public void expand(Graph graph)
Description copied from interface: GraphCompressor
expand graph to its uncompressed (initial) state

Specified by:
expand in interface GraphCompressor

getVertices

public Iterable<Vertex> getVertices(Graph graph)
Description copied from interface: GraphCompressor
return all vertices in compressed graph. for efficiency, vertices should be returned in an ordered way : any root vertex should be immediately followed by it aliases.

Specified by:
getVertices in interface GraphCompressor

nbVertices

public int nbVertices(Graph graph)
Description copied from interface: GraphCompressor
return the number of vertices in graph (including compressed one)

Specified by:
nbVertices in interface GraphCompressor

getNeighbors

public Iterable<Vertex> getNeighbors(Vertex v)
Description copied from interface: GraphCompressor
return neighbors of vertex v, including aliases of neighbors

Specified by:
getNeighbors in interface GraphCompressor

getColors

public RColorSet getColors(Vertex V,
                           Vertex U)
Description copied from interface: MultiGraphCompressor
get proper colors of edge (v, u). return empty colors if there is no edge

Specified by:
getColors in interface MultiGraphCompressor

isAlias

public boolean isAlias(Vertex V)
Description copied from interface: GraphCompressor
tell if vertex is an Alias vertex.

Specified by:
isAlias in interface GraphCompressor

isRoot

public boolean isRoot(Vertex V)
Description copied from interface: GraphCompressor
tell if vertex is a root vertex. i.e. if it owns at least one alias

Specified by:
isRoot in interface GraphCompressor

isNormal

public boolean isNormal(Vertex V)
Description copied from interface: GraphCompressor
tell if vertex is a normal vertex. i.e. neither root nor alias

Specified by:
isNormal in interface GraphCompressor

getRoot

public Vertex getRoot(Vertex V)
Description copied from interface: GraphCompressor
get root of a compressed vertex

Specified by:
getRoot in interface GraphCompressor

getAliases

public Iterable<Vertex> getAliases(Vertex V)
Description copied from interface: GraphCompressor
get aliases of root vertex return empty set if v is not root

Specified by:
getAliases in interface GraphCompressor

flatten

public void flatten(Graph graph)
Description copied from interface: GraphCompressor
expand graph without edges AV TODO temporary placeholder

Specified by:
flatten in interface GraphCompressor

storeSet

public void storeSet(GSet<Vertex> set)
Description copied from interface: GraphCompressor
temporarily stores a set of vertices this is an optional operation

Specified by:
storeSet in interface GraphCompressor

retrieveSet

public GSet<Vertex> retrieveSet()
Description copied from interface: GraphCompressor
retrieve previously stored set this is an optional operation

Specified by:
retrieveSet in interface GraphCompressor

getParamInfo

public String getParamInfo()
Description copied from interface: GraphCompressor
get optional parameters info

Specified by:
getParamInfo in interface GraphCompressor