Package org.neo4j.gds.similarity.nil
Class NullGraph
- java.lang.Object
-
- org.neo4j.gds.similarity.nil.NullGraph
-
- All Implemented Interfaces:
org.neo4j.gds.api.BatchNodeIterable,org.neo4j.gds.api.Degrees,org.neo4j.gds.api.Graph,org.neo4j.gds.api.IdMap,org.neo4j.gds.api.NodeIterator,org.neo4j.gds.api.NodePropertyContainer,org.neo4j.gds.api.RelationshipIterator,org.neo4j.gds.api.RelationshipPredicate,org.neo4j.gds.api.RelationshipProperties
public class NullGraph extends java.lang.Object implements org.neo4j.gds.api.GraphThe NullGraph is used for non-product algos that don't use a graph. It makes it a bit easier to adapt those algorithms to the new API, as we can override graph creation and inject a NullGraph.
-
-
Constructor Summary
Constructors Constructor Description NullGraph()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Set<org.neo4j.gds.NodeLabel>availableNodeLabels()java.util.Set<java.lang.String>availableNodeProperties()java.util.Collection<org.neo4j.gds.core.utils.collection.primitive.PrimitiveLongIterable>batchIterables(long batchSize)voidcanRelease(boolean canRelease)org.neo4j.gds.api.GraphconcurrentCopy()booleancontains(long nodeId)intdegree(long nodeId)intdegreeWithoutParallelRelationships(long nodeId)booleanexists(long sourceNodeId, long targetNodeId)voidforEachNode(java.util.function.LongPredicate consumer)voidforEachNodeLabel(long nodeId, org.neo4j.gds.api.IdMap.NodeLabelConsumer consumer)voidforEachRelationship(long nodeId, double fallbackValue, org.neo4j.gds.api.RelationshipWithPropertyConsumer consumer)voidforEachRelationship(long nodeId, org.neo4j.gds.api.RelationshipConsumer consumer)booleanhasLabel(long nodeId, org.neo4j.gds.NodeLabel label)booleanhasRelationshipProperty()longhighestNeoId()booleanisEmpty()booleanisMultiGraph()booleanisUndirected()longnodeCount()org.neo4j.gds.core.utils.collection.primitive.PrimitiveLongIteratornodeIterator()java.util.Set<org.neo4j.gds.NodeLabel>nodeLabels(long nodeId)org.neo4j.gds.api.NodePropertiesnodeProperties(java.lang.String propertyKey)longrelationshipCount()doublerelationshipProperty(long sourceNodeId, long targetNodeId)doublerelationshipProperty(long sourceNodeId, long targetNodeId, double fallbackValue)org.neo4j.gds.api.GraphrelationshipTypeFilteredGraph(java.util.Set<org.neo4j.gds.RelationshipType> relationshipTypes)voidreleaseTopology()org.neo4j.gds.api.IdMaprootIdMap()longrootNodeCount()org.neo4j.gds.api.schema.GraphSchemaschema()java.util.stream.Stream<org.neo4j.gds.api.RelationshipCursor>streamRelationships(long nodeId, double fallbackValue)longtoMappedNodeId(long nodeId)longtoOriginalNodeId(long nodeId)longtoRootNodeId(long nodeId)
-
-
-
Method Detail
-
isEmpty
public boolean isEmpty()
- Specified by:
isEmptyin interfaceorg.neo4j.gds.api.Graph
-
releaseTopology
public void releaseTopology()
- Specified by:
releaseTopologyin interfaceorg.neo4j.gds.api.Graph
-
relationshipCount
public long relationshipCount()
- Specified by:
relationshipCountin interfaceorg.neo4j.gds.api.Graph
-
isUndirected
public boolean isUndirected()
- Specified by:
isUndirectedin interfaceorg.neo4j.gds.api.Graph
-
isMultiGraph
public boolean isMultiGraph()
- Specified by:
isMultiGraphin interfaceorg.neo4j.gds.api.Graph
-
hasRelationshipProperty
public boolean hasRelationshipProperty()
- Specified by:
hasRelationshipPropertyin interfaceorg.neo4j.gds.api.Graph
-
canRelease
public void canRelease(boolean canRelease)
- Specified by:
canReleasein interfaceorg.neo4j.gds.api.Graph
-
concurrentCopy
public org.neo4j.gds.api.Graph concurrentCopy()
- Specified by:
concurrentCopyin interfaceorg.neo4j.gds.api.Graph- Specified by:
concurrentCopyin interfaceorg.neo4j.gds.api.RelationshipIterator
-
batchIterables
public java.util.Collection<org.neo4j.gds.core.utils.collection.primitive.PrimitiveLongIterable> batchIterables(long batchSize)
- Specified by:
batchIterablesin interfaceorg.neo4j.gds.api.BatchNodeIterable
-
degree
public int degree(long nodeId)
- Specified by:
degreein interfaceorg.neo4j.gds.api.Degrees
-
degreeWithoutParallelRelationships
public int degreeWithoutParallelRelationships(long nodeId)
- Specified by:
degreeWithoutParallelRelationshipsin interfaceorg.neo4j.gds.api.Degrees
-
toMappedNodeId
public long toMappedNodeId(long nodeId)
- Specified by:
toMappedNodeIdin interfaceorg.neo4j.gds.api.IdMap
-
toOriginalNodeId
public long toOriginalNodeId(long nodeId)
- Specified by:
toOriginalNodeIdin interfaceorg.neo4j.gds.api.IdMap
-
toRootNodeId
public long toRootNodeId(long nodeId)
- Specified by:
toRootNodeIdin interfaceorg.neo4j.gds.api.IdMap
-
rootIdMap
public org.neo4j.gds.api.IdMap rootIdMap()
- Specified by:
rootIdMapin interfaceorg.neo4j.gds.api.IdMap
-
highestNeoId
public long highestNeoId()
- Specified by:
highestNeoIdin interfaceorg.neo4j.gds.api.IdMap
-
contains
public boolean contains(long nodeId)
- Specified by:
containsin interfaceorg.neo4j.gds.api.IdMap
-
nodeCount
public long nodeCount()
- Specified by:
nodeCountin interfaceorg.neo4j.gds.api.IdMap
-
rootNodeCount
public long rootNodeCount()
- Specified by:
rootNodeCountin interfaceorg.neo4j.gds.api.IdMap
-
forEachNode
public void forEachNode(java.util.function.LongPredicate consumer)
- Specified by:
forEachNodein interfaceorg.neo4j.gds.api.NodeIterator
-
nodeIterator
public org.neo4j.gds.core.utils.collection.primitive.PrimitiveLongIterator nodeIterator()
- Specified by:
nodeIteratorin interfaceorg.neo4j.gds.api.NodeIterator
-
nodeLabels
public java.util.Set<org.neo4j.gds.NodeLabel> nodeLabels(long nodeId)
- Specified by:
nodeLabelsin interfaceorg.neo4j.gds.api.IdMap
-
forEachNodeLabel
public void forEachNodeLabel(long nodeId, org.neo4j.gds.api.IdMap.NodeLabelConsumer consumer)- Specified by:
forEachNodeLabelin interfaceorg.neo4j.gds.api.IdMap
-
availableNodeLabels
public java.util.Set<org.neo4j.gds.NodeLabel> availableNodeLabels()
- Specified by:
availableNodeLabelsin interfaceorg.neo4j.gds.api.IdMap
-
hasLabel
public boolean hasLabel(long nodeId, org.neo4j.gds.NodeLabel label)- Specified by:
hasLabelin interfaceorg.neo4j.gds.api.IdMap
-
schema
public org.neo4j.gds.api.schema.GraphSchema schema()
- Specified by:
schemain interfaceorg.neo4j.gds.api.Graph
-
nodeProperties
public org.neo4j.gds.api.NodeProperties nodeProperties(java.lang.String propertyKey)
- Specified by:
nodePropertiesin interfaceorg.neo4j.gds.api.NodePropertyContainer
-
availableNodeProperties
public java.util.Set<java.lang.String> availableNodeProperties()
- Specified by:
availableNodePropertiesin interfaceorg.neo4j.gds.api.NodePropertyContainer
-
forEachRelationship
public void forEachRelationship(long nodeId, org.neo4j.gds.api.RelationshipConsumer consumer)- Specified by:
forEachRelationshipin interfaceorg.neo4j.gds.api.RelationshipIterator
-
forEachRelationship
public void forEachRelationship(long nodeId, double fallbackValue, org.neo4j.gds.api.RelationshipWithPropertyConsumer consumer)- Specified by:
forEachRelationshipin interfaceorg.neo4j.gds.api.RelationshipIterator
-
streamRelationships
public java.util.stream.Stream<org.neo4j.gds.api.RelationshipCursor> streamRelationships(long nodeId, double fallbackValue)- Specified by:
streamRelationshipsin interfaceorg.neo4j.gds.api.RelationshipIterator
-
relationshipTypeFilteredGraph
public org.neo4j.gds.api.Graph relationshipTypeFilteredGraph(java.util.Set<org.neo4j.gds.RelationshipType> relationshipTypes)
- Specified by:
relationshipTypeFilteredGraphin interfaceorg.neo4j.gds.api.Graph
-
exists
public boolean exists(long sourceNodeId, long targetNodeId)- Specified by:
existsin interfaceorg.neo4j.gds.api.RelationshipPredicate
-
relationshipProperty
public double relationshipProperty(long sourceNodeId, long targetNodeId, double fallbackValue)- Specified by:
relationshipPropertyin interfaceorg.neo4j.gds.api.RelationshipProperties
-
relationshipProperty
public double relationshipProperty(long sourceNodeId, long targetNodeId)- Specified by:
relationshipPropertyin interfaceorg.neo4j.gds.api.RelationshipProperties
-
-