Package it.unimi.dsi.big.webgraph.typed
Class BVImmutableTypedGraph
- java.lang.Object
-
- it.unimi.dsi.big.webgraph.typed.BVImmutableTypedGraph
-
- All Implemented Interfaces:
TypedGraph
,it.unimi.dsi.lang.FlyweightPrototype<BVImmutableTypedGraph>
,java.io.Closeable
,java.lang.AutoCloseable
public class BVImmutableTypedGraph extends java.lang.Object implements TypedGraph, java.io.Closeable, it.unimi.dsi.lang.FlyweightPrototype<BVImmutableTypedGraph>
-
-
Field Summary
-
Fields inherited from interface it.unimi.dsi.big.webgraph.typed.TypedGraph
ID_BITS
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
BVImmutableTypedGraph(ImmutableGraph immutableTypeGraph, long[] numNodes, long[][] numArcs, java.io.RandomAccessFile[] graphRandomAccessFile, it.unimi.dsi.fastutil.longs.LongBigList[] offset)
protected
BVImmutableTypedGraph(ImmutableGraph immutableTypeGraph, long[] numNodes, long[][] numArcs, java.io.RandomAccessFile[] graphRandomAccessFile, it.unimi.dsi.io.ByteBufferInputStream[] graphStream, it.unimi.dsi.fastutil.longs.LongBigList[] offset)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
BVImmutableTypedGraph
copy()
static BVImmutableTypedGraph
load(java.lang.CharSequence basename, java.lang.CharSequence typeBasename, it.unimi.dsi.logging.ProgressLogger pl)
NodeIterator
nodeIterator()
long
numArcs()
long
numNodes()
long
numNodes(int type)
long
outdegree(long node)
LazyLongIterator
successors(long node)
ImmutableGraph
typeGraph()
-
-
-
Constructor Detail
-
BVImmutableTypedGraph
protected BVImmutableTypedGraph(ImmutableGraph immutableTypeGraph, long[] numNodes, long[][] numArcs, java.io.RandomAccessFile[] graphRandomAccessFile, it.unimi.dsi.fastutil.longs.LongBigList[] offset) throws java.io.IOException
- Throws:
java.io.IOException
-
BVImmutableTypedGraph
protected BVImmutableTypedGraph(ImmutableGraph immutableTypeGraph, long[] numNodes, long[][] numArcs, java.io.RandomAccessFile[] graphRandomAccessFile, it.unimi.dsi.io.ByteBufferInputStream[] graphStream, it.unimi.dsi.fastutil.longs.LongBigList[] offset)
-
-
Method Detail
-
close
public void close() throws java.io.IOException
- Specified by:
close
in interfacejava.lang.AutoCloseable
- Specified by:
close
in interfacejava.io.Closeable
- Throws:
java.io.IOException
-
typeGraph
public ImmutableGraph typeGraph()
- Specified by:
typeGraph
in interfaceTypedGraph
-
numNodes
public long numNodes()
- Specified by:
numNodes
in interfaceTypedGraph
-
numNodes
public long numNodes(int type)
- Specified by:
numNodes
in interfaceTypedGraph
-
numArcs
public long numArcs()
- Specified by:
numArcs
in interfaceTypedGraph
-
outdegree
public long outdegree(long node) throws java.io.IOException
- Specified by:
outdegree
in interfaceTypedGraph
- Throws:
java.io.IOException
-
successors
public LazyLongIterator successors(long node) throws java.io.IOException
- Specified by:
successors
in interfaceTypedGraph
- Throws:
java.io.IOException
-
nodeIterator
public NodeIterator nodeIterator()
- Specified by:
nodeIterator
in interfaceTypedGraph
-
load
public static BVImmutableTypedGraph load(java.lang.CharSequence basename, java.lang.CharSequence typeBasename, it.unimi.dsi.logging.ProgressLogger pl) throws java.io.IOException, java.lang.ClassNotFoundException, org.apache.commons.configuration2.ex.ConfigurationException
- Throws:
java.io.IOException
java.lang.ClassNotFoundException
org.apache.commons.configuration2.ex.ConfigurationException
-
copy
public BVImmutableTypedGraph copy()
- Specified by:
copy
in interfaceit.unimi.dsi.lang.FlyweightPrototype<BVImmutableTypedGraph>
-
-