public class

DepthFirstSearch

extends Algorithm<A, S, N extends Node<A, S, N>>
java.lang.Object
   ↳ es.usc.citius.hipster.algorithm.Algorithm<A, S, N extends es.usc.citius.hipster.model.Node<A, S, N>>
     ↳ es.usc.citius.hipster.algorithm.DepthFirstSearch<A, S, N extends es.usc.citius.hipster.model.Node<A, S, N>>
Known Direct Subclasses

Class Overview

Depth First Search (DFS) is a blind algorithm that performs an exploration of the graph in a way that always reaches the deepest node before backtracking. The Hipster implementation is a graph-based search that can handle cycles. This algorithm is complete (it always finds a solution if it exists) but not optimal.

For more information see this article of the Wikipedia about DFS.

Summary

Nested Classes
class DepthFirstSearch.Iterator DFS iterator used to expand always the deepest non-visited node. 
class DepthFirstSearch.StackFrameNode  
Fields
protected NodeExpander<A, S, N extends Node<A, S, N>> expander
protected N extends Node<A, S, N> initialNode
Public Constructors
DepthFirstSearch(N initialNode, NodeExpander<A, S, N> expander)
Public Methods
Iterator<N> iterator()
[Expand]
Inherited Methods
From class es.usc.citius.hipster.algorithm.Algorithm
From class java.lang.Object
From interface java.lang.Iterable

Fields

protected NodeExpander<A, S, N extends Node<A, S, N>> expander

protected N extends Node<A, S, N> initialNode

Public Constructors

public DepthFirstSearch (N initialNode, NodeExpander<A, S, N> expander)

Public Methods

public Iterator<N> iterator ()