Module: RDF::AllegroGraph::Functors::SnaFunctors
 Included in:
 Query
 Defined in:
 lib/rdf/allegro_graph/functors/sna_functors.rb
Overview
This module contains AllegroGraph functor definitions that may be called when building a query. Note that these functors merely add a functor expression to a query. The actual functor will be called on the server.
Paths Through the Graph collapse

#bidirectional_search_paths(from, to, generator, path, options = {})
Search for paths between two nodes following the edges specified by generator, and using a bidirectional search strategy.

#breadth_first_search_paths(from, to, generator, path, options = {})
Search for paths between two nodes following the edges specified by generator, and using a breadthfirst search strategy.

#depth_first_search_paths(from, to, generator, path, options = {})
Search for paths between two nodes following the edges specified by generator, and using a depthfirst search strategy.
Nearby Nodes collapse

#ego_group(actor, depth, generator, group)
Generate an actor's ego group.

#ego_group_member(actor, depth, generator, member)
Generate all members of an actor's ego group.

#neighbor_count(actor, generator, count)
(also: #nodal_degree)
Count the neighbors of the actor.

#neighbors(actor, generator, neighbor)
(also: #nodal_neighbors)
Find all neighbors of the actor.
Instance Method Details
#bidirectional_search_paths(from, to, generator, path, options = {})
This method returns an undefined value.
Search for paths between two nodes following the edges specified by generator, and using a bidirectional search strategy.
70 71 72 73 
# File 'lib/rdf/allegro_graph/functors/sna_functors.rb', line 70 def bidirectional_search_paths(from, to, generator, path, ={}) search_paths('bidirectionalsearchpaths', from, to, generator, path, ) end 
#breadth_first_search_paths(from, to, generator, path, options = {})
This method returns an undefined value.
Search for paths between two nodes following the edges specified by generator, and using a breadthfirst search strategy.
30 31 32 33 
# File 'lib/rdf/allegro_graph/functors/sna_functors.rb', line 30 def breadth_first_search_paths(from, to, generator, path, ={}) search_paths('breadthfirstsearchpaths', from, to, generator, path, ) end 
#depth_first_search_paths(from, to, generator, path, options = {})
This method returns an undefined value.
Search for paths between two nodes following the edges specified by generator, and using a depthfirst search strategy.
50 51 52 53 
# File 'lib/rdf/allegro_graph/functors/sna_functors.rb', line 50 def depth_first_search_paths(from, to, generator, path, ={}) search_paths('depthfirstsearchpaths', from, to, generator, path, ) end 
#ego_group(actor, depth, generator, group)
This method returns an undefined value.
Generate an actor's ego group.
127 128 129 130 
# File 'lib/rdf/allegro_graph/functors/sna_functors.rb', line 127 def ego_group(actor, depth, generator, group) functor('egogroup', actor, PrologLiteral.new(depth), generator, group) end 
#ego_group_member(actor, depth, generator, member)
This method returns an undefined value.
Generate all members of an actor's ego group.
143 144 145 146 
# File 'lib/rdf/allegro_graph/functors/sna_functors.rb', line 143 def ego_group_member(actor, depth, generator, member) functor('egogroupmember', actor, PrologLiteral.new(depth), generator, member) end 
#neighbor_count(actor, generator, count) Also known as: nodal_degree
This method returns an undefined value.
Count the neighbors of the actor.
97 98 99 
# File 'lib/rdf/allegro_graph/functors/sna_functors.rb', line 97 def neighbor_count(actor, generator, count) functor('nodaldegree', actor, generator, count) end 
#neighbors(actor, generator, neighbor) Also known as: nodal_neighbors
This method returns an undefined value.
Find all neighbors of the actor.
111 112 113 
# File 'lib/rdf/allegro_graph/functors/sna_functors.rb', line 111 def neighbors(actor, generator, neighbor) functor('nodalneighbors', actor, generator, neighbor) end 