Table of contents | |
|
|
1. Determine whether a forest exists | |
Signature: | |
static bool BtEngine.Exist(string ForestName) | |
static bool BtEngine.Exist(uint ForestIndex) | |
Description: | |
Determines whether a forest instance with the specified (forest) name/index exists. | |
Parameters: | |
ForestName | The name of the forest instance whose presence is to be determined. |
ForestIndex | The index of the forest instance whose presence is to be determined. |
Return Value: | |
True if the forest instance with the specified (forest) name/index was present; false otherwise. | |
Complexity: | |
O(log f), where f is the count of forest instance. | |
2. Get the node type a forest | |
Signature: | |
static Tuple<bool, NodeType> BtEngine.GetNodeType(string ForestName) | |
static Tuple<bool, NodeType> BtEngine.GetNodeType(uint ForestIndex) | |
Description: | |
Gets the node type of a forest instance with the specified (forest) name/index. | |
Parameters: | |
ForestName | The name of the forest instance to locate and invoke. |
ForestIndex | The index of the forest instance to locate and invoke. |
Return Value: | |
A tuple. Item1: true if the forest instance with the specified (forest) name/index was present; false otherwise. Item2: NodeType.Forest. | |
Complexity: | |
O(log f), where f is the count of forest instance. | |
3. Get the index/name of a forest | |
Signature: | |
static Tuple<bool, uint> BtEngine.GetIndex(string ForestName) | |
static Tuple<bool, string> BtEngine.GetName(uint ForestIndex) | |
Description: | |
Gets the index/name of a forest instance with the specified (forest) name/index. | |
Parameters: | |
ForestName | The name of the forest instance to locate and invoke. |
ForestIndex | The index of the forest instance to locate and invoke. |
Return Value: | |
A tuple. Item1: true if the forest instance with the specified (forest) name/index was present; false otherwise. Item2: the index/name of the forest instance if Item1 is true; 0/an empty string otherwise. | |
Complexity: | |
O(log f), where f is the count of forest instance. | |
4. Get the tree count of a forest | |
Signature: | |
static Tuple<bool, uint> BtEngine.GetTreeCount(string ForestName) | |
static Tuple<bool, uint> BtEngine.GetTreeCount(uint ForestIndex) | |
Description: | |
Gets the number of tree instances in a forest with the specified (forest) name/index. | |
Parameters: | |
ForestName | The name of the forest instance to locate and invoke. |
ForestIndex | The index of the forest instance to locate and invoke. |
Return Value: | |
A tuple. Item1: true if the forest instance with the specified (forest) name/index was present; false otherwise. Item2: the number of tree instances in the forest instance if Item1 is true; 0 otherwise. | |
Complexity: | |
O(log f), where f is the count of forest instance. | |
5. Get the forest property wrapper of a forest | |
Signature: | |
static Tuple<bool, ForestPropWrap> BtEngine.GetForestPropWrap(string ForestName, FromForestTo Level) | |
static Tuple<bool, ForestPropWrap> BtEngine.GetForestPropWrap(uint ForestIndex, FromForestTo Level) | |
Description: | |
Gets a forest property wrapper that contains all the information of a forest instance with the specified (forest) name/index and depth level. | |
Parameters: | |
ForestName | The name of the forest instance to locate and invoke. |
ForestIndex | The index of the forest instance to locate and invoke. |
Level | The depth level of the information in the property wrapper. |
Return Value: | |
A tuple. Item1: true if the forest with the specified (forest) name/index was present; false otherwise. Item2: a forest property wrapper that contains all the information of the forest instance if Item1 is true; null otherwise. | |
Complexity: | |
O(log f) if level is FromForestTo.Forest, O(log f + t) if level is FromForestTo.Tree, and O(log f + t * n) if level is FromForestTo.Node, where f is the count of forest instance, t is the count of whose child tree instance and n is the count of whose child node instance. |
Copyright © 2016-2020 Qualgame, LLC