Package org.neo4j.gds.api
Interface Graph
-
- All Superinterfaces:
BatchNodeIterable
,Degrees
,IdMap
,NodeIterator
,NodePropertyContainer
,PartialIdMap
,RelationshipIterator
,RelationshipPredicate
,RelationshipProperties
- All Known Subinterfaces:
CSRGraph
- All Known Implementing Classes:
CSRGraphAdapter
,GraphAdapter
,HugeGraph
,NodeFilteredGraph
,UnionGraph
public interface Graph extends IdMap, NodePropertyContainer, Degrees, RelationshipIterator, RelationshipProperties
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.neo4j.gds.api.BatchNodeIterable
BatchNodeIterable.BitSetIdIterator, BatchNodeIterable.IdIterable, BatchNodeIterable.IdIterator
-
Nested classes/interfaces inherited from interface org.neo4j.gds.api.IdMap
IdMap.NodeLabelConsumer
-
-
Field Summary
-
Fields inherited from interface org.neo4j.gds.api.IdMap
NOT_FOUND, START_NODE_ID
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description java.util.Optional<NodeFilteredGraph>
asNodeFilteredGraph()
If this graph is created using a node label filter, this will return a NodeFilteredGraph that represents the node set used in this graph.void
canRelease(boolean canRelease)
Graph
concurrentCopy()
boolean
hasRelationshipProperty()
default boolean
isEmpty()
boolean
isMultiGraph()
Whether the graph is guaranteed to have no parallel relationships.long
relationshipCount()
Graph
relationshipTypeFilteredGraph(java.util.Set<org.neo4j.gds.RelationshipType> relationshipTypes)
default void
release()
Release all resources which are not part of the result or IdMapdefault void
releaseProperties()
Release only the properties associated with that graph.default void
releaseTopology()
Release only the topological data associated with that graph.org.neo4j.gds.api.schema.GraphSchema
schema()
-
Methods inherited from interface org.neo4j.gds.api.BatchNodeIterable
batchIterables
-
Methods inherited from interface org.neo4j.gds.api.Degrees
degree, degreeWithoutParallelRelationships
-
Methods inherited from interface org.neo4j.gds.api.IdMap
availableNodeLabels, contains, forEachNodeLabel, hasLabel, highestNeoId, nodeCount, nodeLabels, rootIdMap, safeToMappedNodeId, toOriginalNodeId, toRootNodeId, withFilteredLabels
-
Methods inherited from interface org.neo4j.gds.api.NodeIterator
forEachNode, nodeIterator, nodeIterator
-
Methods inherited from interface org.neo4j.gds.api.properties.nodes.NodePropertyContainer
availableNodeProperties, nodeProperties
-
Methods inherited from interface org.neo4j.gds.api.PartialIdMap
rootNodeCount, toMappedNodeId
-
Methods inherited from interface org.neo4j.gds.api.RelationshipIterator
forEachRelationship, forEachRelationship, streamRelationships
-
Methods inherited from interface org.neo4j.gds.api.RelationshipPredicate
exists
-
Methods inherited from interface org.neo4j.gds.api.RelationshipProperties
relationshipProperty, relationshipProperty
-
-
-
-
Method Detail
-
schema
org.neo4j.gds.api.schema.GraphSchema schema()
-
isEmpty
default boolean isEmpty()
-
relationshipCount
long relationshipCount()
- Returns:
- returns the total number of relationships in the graph.
-
release
default void release()
Release all resources which are not part of the result or IdMap
-
releaseTopology
default void releaseTopology()
Release only the topological data associated with that graph.
-
releaseProperties
default void releaseProperties()
Release only the properties associated with that graph.
-
isMultiGraph
boolean isMultiGraph()
Whether the graph is guaranteed to have no parallel relationships. If this returnsfalse
it still may be parallel-free, but we do not know.- Returns:
true
iff the graph has maximum one relationship between each pair of nodes.
-
relationshipTypeFilteredGraph
Graph relationshipTypeFilteredGraph(java.util.Set<org.neo4j.gds.RelationshipType> relationshipTypes)
-
hasRelationshipProperty
boolean hasRelationshipProperty()
-
canRelease
void canRelease(boolean canRelease)
-
concurrentCopy
Graph concurrentCopy()
- Specified by:
concurrentCopy
in interfaceRelationshipIterator
- Returns:
- a copy of this iterator that reuses new cursors internally, so that iterations happen independent from other iterations.
-
asNodeFilteredGraph
java.util.Optional<NodeFilteredGraph> asNodeFilteredGraph()
If this graph is created using a node label filter, this will return a NodeFilteredGraph that represents the node set used in this graph. Be aware that it is not guaranteed to contain all relationships of the graph. Otherwise, it will return an empty Optional.
-
-