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:
it.unimi.dsi.lang.FlyweightPrototype<ImmutableGraph>
public final class ShiftedByOneArcListASCIIGraph extends ArcListASCIIGraph
AnArcListASCIIGraphwith fixed shift -1. Very useful to read graphs specified as pairs of arcs with node numbering starting from one.Using
ArcListASCIIGraphwith MatLab-like sparse matrix filesThe 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 2
Then, the commandjava it.unimi.dsi.webgraph.BVGraph -1 -g ShiftedByOneArcListASCIIGraph dummy bvexample <example.arcs
will generate aBVGraphas 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
Constructors Modifier Constructor Description protectedShiftedByOneArcListASCIIGraph(java.io.InputStream is, int shift)
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static ImmutableGraphload(java.lang.CharSequence basename)static ImmutableGraphload(java.lang.CharSequence basename, it.unimi.dsi.logging.ProgressLogger unused)static ImmutableGraphloadMapped(java.lang.CharSequence basename)static ImmutableGraphloadMapped(java.lang.CharSequence basename, it.unimi.dsi.logging.ProgressLogger unused)static ImmutableGraphloadOffline(java.lang.CharSequence basename)static ImmutableGraphloadOffline(java.lang.CharSequence basename, it.unimi.dsi.logging.ProgressLogger unused)static ArcListASCIIGraphloadOnce(java.io.InputStream is)static ImmutableGraphloadSequential(java.lang.CharSequence basename)Deprecated.static ImmutableGraphloadSequential(java.lang.CharSequence basename, it.unimi.dsi.logging.ProgressLogger unused)Deprecated.static voidmain(java.lang.String[] arg)static voidstore(ImmutableGraph graph, java.lang.CharSequence basename, it.unimi.dsi.logging.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
-
-
-
-
Method Detail
-
loadSequential
@Deprecated public static ImmutableGraph loadSequential(java.lang.CharSequence basename) throws java.io.IOException
Deprecated.- Throws:
java.io.IOException
-
loadSequential
@Deprecated public static ImmutableGraph loadSequential(java.lang.CharSequence basename, it.unimi.dsi.logging.ProgressLogger unused) throws java.io.IOException
Deprecated.- Throws:
java.io.IOException
-
loadOffline
public static ImmutableGraph loadOffline(java.lang.CharSequence basename) throws java.io.IOException
- Throws:
java.io.IOException
-
loadOffline
public static ImmutableGraph loadOffline(java.lang.CharSequence basename, it.unimi.dsi.logging.ProgressLogger unused) throws java.io.IOException
- Throws:
java.io.IOException
-
loadMapped
public static ImmutableGraph loadMapped(java.lang.CharSequence basename) throws java.io.IOException
- Throws:
java.io.IOException
-
loadMapped
public static ImmutableGraph loadMapped(java.lang.CharSequence basename, it.unimi.dsi.logging.ProgressLogger unused) throws java.io.IOException
- Throws:
java.io.IOException
-
loadOnce
public static ArcListASCIIGraph loadOnce(java.io.InputStream is) throws java.io.IOException
- Throws:
java.io.IOException
-
load
public static ImmutableGraph load(java.lang.CharSequence basename) throws java.io.IOException
- Throws:
java.io.IOException
-
load
public static ImmutableGraph load(java.lang.CharSequence basename, it.unimi.dsi.logging.ProgressLogger unused) throws java.io.IOException
- Throws:
java.io.IOException
-
store
public static void store(ImmutableGraph graph, java.lang.CharSequence basename, it.unimi.dsi.logging.ProgressLogger unused) throws java.io.IOException
- Throws:
java.io.IOException
-
main
public static void main(java.lang.String[] arg) throws java.lang.NoSuchMethodException- Throws:
java.lang.NoSuchMethodException
-
-