OpenCMISS-Iron Internal API Documentation
lists.f90 File Reference

Implements lists of base types. More...

Go to the source code of this file.

Data Types

interface  lists::list_createfinish
 
interface  lists::list_createstart
 
interface  lists::list_datadimensionset
 
interface  lists::list_datatypeset
 
interface  lists::list_detach_and_destroy
 Detaches the list values from a list and returns them as a pointer to a array of base type before destroying the list. More...
 
interface  lists::list_detachanddestroy
 Detaches the list values from a list and returns them as a pointer to a array of base type before destroying the list. More...
 
interface  lists::list_item_add
 Adds an item to the end of a list. More...
 
interface  lists::list_itemadd
 Adds an item to the end of a list. More...
 
interface  lists::list_itemdelete
 
interface  lists::list_item_set
 Sets an item in the list. More...
 
interface  lists::list_itemset
 Sets an item in the list. More...
 
interface  lists::list_item_get
 Returns an item in a list at a specififed position. More...
 
interface  lists::list_itemget
 Returns an item in a list at a specififed position. More...
 
interface  lists::list_item_in_list
 Determines if an item is in a list and returns the position of the item. More...
 
interface  lists::list_iteminlist
 Determines if an item is in a list and returns the position of the item. More...
 
interface  lists::list_initialsizeset
 
interface  lists::list_keydimensionset
 
interface  lists::list_mutableset
 
interface  lists::list_numberofitemsget
 
interface  lists::list_removeduplicates
 
interface  lists::list_search
 Searches a list for a given value and returns the position in the list if the value exists. More...
 
interface  lists::list_search_linear
 Searches a list using the linear search method. More...
 
interface  lists::list_searchlinear
 Searches a list using the linear search method. More...
 
interface  lists::list_sort
 Sorts a list into ascending order. More...
 
interface  lists::list_sort_bubble
 Sorts a list into assending order using the bubble sort method. More...
 
interface  lists::list_sortbubble
 Sorts a list into assending order using the bubble sort method. More...
 
interface  lists::list_sort_heap
 Sorts a list into assending order using the heap sort method. More...
 
interface  lists::list_sortheap
 Sorts a list into assending order using the heap sort method. More...
 
interface  lists::list_sort_shell
 Sorts a list into either assending or descending order using the shell sort method. More...
 
interface  lists::list_sortshell
 Sorts a list into either assending or descending order using the shell sort method. More...
 
interface  lists::list_itersection
 Calculates the intersection of two arrays. More...
 
interface  lists::list_subset_of
 Checks whether an array is a subset of another array. More...
 
interface  lists::list_subsetof
 Checks whether an array is a subset of another array. More...
 

Modules

module  lists
 Implements lists of base types.
 

Functions/Subroutines

subroutine, public lists::list_create_finish (LIST, ERR, ERROR,)
 Finishes the creation of a list created with LIST_CREATE_START. More...
 
subroutine, public lists::list_create_start (LIST, ERR, ERROR,)
 Starts the creation of a list and returns a pointer to the created list. More...
 
subroutine, public lists::list_data_dimension_set (LIST, DATA_DIMENSION, ERR, ERROR,)
 Sets/changes the data dimension for a list. More...
 
subroutine, public lists::list_mutable_set (LIST, MUTABLE, ERR, ERROR,)
 Sets/changes the data dimension for a list. More...
 
subroutine, public lists::list_data_type_set (LIST, DATA_TYPE, ERR, ERROR,)
 Sets/changes the data type for a list. More...
 
subroutine, public lists::list_destroy (LIST, ERR, ERROR,)
 Destroys a list. More...
 
subroutine lists::list_finalise (LIST, ERR, ERROR,)
 Finalises a list and deallocates all memory. More...
 
subroutine, public lists::list_appendlist (list, appendedList, err, error,)
 Appends a list to the end of this list. More...
 
subroutine, public lists::list_clearitems (list, err, error,)
 Clears all the items from a list. More...
 
subroutine lists::list_initialise (LIST, ERR, ERROR,)
 Initialises a list and all its components. More...
 
subroutine, public lists::list_initial_size_set (LIST, INITIAL_SIZE, ERR, ERROR,)
 Sets/changes the initial size for a list. More...
 
subroutine lists::list_item_add_intg1 (LIST, ITEM, ERR, ERROR,)
 Adds an item to the end of an integer list of data dimension 1. More...
 
subroutine lists::list_item_add_intg2 (LIST, ITEM, ERR, ERROR,)
 Adds an item to the end of an integer list of data dimension > 1. More...
 
subroutine lists::list_item_add_sp1 (LIST, ITEM, ERR, ERROR,)
 Adds an item to the end of a single precision real list of data dimension 1. More...
 
subroutine lists::list_item_add_sp2 (LIST, ITEM, ERR, ERROR,)
 Adds an item to the end of a single precision real list of data dimension > 1. More...
 
subroutine lists::list_item_add_dp1 (LIST, ITEM, ERR, ERROR,)
 Adds an item to the end of a double precision real list of data dimension 1. More...
 
subroutine lists::list_item_add_dp2 (LIST, ITEM, ERR, ERROR,)
 Adds an item to the end of a double precision real list of data dimension > 1. More...
 
subroutine lists::list_item_set_intg1 (LIST, LIST_ITEM, ITEM, ERR, ERROR,)
 Sets an item in an integer list of data dimension 1. More...
 
subroutine lists::list_item_set_intg2 (LIST, LIST_ITEM, ITEM, ERR, ERROR,)
 Set an item in an integer list of data dimension > 1. More...
 
subroutine lists::list_item_set_sp1 (LIST, LIST_ITEM, ITEM, ERR, ERROR,)
 Sets an item in a single precision real list of data dimension 1. More...
 
subroutine lists::list_item_set_sp2 (LIST, LIST_ITEM, ITEM, ERR, ERROR,)
 Sets an item in a single precision real list of data dimension > 1. More...
 
subroutine lists::list_item_set_dp1 (LIST, LIST_ITEM, ITEM, ERR, ERROR,)
 Sets an item in a double precision real list of data dimension 1. More...
 
subroutine lists::list_item_set_dp2 (LIST, LIST_ITEM, ITEM, ERR, ERROR,)
 Sets an item in a double precision real list of data dimension > 1. More...
 
subroutine lists::list_item_get_intg1 (LIST, LIST_ITEM, ITEM, ERR, ERROR,)
 Returns the ITEM in a list at position LIST_ITEM in the given integer LIST. More...
 
subroutine lists::list_item_get_intg2 (LIST, LIST_ITEM, ITEM, ERR, ERROR,)
 Returns the ITEM in a list at position LIST_ITEM in the given integer LIST. More...
 
subroutine lists::list_item_get_sp1 (LIST, LIST_ITEM, ITEM, ERR, ERROR,)
 Returns the ITEM in a list at position LIST_ITEM in the given single precision LIST. More...
 
subroutine lists::list_item_get_sp2 (LIST, LIST_ITEM, ITEM, ERR, ERROR,)
 Returns the ITEM in a list at position LIST_ITEM in the given single precision LIST. More...
 
subroutine lists::list_item_get_dp1 (LIST, LIST_ITEM, ITEM, ERR, ERROR,)
 Returns the ITEM in a list at position LIST_ITEM in the given double precision LIST. More...
 
subroutine lists::list_item_get_dp2 (LIST, LIST_ITEM, ITEM, ERR, ERROR,)
 Returns the ITEM in a list at position LIST_ITEM in the given double precision LIST. More...
 
subroutine lists::list_item_in_list_intg1 (LIST, ITEM, LIST_ITEM, ERR, ERROR,)
 Determines if ITEM is in the given integer LIST. If it is LIST_ITEM is the index in the list. If not LIST_ITEM is 0. More...
 
subroutine lists::list_item_in_list_intg2 (LIST, ITEM, LIST_ITEM, ERR, ERROR,)
 Determines if ITEM is in the given integer LIST. If it is LIST_ITEM is the index in the list. If not LIST_ITEM is 0. More...
 
subroutine lists::list_item_in_list_sp1 (LIST, ITEM, LIST_ITEM, ERR, ERROR,)
 Determines if ITEM is in the given single precision real LIST. If it is LIST_ITEM is the index in the list. If not LIST_ITEM is 0. More...
 
subroutine lists::list_item_in_list_sp2 (LIST, ITEM, LIST_ITEM, ERR, ERROR,)
 Determines if ITEM is in the given single precision real LIST. If it is LIST_ITEM is the index in the list. If not LIST_ITEM is 0. More...
 
subroutine lists::list_item_in_list_dp1 (LIST, ITEM, LIST_ITEM, ERR, ERROR,)
 Determines if ITEM is in the given double precision real LIST. If it is LIST_ITEM is the index in the list. If not LIST_ITEM is 0. More...
 
subroutine lists::list_item_in_list_dp2 (LIST, ITEM, LIST_ITEM, ERR, ERROR,)
 Determines if ITEM is in the given double precision real LIST. If it is LIST_ITEM is the index in the list. If not LIST_ITEM is 0. More...
 
subroutine, public lists::list_item_delete (LIST, LIST_ITEM, ERR, ERROR,)
 Deletes the item given by the LIST_ITEM index from the given list. More...
 
subroutine, public lists::list_key_dimension_set (LIST, KEY_DIMENSION, ERR, ERROR,)
 Sets/changes the key dimension (i.e., the dimension for searching and sorting) for a list. More...
 
subroutine, public lists::list_number_of_items_get (LIST, NUMBER_OF_ITEMS, ERR, ERROR,)
 Gets the current number of items in a list. More...
 
subroutine lists::list_detach_and_destroy_intg1 (LIST, NUMBER_IN_LIST, LIST_VALUES, ERR, ERROR,)
 Detaches the list values from an integer list of data dimension 1 and returns them as an array of base type before destroying the list. The LIST_VALUES array must not be allocated on entry. It is up to the user to then deallocate the returned list memory. More...
 
subroutine lists::list_detach_and_destroy_intg2 (LIST, NUMBER_IN_LIST, LIST_VALUES, ERR, ERROR,)
 Detaches the list values from an integer list of data dimension > 1 and returns them as an array of base type before destroying the list. The LIST_VALUES array must not be allocated on entry. It is up to the user to then deallocate the returned list memory. More...
 
subroutine lists::list_detach_and_destroy_sp1 (LIST, NUMBER_IN_LIST, LIST_VALUES, ERR, ERROR,)
 Detaches the list values from a single precision real list of data dimension 1 and returns them as an array of base type before destroying the list. The LIST_VALUES array must not be allocated on entry. It is up to the user to then deallocate the returned list memory. More...
 
subroutine lists::list_detach_and_destroy_sp2 (LIST, NUMBER_IN_LIST, LIST_VALUES, ERR, ERROR,)
 Detaches the list values from a single precision real list of data dimension > 1 and returns them as an array of base type before destroying the list. The LIST_VALUES array must not be allocated on entry. It is up to the user to then deallocate the returned list memory. More...
 
subroutine lists::list_detach_and_destroy_dp1 (LIST, NUMBER_IN_LIST, LIST_VALUES, ERR, ERROR,)
 Detaches the list values from a double precision real list of data dimension 1 and returns them as an array of base type before destroying the list. The LIST_VALUES array must not be allocated on entry. It is up to the user to then deallocate the returned list memory. More...
 
subroutine lists::list_detach_and_destroy_dp2 (LIST, NUMBER_IN_LIST, LIST_VALUES, ERR, ERROR,)
 Detaches the list values from a double precision real list of data dimension > 1 and returns them as an array of base type before destroying the list. The LIST_VALUES array must not be allocated on entry. It is up to the user to then deallocate the returned list memory. More...
 
subroutine, public lists::list_remove_duplicates (LIST, ERR, ERROR,)
 Removes duplicate entries from a list. A side effect of this is that the list is sorted. More...
 
subroutine lists::list_search_intg_array (A, VALUE, POSITION, ERR, ERROR,)
 Searches an integer array list A for VALUE. If the search is successful POSITION contains the index of the position of VALUE in the list otherwise POSITION is zero. More...
 
subroutine lists::list_search_c_int_array (A, VALUE, POSITION, ERR, ERROR,)
 Searches an integer array list A for VALUE. If the search is successful POSITION contains the index of the position of VALUE in the list otherwise POSITION is zero. More...
 
subroutine lists::list_search_sp_array (A, VALUE, POSITION, ERR, ERROR,)
 Searches a single precision real array list A for VALUE. If the search is successful POSITION contains the index of the position of VALUE in the list otherwise POSITION is zero. More...
 
subroutine lists::list_search_dp_array (A, VALUE, POSITION, ERR, ERROR,)
 Searches a double precision real array list A for VALUE. If the search is successful POSITION contains the index of the position of VALUE in the list otherwise POSITION is zero. More...
 
subroutine lists::list_search_linear_intg_array (A, VALUE, POSITION, ERR, ERROR,)
 Searches an integer array list A for VALUE using the linear search method. If the search is successful POSITION contains the index of the position of VALUE in the list otherwise POSITION is zero. More...
 
subroutine lists::list_search_linear_c_int_array (A, VALUE, POSITION, ERR, ERROR,)
 Searches an integer array list A for VALUE using the linear search method. If the search is successful POSITION contains the index of the position of VALUE in the list otherwise POSITION is zero. More...
 
subroutine lists::list_search_linear_sp_array (A, VALUE, POSITION, ERR, ERROR,)
 Searches a single precision real array list A for VALUE using the linear search method. If the search is successful POSITION contains the index of the position of VALUE in the list otherwise POSITION is zero. More...
 
subroutine lists::list_search_linear_dp_array (A, VALUE, POSITION, ERR, ERROR,)
 Searches a double precision real array list A for VALUE using the linear search method. If the search is successful POSITION contains the index of the position of VALUE in the list otherwise POSITION is zero. More...
 
subroutine lists::list_sort_list (LIST, ERR, ERROR,)
 Sorts a list of into ascending order. More...
 
subroutine lists::list_sort_intg1_array (A, ERR, ERROR,)
 Sorts an integer array list of data dimension 1 into ascending order. More...
 
subroutine lists::list_sort_intg2_array (A, KEY_DIMENSION, ERR, ERROR,)
 Sorts an integer array list of data dimension > 1 into ascending order. More...
 
subroutine lists::list_sort_c_int1_array (A, ERR, ERROR,)
 Sorts an integer array list of data dimension 1 into ascending order. More...
 
subroutine lists::list_sort_c_int2_array (A, KEY_DIMENSION, ERR, ERROR,)
 Sorts an integer array list of data dimension > 1 into ascending order. More...
 
subroutine lists::list_sort_sp1_array (A, ERR, ERROR,)
 Sorts an single precision array list of data dimension 1 into ascending order. More...
 
subroutine lists::list_sort_sp2_array (A, KEY_DIMENSION, ERR, ERROR,)
 Sorts an single precision array list of data dimension > 1 into ascending order. More...
 
subroutine lists::list_sort_dp1_array (A, ERR, ERROR,)
 Sorts an double precision array list of data dimension 1 into ascending order. More...
 
subroutine lists::list_sort_dp2_array (A, KEY_DIMENSION, ERR, ERROR,)
 Sorts an double precision array list of data dimension > 1 into ascending order. More...
 
subroutine lists::list_sort_bubble_intg1_array (A, ERR, ERROR,)
 BUBBLE_SORT_INTG performs a bubble sort on an integer array of data dimension 1 list. More...
 
subroutine lists::list_sort_bubble_intg2_array (A, KEY_DIMENSION, ERR, ERROR,)
 BUBBLE_SORT_INTG performs a bubble sort on an integer array of data dimension > 1 list. More...
 
subroutine lists::list_sort_bubble_c_int1_array (A, ERR, ERROR,)
 BUBBLE_SORT_C_INT performs a bubble sort on an integer array of data dimension 1 list. More...
 
subroutine lists::list_sort_bubble_c_int2_array (A, KEY_DIMENSION, ERR, ERROR,)
 BUBBLE_SORT_C_INT performs a bubble sort on an integer array of data dimension > 1 list. More...
 
subroutine lists::list_sort_bubble_sp1_array (A, ERR, ERROR,)
 BUBBLE_SORT_SP performs a bubble sort on a single precision array of data dimension 1 list. More...
 
subroutine lists::list_sort_bubble_sp2_array (A, KEY_DIMENSION, ERR, ERROR,)
 BUBBLE_SORT_SP performs a bubble sort on a single precision array of data dimension > 1 list. More...
 
subroutine lists::list_sort_bubble_dp1_array (A, ERR, ERROR,)
 BUBBLE_SORT_DP performs a bubble sort on a double precision of data dimension 1 list. More...
 
subroutine lists::list_sort_bubble_dp2_array (A, KEY_DIMENSION, ERR, ERROR,)
 BUBBLE_SORT_DP performs a bubble sort on a double precision of data dimension > 1 list. More...
 
subroutine lists::list_sort_heap_intg1_array (A, ERR, ERROR,)
 Sorts an integer array of data dimension 1 list into assending order using the heap sort method. More...
 
subroutine lists::list_sort_heap_intg2_array (A, KEY_DIMENSION, ERR, ERROR,)
 Sorts an integer array of data dimension > 1 list into assending order using the heap sort method. More...
 
subroutine lists::list_sort_heap_c_int1_array (A, ERR, ERROR,)
 Sorts an integer array of data dimension 1 list into assending order using the heap sort method. More...
 
subroutine lists::list_sort_heap_c_int2_array (A, KEY_DIMENSION, ERR, ERROR,)
 Sorts an integer array of data dimension > 1 list into assending order using the heap sort method. More...
 
subroutine lists::list_sort_heap_sp1_array (A, ERR, ERROR,)
 Sorts a real single precision array of data dimension 1 list into assending order using the heap sort method. More...
 
subroutine lists::list_sort_heap_sp2_array (A, KEY_DIMENSION, ERR, ERROR,)
 Sorts a real single precision array of data dimension > 1 list into assending order using the heap sort method. More...
 
subroutine lists::list_sort_heap_dp1_array (A, ERR, ERROR,)
 Sorts a real double precision array of data dimension 1 list into assending order using the heap sort method. More...
 
subroutine lists::list_sort_heap_dp2_array (A, KEY_DIMENSION, ERR, ERROR,)
 Sorts a real double precision array of data dimension > 1 list into assending order using the heap sort method. More...
 
subroutine lists::list_sort_shell_intg1_array (A, ERR, ERROR,)
 Sorts an integer array of data dimension 1 list into either assending or descending order using the shell sort method. More...
 
subroutine lists::list_sort_shell_intg2_array (A, KEY_DIMENSION, ERR, ERROR,)
 Sorts an integer array of data dimension > 1 list into either assending or descending order using the shell sort method. More...
 
subroutine lists::list_sort_shell_c_int1_array (A, ERR, ERROR,)
 Sorts an integer array of data dimension 1 list into either assending or descending order using the shell sort method. More...
 
subroutine lists::list_sort_shell_c_int2_array (A, KEY_DIMENSION, ERR, ERROR,)
 Sorts an integer array of data dimension > 1 list into either assending or descending order using the shell sort method. More...
 
subroutine lists::list_sort_shell_sp1_array (A, ERR, ERROR,)
 Sorts a real single precision array of data dimension 1 list into either assending or descending order using the shell sort method. More...
 
subroutine lists::list_sort_shell_sp2_array (A, KEY_DIMENSION, ERR, ERROR,)
 Sorts a real single precision array of data dimension > 1 list into either assending or descending order using the shell sort method. More...
 
subroutine lists::list_sort_shell_dp1_array (A, ERR, ERROR,)
 Sorts a real double precision array of data dimension 1 list into either assending or descending order using the shell sort method. More...
 
subroutine lists::list_sort_shell_dp2_array (A, KEY_DIMENSION, ERR, ERROR,)
 Sorts a real double precision array of data dimension 2 list into either assending or descending order using the shell sort method. More...
 
subroutine lists::list_intersection_intg_array (A, B, C, ERR, ERROR,)
 Finds the intersection of two sets (arrays), leaving the original arrays intact. More...
 
subroutine lists::list_intersection_c_int_array (A, B, C, ERR, ERROR,)
 Finds the intersection of two sets (arrays), leaving the original arrays intact. More...
 
subroutine lists::lists_subset_of_intg_array (A, B, SUBSET, ERR, ERROR,)
 Finds out whether array A is a subset of array B. More...
 
subroutine lists::lists_subset_of_c_int_array (A, B, SUBSET, ERR, ERROR,)
 Finds out whether array A is a subset of array B. More...
 

Variables

integer(intg), parameter, public lists::list_intg_type =INTEGER_TYPE
 Integer data type for a list. More...
 
integer(intg), parameter, public lists::list_sp_type =SINGLE_REAL_TYPE
 Single precision real data type for a list. More...
 
integer(intg), parameter, public lists::list_dp_type =DOUBLE_REAL_TYPE
 Double precision real data type for a list. More...
 
integer(intg), parameter lists::list_unsorted_type =1
 Unsorted list type. More...
 
integer(intg), parameter lists::list_sort_ascending_type =2
 Ascending order for sort. More...
 
integer(intg), parameter lists::list_sort_descending_type =3
 Descending order for sort. More...
 
integer(intg), parameter lists::list_bubble_sort_method =1
 Bubble sort method. More...
 
integer(intg), parameter lists::list_shell_sort_method =2
 Shell sort method. More...
 
integer(intg), parameter lists::list_heap_sort_method =3
 Heap sort method. More...
 

Detailed Description

Implements lists of base types.

Author
Chris Bradley
Todo:
Fix up and have this module use the sorting module for sorts

LICENSE

Version: MPL 1.1/GPL 2.0/LGPL 2.1

The contents of this file are subject to the Mozilla Public License Version 1.1 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.mozilla.org/MPL/

Software distributed under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License.

The Original Code is OpenCMISS

The Initial Developer of the Original Code is University of Auckland, Auckland, New Zealand, the University of Oxford, Oxford, United Kingdom and King's College, London, United Kingdom. Portions created by the University of Auckland, the University of Oxford and King's College, London are Copyright (C) 2007-2010 by the University of Auckland, the University of Oxford and King's College, London. All Rights Reserved.

Contributor(s):

Alternatively, the contents of this file may be used under the terms of either the GNU General Public License Version 2 or later (the "GPL"), or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), in which case the provisions of the GPL or the LGPL are applicable instead of those above. If you wish to allow use of your version of this file only under the terms of either the GPL or the LGPL, and not to allow others to use your version of this file under the terms of the MPL, indicate your decision by deleting the provisions above and replace them with the notice and other provisions required by the GPL or the LGPL. If you do not delete the provisions above, a recipient may use your version of this file under the terms of any one of the MPL, the GPL or the LGPL.

Definition in file lists.f90.