Algorithm
Development Kit 1.0

algs.model.searchtree
Class DepthTransition

java.lang.Object
  extended by algs.model.searchtree.Transition
      extended by algs.model.searchtree.DepthTransition

public class DepthTransition
extends Transition

Records the depth of the transition between board states.

Used by DepthFirstSearch when deciding whether to advance a board state.

Since:
1.0
Version:
1.0, 6/15/08
Author:
George Heineman

Field Summary
 int depth
          Depth away from the initial board state.
 
Fields inherited from class algs.model.searchtree.Transition
move, prev
 
Constructor Summary
DepthTransition(IMove move, INode prev, int depth)
          Record the move and previous state of this transition.
 
Method Summary
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

depth

public final int depth
Depth away from the initial board state.

Constructor Detail

DepthTransition

public DepthTransition(IMove move,
                       INode prev,
                       int depth)
Record the move and previous state of this transition.

Since this is a depth transition, also record the depth.

Parameters:
move - Move which caused the transition
prev - The previous board state
depth - The distance from the initial board state

Algorithm Development Kit 1.0

This code supports the Algorithms in a Nutshell book, published by O'Reilly Media, Inc. in November 2008. Please visit the book web page to learn of any changes to the code repository or to record a potential defect.