CONGEN 5.0
Configuration generation for SCATCI
Loading...
Searching...
No Matches
congen_bstree::det_tree Type Reference

Determinant binary search tree. More...

Inheritance diagram for congen_bstree::det_tree:
Collaboration diagram for congen_bstree::det_tree:

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

Detailed Description

Authors
J Benda
Date
2019

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.

Constructor & Destructor Documentation

◆ final_det_tree()

final congen_bstree::det_tree::final_det_tree ( type(det_tree), intent(inout) this)
final
Authors
J Benda
Date
2019

Releases all allocated memory.

Parameters
thisTree object to finalize

Definition at line 52 of file congen_bstree.f90.

References congen_bstree::final_det_tree().

Here is the call graph for this function:

Member Function/Subroutine Documentation

◆ compare()

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 )
Authors
J Benda
Date
2018 - 2019

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.

Parameters
thisDeterminant tree object to use
iIndex of the first determinant
jIndex of the second determinant
dataAdditional payload required by base class interface. Not used in congen.
Returns
-1 if the first determinant is lexicographically less, 0 if they are equal, +1 if the first is greater.

Definition at line 49 of file congen_bstree.f90.

◆ dtwrite()

procedure, public congen_bstree::det_tree::dtwrite ( class(det_tree), intent(in) this,
integer, intent(in) lu,
integer, intent(in) id )
Authors
J Benda
Date
2019

Used in debuggind output of the whole tree.

Parameters
thisBinary search tree
luUnit for writing
idTree node id

Definition at line 51 of file congen_bstree.f90.

◆ init()

procedure, public congen_bstree::det_tree::init ( class(det_tree), intent(inout) this,
integer, dimension(:), intent(in), pointer ndo,
integer, intent(in) nelt )
Authors
J Benda
Date
2019

Stores pointer to the determinant storage, so that it can be used when comparing determinant indices in the binary search tree subroutines.

Parameters
thisTree object to initialize
ndoDeterminant storage
neltSize of a determinant

Definition at line 48 of file congen_bstree.f90.

◆ locate_det()

procedure, public congen_bstree::det_tree::locate_det ( class(det_tree), intent(inout) this,
integer, dimension(this % nelt), intent(in) det )
Authors
J Benda
Date
2019

Return index in the determinant storage, where the given determinant is located. Return -1 when there is no such determinant.

Parameters
thisTree object to search
detDeterminant to find (length nelt)

Definition at line 50 of file congen_bstree.f90.

Member Data Documentation

◆ det

integer, dimension(:), pointer congen_bstree::det_tree::det => null()

Definition at line 44 of file congen_bstree.f90.

◆ ndo

integer, dimension(:), pointer congen_bstree::det_tree::ndo => null()

Definition at line 45 of file congen_bstree.f90.

◆ nelt

integer congen_bstree::det_tree::nelt = 0

Definition at line 46 of file congen_bstree.f90.


The documentation for this type was generated from the following file: