edu.emory.mathcs.csparsej.tdouble
Class Dcs_tdfs
- java.lang.Object
-
- edu.emory.mathcs.csparsej.tdouble.Dcs_tdfs
-
public class Dcs_tdfs extends java.lang.ObjectDepth-first-search of a tree.
-
-
Constructor Summary
Constructors Constructor and Description Dcs_tdfs()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method and Description static intcs_tdfs(int j, int k, int[] head, int head_offset, int[] next, int next_offset, int[] post, int post_offset, int[] stack, int stack_offset)Depth-first search and postorder of a tree rooted at node j
-
-
-
Method Detail
-
cs_tdfs
public static int cs_tdfs(int j, int k, int[] head, int head_offset, int[] next, int next_offset, int[] post, int post_offset, int[] stack, int stack_offset)Depth-first search and postorder of a tree rooted at node j- Parameters:
j- postorder of a tree rooted at node jk- number of nodes ordered so farhead- head[i] is first child of node i; -1 on outputhead_offset- the index of the first element in array headnext- next[i] is next sibling of i or -1 if nonenext_offset- the index of the first element in array nextpost- postorderingpost_offset- the index of the first element in array poststack- size n, work arraystack_offset- the index of the first element in array stack- Returns:
- new value of k, -1 on error
-
-
DMelt 3.0 © DataMelt by jWork.ORG