public void GetLeafNodes(List <Node> nodes, LeafNodeTest test = null) { for (int i = 0; i < children.Count; i++) { if (children[i].type == NodeType.Internal) { Tree tree = (Tree)children[i]; if (tree.ChildCount() > 0) { tree.GetLeafNodes(nodes, test); } else if (test == null || test(children[i])) { nodes.Add(children[i]); } } else if (test == null || test(children[i])) { nodes.Add(children[i]); } } }
public void BenchmarkRandom() { SortedTreeNodeBase <HistorianKey, HistorianValue> tree = Library.CreateTreeNode <HistorianKey, HistorianValue>(HistorianFileEncodingDefinition.TypeGuid, 0); LeafNodeTest.TestSpeed(tree, new RandomTest(), 500, 512); }
public void TestReverseSequently() { SortedTreeNodeBase <HistorianKey, HistorianValue> tree = Library.CreateTreeNode <HistorianKey, HistorianValue>(HistorianFileEncodingDefinition.TypeGuid, 0); LeafNodeTest.TestNode(tree, new ReverseSequentialTest(), 5000); }
public void TestRandom() { SortedTreeNodeBase <HistorianKey, HistorianValue> tree = Library.CreateTreeNode <HistorianKey, HistorianValue>(HistorianFileEncodingDefinition.TypeGuid, 0); LeafNodeTest.TestNode(tree, new RandomTest(), 2000); }
public void BenchmarkReverseSequently() { var tree = Library.CreateTreeNode <HistorianKey, HistorianValue>(HistorianFileEncodingDefinition.TypeGuid, 0); LeafNodeTest.TestSpeed(tree, new ReverseSequentialTest(), 500, 512); }