Sparksee
6.0.2
|
Context class. More...
Instance Methods | |
(void) | - addEdgeType:d: |
Allows for traversing edges of the given type. More... | |
(void) | - addAllEdgeTypes: |
Allows for traversing all edge types of the graph. More... | |
(void) | - addNodeType: |
Allows for traversing nodes of the given type. More... | |
(void) | - addAllNodeTypes |
Allows for traversing all node types of the graph. | |
(void) | - excludeNodes: |
Set which nodes can't be used. More... | |
(void) | - excludeEdges: |
Set which edges can't be used. More... | |
(STSObjects *) | - compute |
Gets the resulting collection of nodes. More... | |
(void) | - setMaximumHops:include: |
Sets the maximum hops restriction. More... | |
(id) | - initWithSession:node: |
Creates a new instance. More... | |
(void) | - close |
Closes the Context instance. More... | |
(BOOL) | - isClosed |
Check if the Context instance is closed. | |
Class Methods | |
(STSObjects *) | + computeWithArguments:node:nodeTypes:edgeTypes:dir:maxhops:include: |
Helper method to easily compute a context from a node. More... | |
Context class.
It provides a very similar functionality than the Traversal classes. The main difference is Context returns a resulting collection whereas Traversal provides an iterator behaviour.
Check out the 'Algorithms' section in the SPARKSEE User Manual for more details on this.
- (void) addAllEdgeTypes: | (enum STSEdgesDirection) | d |
Allows for traversing all edge types of the graph.
d | [in] Edge direction. |
- (void) addEdgeType: | (int) | t | |
d: | (enum STSEdgesDirection) | d | |
Allows for traversing edges of the given type.
t | [in] Edge type. |
d | [in] Edge direction. |
- (void) addNodeType: | (int) | t |
Allows for traversing nodes of the given type.
t | null |
- (void) close |
Closes the Context instance.
It must be called to ensure the integrity of all data.
- (STSObjects*) compute |
Gets the resulting collection of nodes.
+ (STSObjects*) computeWithArguments: | (STSSession *) | session | |
node: | (long long) | node | |
nodeTypes: | (STSTypeList *) | nodeTypes | |
edgeTypes: | (STSTypeList *) | edgeTypes | |
dir: | (enum STSEdgesDirection) | dir | |
maxhops: | (int) | maxhops | |
include: | (BOOL) | include | |
Helper method to easily compute a context from a node.
session | [in] Session to get the graph from and perform operation. |
node | [in] Node to start traversal from. |
nodeTypes | [in] Allowed node type list. NULL means all node types are allowed. |
edgeTypes | [in] Allowed edge type list. NULL means all edge types are allowed. |
dir | [in] Allowed direction for the allowed edge types. |
maxhops | [in] The maximum hops restriction. It must be positive or zero. Zero, the default value, means unlimited. |
include | [in] If TRUE, the resulting collection will include those nodes at distance less or equal than the given one, otherwise it will just include those nodes at distance equal than the given one. This parameter just makes sense if maxhops is different from 0; in that case it includes all nodes no matters the distance. |
- (void) excludeEdges: | (STSObjects *) | edges |
Set which edges can't be used.
This will replace any previously specified set of excluded edges. Should only be used to exclude the usage of specific edges from allowed edge types because it's less efficient than not allowing an edge type.
edges | [in] A set of edge identifiers that must be kept intact until the destruction of the class. |
- (void) excludeNodes: | (STSObjects *) | nodes |
Set which nodes can't be used.
This will replace any previously specified set of excluded nodes. Should only be used to exclude the usage of specific nodes from allowed node types because it's less efficient than not allowing a node type.
nodes | [in] A set of node identifiers that must be kept intact until the destruction of the class. |
- (id) initWithSession: | (STSSession *) | session | |
node: | (long long) | node | |
Creates a new instance.
session | [in] Session to get the graph from and perform operation. |
node | [in] Node to start traversal from. |
- (void) setMaximumHops: | (int) | maxhops | |
include: | (BOOL) | include | |
Sets the maximum hops restriction.
All paths longer than the maximum hops restriction will be ignored.
maxhops | [in] The maximum hops restriction. It must be positive or zero. Zero, the default value, means unlimited. |
include | [in] If TRUE, the resulting collection will include those nodes at distance less or equal than the given one, otherwise it will just include those nodes at distance equal than the given one. This parameter just makes sense if maxhops is different from 0; in that case it includes all nodes no matters the distance. |