NTPoly
Data Types | Functions/Subroutines
tripletlistmodule Module Reference

A Module For Storing Lists of triplets. Contains both a methods for sorting lists. More...

Data Types

type  tripletlist_t
 A data type for a list of triplets. As this is related to matrix multiplication, the referencing indices are rows and columns. More...
 

Functions/Subroutines

pure subroutine, public constructtripletlist (this, size_in)
 Construct a triplet list. More...
 
pure subroutine, public destructtripletlist (this)
 Destructs a triplet list. More...
 
pure subroutine, public resizetripletlist (this, size)
 Increase the size of a triplet list. More...
 
pure subroutine, public appendtotripletlist (this, triplet_value)
 Add a value to the end of the triplet list. More...
 
pure subroutine, public settripletat (this, index, triplet_value)
 Set the value of a triplet at a particular index. More...
 
pure subroutine, public gettripletat (this, index, triplet_value)
 Get the value of a triplet at a particular index. More...
 
pure subroutine, public sorttripletlist (input_list, matrix_columns, sorted_list, bubble_in)
 Sorts a triplet list by index values. Implementation is based on bucket sort. This is why it needs the number of matrix columns. Bubble sort is used within a bucket. More...
 
subroutine, public symmetrizetripletlist (triplet_list, pattern_type)
 Symmetrizes an unsymmetric triplet list according to the specified symmetry type. More...
 

Detailed Description

A Module For Storing Lists of triplets. Contains both a methods for sorting lists.

Function/Subroutine Documentation

◆ appendtotripletlist()

pure subroutine, public tripletlistmodule::appendtotripletlist ( type(tripletlist_t), intent(inout)  this,
type(triplet_t), intent(in)  triplet_value 
)

Add a value to the end of the triplet list.

Parameters
[in,out]thisthe triplet list to append to.
[in]triplet_valuethe value to append.

◆ constructtripletlist()

pure subroutine, public tripletlistmodule::constructtripletlist ( type(tripletlist_t), intent(inout)  this,
integer(kind=c_int), intent(in), optional  size_in 
)

Construct a triplet list.

Parameters
[in,out]thisthe triplet list to construct.
[in]size_inthe length of the triplet list.

◆ destructtripletlist()

pure subroutine, public tripletlistmodule::destructtripletlist ( type(tripletlist_t), intent(inout)  this)

Destructs a triplet list.

Parameters
[in,out]thisthe triplet list to destruct.

◆ gettripletat()

pure subroutine, public tripletlistmodule::gettripletat ( type(tripletlist_t), intent(in)  this,
integer(kind=c_int), intent(in)  index,
type(triplet_t), intent(out)  triplet_value 
)

Get the value of a triplet at a particular index.

Parameters
[in]thisthe triplet list to get teh value from.
[in]indexthe index from which to get the triplet.
[out]triplet_valuethe extracted triplet value.

◆ resizetripletlist()

pure subroutine, public tripletlistmodule::resizetripletlist ( type(tripletlist_t), intent(inout)  this,
integer(kind=c_int), intent(in)  size 
)

Increase the size of a triplet list.

Parameters
[in,out]thisthe triplet list to resize.
[in]size.

◆ settripletat()

pure subroutine, public tripletlistmodule::settripletat ( type(tripletlist_t), intent(inout)  this,
integer(kind=c_int), intent(in)  index,
type(triplet_t), intent(in)  triplet_value 
)

Set the value of a triplet at a particular index.

Parameters
[in,out]thisthe triplet list to set.
[in]indexthe index at which to set the triplet.
[in]triplet_valuethe value of the triplet to set.

◆ sorttripletlist()

pure subroutine, public tripletlistmodule::sorttripletlist ( type(tripletlist_t), intent(in)  input_list,
integer, intent(in)  matrix_columns,
type(tripletlist_t), intent(out)  sorted_list,
logical, intent(in), optional  bubble_in 
)

Sorts a triplet list by index values. Implementation is based on bucket sort. This is why it needs the number of matrix columns. Bubble sort is used within a bucket.

Parameters
[in]input_listlist to be sorted.
[in]matrix_columnsthis is the highest column value in the list.
[in]bubble_infalse if you don't need the final bubble sort.
[out]sorted_lista now sorted version of the list. This routine will allocate it.

◆ symmetrizetripletlist()

subroutine, public tripletlistmodule::symmetrizetripletlist ( type(tripletlist_t), intent(inout)  triplet_list,
integer, intent(in)  pattern_type 
)

Symmetrizes an unsymmetric triplet list according to the specified symmetry type.

Parameters
[in,out]triplet_listlist to be symmetrized.
[in]pattern_typetype of symmetry.