|
CONGEN 5.0
Configuration generation for SCATCI
|
Determinant binary search tree. More...


Public Member Functions | |
| procedure, public | init (this, ndo, nelt) |
| Initialize determinant tree. | |
| procedure, public | compare (this, i, j, data) |
| Lexicographically compare two determinats. | |
| procedure, public | locate_det (this, det) |
| Find a specific determinant in the storage. | |
| procedure, public | dtwrite (this, lu, id) |
| Write determinat. | |
| final | final_det_tree (this) |
| Finalize determinant tree. | |
Public Attributes | |
| integer, dimension(:), pointer | det => null() |
| integer, dimension(:), pointer | ndo => null() |
| integer | nelt = 0 |
This is an extension of the plain integer binary search tree to one that operates on the determinant storage. The relation used in the ordering is the lexicographical order of the determinants as provided by the overriden subroutine "compare".
Definition at line 43 of file congen_bstree.f90.
|
final |
Releases all allocated memory.
| this | Tree object to finalize |
Definition at line 52 of file congen_bstree.f90.
References congen_bstree::final_det_tree().

| procedure, public congen_bstree::det_tree::compare | ( | class(det_tree), intent(in) | this, |
| integer, intent(in) | i, | ||
| integer, intent(in) | j, | ||
| type(c_ptr), intent(in), optional | data ) |
Binary tree needs a notion of order of its elements to be able to work with the data so efficiently. In case of arrays of numbers, the typical order is the "lexicographical" order. The array A is less than B if for the first position I for which A(I) /= B(I) holds that A(I) < B(I).
If any of the given indices is negative, the reference determinant stored within the predicate type is used instead.
| this | Determinant tree object to use |
| i | Index of the first determinant |
| j | Index of the second determinant |
| data | Additional payload required by base class interface. Not used in congen. |
Definition at line 49 of file congen_bstree.f90.
| procedure, public congen_bstree::det_tree::dtwrite | ( | class(det_tree), intent(in) | this, |
| integer, intent(in) | lu, | ||
| integer, intent(in) | id ) |
Used in debuggind output of the whole tree.
| this | Binary search tree |
| lu | Unit for writing |
| id | Tree node id |
Definition at line 51 of file congen_bstree.f90.
| procedure, public congen_bstree::det_tree::init | ( | class(det_tree), intent(inout) | this, |
| integer, dimension(:), intent(in), pointer | ndo, | ||
| integer, intent(in) | nelt ) |
Stores pointer to the determinant storage, so that it can be used when comparing determinant indices in the binary search tree subroutines.
| this | Tree object to initialize |
| ndo | Determinant storage |
| nelt | Size of a determinant |
Definition at line 48 of file congen_bstree.f90.
| procedure, public congen_bstree::det_tree::locate_det | ( | class(det_tree), intent(inout) | this, |
| integer, dimension(this % nelt), intent(in) | det ) |
Return index in the determinant storage, where the given determinant is located. Return -1 when there is no such determinant.
| this | Tree object to search |
| det | Determinant to find (length nelt) |
Definition at line 50 of file congen_bstree.f90.
| integer, dimension(:), pointer congen_bstree::det_tree::det => null() |
Definition at line 44 of file congen_bstree.f90.
| integer, dimension(:), pointer congen_bstree::det_tree::ndo => null() |
Definition at line 45 of file congen_bstree.f90.
| integer congen_bstree::det_tree::nelt = 0 |
Definition at line 46 of file congen_bstree.f90.