edu.claflin.finder.algo

## Class BreadthFirstTraversalSearch

- java.lang.Object
- - edu.claflin.finder.algo.Algorithm
  - - edu.claflin.finder.algo.BreadthFirstTraversalSearch

- All Implemented Interfaces:
    Processable<Graph,Graph>

      public class BreadthFirstTraversalSearch
      extends Algorithm

  Processes a `Graph` searching for subgraphs by performing a breadth first search on each node of the graph.
  Version:
    3.4 February 4, 2016
  Author:
    Charles Allen Schultz II

- - ### Field Summary

    - ### Fields inherited from class edu.claflin.finder.algo.Algorithm

      `args, counter, listener, PROP_PROGRESS`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `BreadthFirstTraversalSearch(ArgumentsBundle bundle)` Public constructor for initializing the BreadthFirstTraversalSearch with default conditions.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.util.ArrayList<Graph>` | `process(Graph graph)` Processes data.
    `private Graph` | `searchNode(Graph graph, Node node)` Helper method to search for the SubGraphs.

    - ### Methods inherited from class edu.claflin.finder.algo.Algorithm

      `addPropertyChangeListener, cull, removePropertyChangeListener, setProgress`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### BreadthFirstTraversalSearch

          public BreadthFirstTraversalSearch(ArgumentsBundle bundle)

      Public constructor for initializing the BreadthFirstTraversalSearch with default conditions.
      Parameters:
        `bundle` - the ArgumentsBundle containing the instantiation arguments.

  - ### Method Detail

    - #### process

          public java.util.ArrayList<Graph> process(Graph graph)

      Processes data.
      Finds most Subgraphs by performing a breadth first search on the node tree. It is unknown if it finds all or only most of the subgraphs due to the nature of the algorithm. It is expected, however, that it would miss certain node groupings.
      Parameters:
        `graph` - the `Graph` object to search through.
      Returns:
        the Graph array holding all found subgraphs.

    - #### searchNode

          private Graph searchNode(Graph graph,
                                   Node node)

      Helper method to search for the SubGraphs. Creates and manages a queue of nodes to search through. Is called on each node in the tree.
      Parameters:
        `graph` - the Graph object to search through.
        `node` - the node to use as the root.
      Returns:
        the Graph object representing the found subgraph.