Package it.unimi.dsi.big.webgraph
Class ShiftedByOneArcListASCIIGraph
java.lang.Object
it.unimi.dsi.big.webgraph.ImmutableGraph
it.unimi.dsi.big.webgraph.ImmutableSequentialGraph
it.unimi.dsi.big.webgraph.ArcListASCIIGraph
it.unimi.dsi.big.webgraph.ShiftedByOneArcListASCIIGraph
- All Implemented Interfaces:
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.big.webgraph.ImmutableGraph
ImmutableGraph.LoadMethod
-
Field Summary
Fields inherited from class it.unimi.dsi.big.webgraph.ImmutableGraph
GRAPHCLASS_PROPERTY_KEY, NUMBER_OF_THREADS_PROPERTY, PROPERTIES_EXTENSION
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic ImmutableGraph
load
(CharSequence basename) static ImmutableGraph
load
(CharSequence basename, ProgressLogger unused) static ImmutableGraph
loadMapped
(CharSequence basename) static ImmutableGraph
loadMapped
(CharSequence basename, ProgressLogger unused) static ImmutableGraph
loadOffline
(CharSequence basename) static ImmutableGraph
loadOffline
(CharSequence basename, ProgressLogger unused) static ArcListASCIIGraph
loadOnce
(InputStream is) static ImmutableGraph
loadSequential
(CharSequence basename) Deprecated.static ImmutableGraph
loadSequential
(CharSequence basename, ProgressLogger unused) Deprecated.static void
static void
store
(ImmutableGraph graph, CharSequence basename, ProgressLogger unused) Methods inherited from class it.unimi.dsi.big.webgraph.ArcListASCIIGraph
loadOnce, nodeIterator, numNodes, store, store
Methods inherited from class it.unimi.dsi.big.webgraph.ImmutableSequentialGraph
copy, outdegree, randomAccess, successorBigArray
Methods inherited from class it.unimi.dsi.big.webgraph.ImmutableGraph
basename, equals, hasCopiableIterators, hashCode, intNumNodes, load, nodeIterator, numArcs, outdegrees, splitNodeIterators, store, store, successors, toString, wrap, wrap
-
Constructor Details
-
ShiftedByOneArcListASCIIGraph
protected ShiftedByOneArcListASCIIGraph(InputStream is, int shift) throws NumberFormatException, IOException - Throws:
NumberFormatException
IOException
-
-
Method Details
-
loadSequential
Deprecated.- Throws:
IOException
-
loadSequential
@Deprecated public static ImmutableGraph loadSequential(CharSequence basename, ProgressLogger unused) throws IOException Deprecated.- Throws:
IOException
-
loadOffline
- Throws:
IOException
-
loadOffline
public static ImmutableGraph loadOffline(CharSequence basename, ProgressLogger unused) throws IOException - Throws:
IOException
-
loadMapped
- Throws:
IOException
-
loadMapped
public static ImmutableGraph loadMapped(CharSequence basename, ProgressLogger unused) throws IOException - Throws:
IOException
-
loadOnce
- Throws:
IOException
-
load
- Throws:
IOException
-
load
- Throws:
IOException
-
store
public static void store(ImmutableGraph graph, CharSequence basename, ProgressLogger unused) throws IOException - Throws:
IOException
-
main
- Throws:
NoSuchMethodException
-