Package it.unimi.dsi.big.webgraph.typed
Interface TypedGraph
-
- All Known Implementing Classes:
BVImmutableTypedGraph
public interface TypedGraph
A 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 int
ID_BITS
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description static long
id(long node)
static long
node(int type, long id)
NodeIterator
nodeIterator()
long
numArcs()
long
numNodes()
long
numNodes(int type)
long
outdegree(long node)
LazyLongIterator
successors(long node)
static int
type(long node)
ImmutableGraph
typeGraph()
-
-
-
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)
-
-