|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.upc.dama.dex.algorithms.ConnectedComponents
public class ConnectedComponents
This class contains the results processed on a Connectivity algorithm.
These results contain information related to the connected components found.
We must consider that each connected component 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 connected
components found.
Each execution of any implementation of the Connectivity abstract class
generates a ConnectedComponents instance which stores the following
data:
Furthermore, when executing any implementation of the Connectivity,
it is possible to indicate whether the results of the execution must be stored
persistently using the Connectivity.setMaterializedAttribute(String nameattribute)
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.
| Constructor Summary | |
|---|---|
ConnectedComponents(Graph graph,
java.lang.String materializedattribute)
Creates a new instance of ConnectedComponents. |
|
| Method Summary | |
|---|---|
long |
getConnectedComponent(long idNode)
Returns the connected component where the given node belongs to. |
long |
getCount()
Returns the number of connected components found in the graph. |
Objects |
getNodes(long idConnectedComponent)
Returns the collection of nodes contained in the given connected component. |
long |
getSize(long idConnectedComponent)
Returns the number of nodes contained in the given connected component. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ConnectedComponents(Graph graph,
java.lang.String materializedattribute)
ConnectedComponents.
This constructor method can only be called when a previous execution of any
implementation of the Connectivity 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
Connectivity execution see the documentation of the
Connectivity.setMaterializedAttribute(String nameattribute) method.
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 - 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 connected components found in the graph.| Method Detail |
|---|
public long getConnectedComponent(long idNode)
idNode - The node identifier for which the connected component
identifier where it belongs will be returned.
public long getCount()
public Objects getNodes(long idConnectedComponent)
idConnectedComponent - The connected component for which
the collection of nodes contained in it will be returned.
public long getSize(long idConnectedComponent)
idConnectedComponent - The connected component for which
the number of nodes contained in it will be returned.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||