Class: Pacer::Neo4j::Algo::TraversalBranchWrapper
- Inherits:
-
PathWrapper
- Object
- PathWrapper
- Pacer::Neo4j::Algo::TraversalBranchWrapper
- Defined in:
- lib/pacer-neo4j/algo/traversal_branch_wrapper.rb
Overview
Uses the interface defined here: api.neo4j.org/1.8/org/neo4j/graphdb/traversal/TraversalBranch.html
Note that I have removed methods that I didn’t understand, assuming they are internal.
Instance Attribute Summary
Attributes inherited from PathWrapper
Instance Method Summary collapse
-
#continues? ⇒ Boolean
Returns whether or not the traversal should continue further along this branch.
-
#included? ⇒ Boolean
Returns whether or not this branch (the Path representation of this branch at least) should be included in the result of this traversal, i.e.
- #inspect ⇒ Object
-
#num_expanded ⇒ Object
Returns the number of edges this expansion source has expanded.
-
#parent ⇒ Object
The parent expansion source which created this TraversalBranch.
-
#prune! ⇒ Object
Explicitly tell this branch to be pruned so that consecutive calls to #next() is guaranteed to return null.
- #to_s ⇒ Object
Methods inherited from PathWrapper
#both, #both_e, #both_edges, #both_vertices, #e, #end_e, #end_v, #in, #in_e, #in_edges, #in_vertices, #initialize, #length, #out, #out_e, #out_edges, #out_vertices, #path, #reverse_e, #reverse_v, #start_v, #to_a, #v
Constructor Details
This class inherits a constructor from Pacer::Neo4j::Algo::PathWrapper
Instance Method Details
#continues? ⇒ Boolean
Returns whether or not the traversal should continue further along this branch.
10 11 12 |
# File 'lib/pacer-neo4j/algo/traversal_branch_wrapper.rb', line 10 def continues? raw_path.continues end |
#included? ⇒ Boolean
Returns whether or not this branch (the Path representation of this branch at least) should be included in the result of this traversal, i.e. returned as one of the Paths from f.ex. TraversalDescription.traverse(org.neo4j.graphdb.Node…)
23 24 25 |
# File 'lib/pacer-neo4j/algo/traversal_branch_wrapper.rb', line 23 def included? raw_path.includes end |
#inspect ⇒ Object
41 42 43 |
# File 'lib/pacer-neo4j/algo/traversal_branch_wrapper.rb', line 41 def inspect "#<TBR #{to_s}>" end |
#num_expanded ⇒ Object
Returns the number of edges this expansion source has expanded.
15 16 17 |
# File 'lib/pacer-neo4j/algo/traversal_branch_wrapper.rb', line 15 def raw_path. end |
#parent ⇒ Object
The parent expansion source which created this TraversalBranch.
28 29 30 |
# File 'lib/pacer-neo4j/algo/traversal_branch_wrapper.rb', line 28 def parent TraversalBranchWrapper.new raw_path.parent, graph end |
#prune! ⇒ Object
Explicitly tell this branch to be pruned so that consecutive calls to #next() is guaranteed to return null.
33 34 35 |
# File 'lib/pacer-neo4j/algo/traversal_branch_wrapper.rb', line 33 def prune! raw_path.prune end |
#to_s ⇒ Object
37 38 39 |
# File 'lib/pacer-neo4j/algo/traversal_branch_wrapper.rb', line 37 def to_s "#{super} num_expanded: #{ }#{ continues? ? ' continues' : '' }#{ included? ? ' included' : '' }" end |