SparkseeNet  5.2.0
Public Member Functions | List of all members
com.sparsity.sparksee.algorithms.DisjointCommunities Class Reference

DisjointCommunities class. More...

Public Member Functions

boolean IsClosed ()
 Gets if DisjointCommunities instance has been closed or not. More...
 
 DisjointCommunities (com.sparsity.sparksee.gdb.Session session, System.String materializedattribute)
 Creates a new instance of DisjointCommunities. More...
 
void Close ()
 Closes the DisjointCommunities instance. More...
 
long GetSize (long idCommunity)
 Returns the number of nodes contained in the given community. More...
 
long GetCount ()
 Returns the number of communities found in the graph. More...
 
com.sparsity.sparksee.gdb.Objects GetNodes (long idCommunity)
 Returns the collection of nodes contained in the given community. More...
 
long GetCommunity (long idNode)
 Returns the disjoint community where the given node belongs to. More...
 

Detailed Description

DisjointCommunities class.

This class contains the results processed on a DisjointCommunityDetection algorithm.

These results contain information related to the communities found. We must consider that each community has a number in order to identify it. These number identifiers are values from 0 to N-1, where N is the number of different communities found.

When executing any implementation of the DisjointCommunityDetection, it is possible to indicate whether the results of the execution must be stored persistently using the class DisjointCommunityDetection setMaterializedAttribute method. In case the results are set to be materialized, users can retrieve this data whenever they want, even if the graph has been closed and opened again, just by creating a new instance of this class.

Check out the 'Algorithms' section in the SPARKSEE User Manual for more details on this.

Author
Sparsity Technologies http://www.sparsity-technologies.com

Constructor & Destructor Documentation

com.sparsity.sparksee.algorithms.DisjointCommunities.DisjointCommunities ( com.sparsity.sparksee.gdb.Session  session,
System.String  materializedattribute 
)

Creates a new instance of DisjointCommunities.

This constructor method can only be called when a previous execution of any implementation of the DisjointCommunityDetection class has materialized the results in a common attribute type for all the nodes in the graph. For further information about materializing the results processed on any DisjointCommunityDetection execution see the documentation of the DisjointCommunityDetection::SetMaterializedAttribute method.

Parameters
session[in] Session to get the graph Graph on which the information will be retrieved just by getting the values contained in the given common attribute type for all the nodes in the graph and processing them.
materializedattribute[in] The common attribute type for all the nodes in the graph where data will be retrieved in order to process the results related to the communities found in the graph.

Member Function Documentation

void com.sparsity.sparksee.algorithms.DisjointCommunities.Close ( )

Closes the DisjointCommunities instance.

It must be called to ensure the integrity of all data.

long com.sparsity.sparksee.algorithms.DisjointCommunities.GetCommunity ( long  idNode)

Returns the disjoint community where the given node belongs to.

Parameters
idNode[in] The node identifier for which the disjoint community identifier where it belongs will be returned.
Returns
The disjoint community identifier where the given node identifier belongs to.
long com.sparsity.sparksee.algorithms.DisjointCommunities.GetCount ( )

Returns the number of communities found in the graph.

Returns
The number of communities found in the graph.
com.sparsity.sparksee.gdb.Objects com.sparsity.sparksee.algorithms.DisjointCommunities.GetNodes ( long  idCommunity)

Returns the collection of nodes contained in the given community.

Parameters
idCommunityThe community for which the collection of nodes contained in it will be returned.
Returns
The collection of node identifiers contained in the given community.
long com.sparsity.sparksee.algorithms.DisjointCommunities.GetSize ( long  idCommunity)

Returns the number of nodes contained in the given community.

Parameters
idCommunityThe community for which the number of nodes contained in it will be returned.
Returns
The number of nodes contained in the given community.
boolean com.sparsity.sparksee.algorithms.DisjointCommunities.IsClosed ( )

Gets if DisjointCommunities instance has been closed or not.

See Also
Close()
Returns
TRUE if the DisjointCommunities instance has been closed, FALSE otherwise.