starfish.chemistry.search
Class MTree
java.lang.Object
starfish.chemistry.search.MTree
public class MTree
- extends java.lang.Object
Constructor Summary |
MTree()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MTree
public MTree()
addNode
public MNode addNode()
addEdge
public void addEdge(int i,
int j)
sortNodes
public void sortNodes()
broad_path
public int[] broad_path(int iStart)
broad_path2
public int[] broad_path2(int iStart)
- Does a bread-first search through a tree starting at element iStart
Returns an array of node indices describing the path through the tree.
Each pair of entries in the tree describes an edge. The edges are in
order of the bread-first search
depthFirstPath
public int[] depthFirstPath(int start)
depthFirstPath
public void depthFirstPath(MNode cNode,
java.util.ArrayList path)
Copyright © 2010 One Moon Scientific, Inc. All Rights Reserved.