Package it.unimi.dsi.webgraph
Class ShiftedByOneArcListASCIIGraph
java.lang.Object
it.unimi.dsi.webgraph.ImmutableGraph
it.unimi.dsi.webgraph.ImmutableSequentialGraph
it.unimi.dsi.webgraph.ArcListASCIIGraph
it.unimi.dsi.webgraph.ShiftedByOneArcListASCIIGraph
- All Implemented Interfaces:
it.unimi.dsi.lang.FlyweightPrototype<ImmutableGraph>
An Using
ArcListASCIIGraph with fixed shift -1. Very useful to read
graphs specified as pairs of arcs with node numbering starting from one.
Using ArcListASCIIGraph with MatLab-like sparse matrix files
The main intended usage of this class is that of interfacing easily with MatLab-like
sparse matrix files. Note that for this to happen it is necessary to shift by one all
indices. Assume you have a file named example.arcs:
1 2 2 3 3 2Then, the command
java it.unimi.dsi.webgraph.BVGraph -1 -g ShiftedByOneArcListASCIIGraph dummy bvexample <example.arcswill generate a
BVGraph as expected (e.g, there is an arc from 0 to 1).-
Nested Class Summary
Nested classes/interfaces inherited from class it.unimi.dsi.webgraph.ImmutableGraph
ImmutableGraph.LoadMethod -
Field Summary
Fields inherited from class it.unimi.dsi.webgraph.ImmutableGraph
GRAPHCLASS_PROPERTY_KEY, NUMBER_OF_THREADS_PROPERTY, PROPERTIES_EXTENSION -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ImmutableGraphload(CharSequence basename) static ImmutableGraphload(CharSequence basename, it.unimi.dsi.logging.ProgressLogger unused) static ImmutableGraphloadMapped(CharSequence basename) static ImmutableGraphloadMapped(CharSequence basename, it.unimi.dsi.logging.ProgressLogger unused) static ImmutableGraphloadOffline(CharSequence basename) static ImmutableGraphloadOffline(CharSequence basename, it.unimi.dsi.logging.ProgressLogger unused) static ArcListASCIIGraphloadOnce(InputStream is) static ImmutableGraphloadSequential(CharSequence basename) Deprecated.static ImmutableGraphloadSequential(CharSequence basename, it.unimi.dsi.logging.ProgressLogger unused) Deprecated.static voidstatic voidstore(ImmutableGraph graph, CharSequence basename, it.unimi.dsi.logging.ProgressLogger unused) Methods inherited from class it.unimi.dsi.webgraph.ArcListASCIIGraph
loadOnce, nodeIterator, numNodes, splitNodeIterators, store, storeMethods inherited from class it.unimi.dsi.webgraph.ImmutableSequentialGraph
copy, outdegree, randomAccess, successorArrayMethods inherited from class it.unimi.dsi.webgraph.ImmutableGraph
basename, equals, hasCopiableIterators, hashCode, load, nodeIterator, numArcs, outdegrees, store, store, successors, toString
-
Constructor Details
-
ShiftedByOneArcListASCIIGraph
protected ShiftedByOneArcListASCIIGraph(InputStream is, int shift) throws NumberFormatException, IOException - Throws:
NumberFormatExceptionIOException
-
-
Method Details
-
loadSequential
Deprecated.- Throws:
IOException
-
loadSequential
@Deprecated public static ImmutableGraph loadSequential(CharSequence basename, it.unimi.dsi.logging.ProgressLogger unused) throws IOException Deprecated.- Throws:
IOException
-
loadOffline
- Throws:
IOException
-
loadOffline
public static ImmutableGraph loadOffline(CharSequence basename, it.unimi.dsi.logging.ProgressLogger unused) throws IOException - Throws:
IOException
-
loadMapped
- Throws:
IOException
-
loadMapped
public static ImmutableGraph loadMapped(CharSequence basename, it.unimi.dsi.logging.ProgressLogger unused) throws IOException - Throws:
IOException
-
loadOnce
- Throws:
IOException
-
load
- Throws:
IOException
-
load
public static ImmutableGraph load(CharSequence basename, it.unimi.dsi.logging.ProgressLogger unused) throws IOException - Throws:
IOException
-
store
public static void store(ImmutableGraph graph, CharSequence basename, it.unimi.dsi.logging.ProgressLogger unused) throws IOException - Throws:
IOException
-
main
- Throws:
NoSuchMethodException
-