Package it.unimi.dsi.webgraph
Class DegreeRangeImmutableSubgraph
java.lang.Object
it.unimi.dsi.webgraph.ImmutableGraph
it.unimi.dsi.webgraph.ImmutableSubgraph
it.unimi.dsi.webgraph.DegreeRangeImmutableSubgraph
- All Implemented Interfaces:
it.unimi.dsi.lang.FlyweightPrototype<ImmutableGraph>
A subclass of
ImmutableSubgraph
exposing the subgraph formed by nodes whose outdegree is in a given range.
Note that the string-based constructors can be
used with an ObjectParser
to specify a graph on the command line.
-
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.ImmutableSubgraph
basename, subgraphNode, SUBGRAPHNODES_PROPERTY_KEY, subgraphSize, supergraph, supergraphAsSubgraph, SUPERGRAPHBASENAME_PROPERTY_KEY, supergraphNode, supergraphNumNodes
Fields inherited from class it.unimi.dsi.webgraph.ImmutableGraph
GRAPHCLASS_PROPERTY_KEY, NUMBER_OF_THREADS_PROPERTY, PROPERTIES_EXTENSION
-
Constructor Summary
ConstructorsConstructorDescriptionDegreeRangeImmutableSubgraph
(ImmutableGraph graph, int minDegree, int maxDegree) Create a subgraph formed by the nodes with outdegree in a specified range.DegreeRangeImmutableSubgraph
(String graph, String minDegree, String maxDegree) Create a subgraph formed by the nodes with outdegree in a specified range.DegreeRangeImmutableSubgraph
(String graph, String minDegree, String maxDegree, String mapped) Create a subgraph formed by the nodes with outdegree in a specified range. -
Method Summary
Modifier and TypeMethodDescriptionprotected static int[]
createMap
(ImmutableGraph graph, int minDegree, int maxDegree) Methods inherited from class it.unimi.dsi.webgraph.ImmutableSubgraph
asImmutableSubgraph, basename, copy, fromRootNode, fromSupergraphNode, hasCopiableIterators, load, load, load, loadMapped, loadMapped, loadOffline, loadOffline, loadSequential, loadSequential, main, nodeIterator, numArcs, numNodes, outdegree, outdegree, randomAccess, rootBasename, save, save, store, store, successors, toRootNode, toSupergraphNode
Methods inherited from class it.unimi.dsi.webgraph.ImmutableGraph
equals, hashCode, load, loadOnce, nodeIterator, outdegrees, splitNodeIterators, store, store, successorArray, toString
-
Constructor Details
-
DegreeRangeImmutableSubgraph
Create a subgraph formed by the nodes with outdegree in a specified range.- Parameters:
graph
- the supergraph.minDegree
- the minimum outdegree (inclusive).maxDegree
- the maximum outdegree (exclusive).
-
DegreeRangeImmutableSubgraph
public DegreeRangeImmutableSubgraph(String graph, String minDegree, String maxDegree) throws IOException Create a subgraph formed by the nodes with outdegree in a specified range.This is a string-based constructor that can be used with an
ObjectParser
.- Parameters:
graph
- the supergraph.minDegree
- the minimum outdegree (inclusive).maxDegree
- the meximum outdegree (exclusive).- Throws:
IOException
-
DegreeRangeImmutableSubgraph
public DegreeRangeImmutableSubgraph(String graph, String minDegree, String maxDegree, String mapped) throws IOException Create a subgraph formed by the nodes with outdegree in a specified range.This is a string-based constructor that can be used with an
ObjectParser
.- Parameters:
graph
- the supergraph.minDegree
- the minimum outdegree (inclusive).maxDegree
- the maximum outdegree (exclusive).mapped
- if true, the supergraph will be loaded withImmutableGraph.loadMapped(CharSequence, it.unimi.dsi.logging.ProgressLogger)
instead ofImmutableGraph.load(CharSequence, it.unimi.dsi.logging.ProgressLogger)
.- Throws:
IOException
-
-
Method Details
-
createMap
-