Package it.unimi.dsi.big.webgraph.typed
Interface TypedGraph
-
- All Known Implementing Classes:
BVImmutableTypedGraph
public interface TypedGraphA graph with typed nodes. Every node in a typed graph is identified by a long in which the upper bits store the type (at most 248 types are allowed) and the lower bits store the id within the type (at most 248 ids are allowed). The methodsnode(int, long),type(long)andid(long)make conversions easy.
-
-
Field Summary
Fields Modifier and Type Field Description static intID_BITS
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description static longid(long node)static longnode(int type, long id)NodeIteratornodeIterator()longnumArcs()longnumNodes()longnumNodes(int type)longoutdegree(long node)LazyLongIteratorsuccessors(long node)static inttype(long node)ImmutableGraphtypeGraph()
-
-
-
Field Detail
-
ID_BITS
static final int ID_BITS
- See Also:
- Constant Field Values
-
-
Method Detail
-
typeGraph
ImmutableGraph typeGraph()
-
numNodes
long numNodes()
-
numNodes
long numNodes(int type)
-
numArcs
long numArcs()
-
outdegree
long outdegree(long node) throws java.io.IOException- Throws:
java.io.IOException
-
successors
LazyLongIterator successors(long node) throws java.io.IOException
- Throws:
java.io.IOException
-
nodeIterator
NodeIterator nodeIterator()
-
type
static int type(long node)
-
id
static long id(long node)
-
node
static long node(int type, long id)
-
-