Explore chapters and articles related to this topic
Pointers
Published in Subrata Ray, Fortran 2018 with Parallel Programming, 2019
We now give an example of doubly linked list. In a doubly linked list, each record has two referencing pointers. In our case, they are prior and next. The prior pointer points to the previous record, and the next pointer points to the next record in the list. The prior pointer corresponding to the first record is nullified as there is no record before the first record. The next pointer corresponding to the last record is also nullified as there is no record after the last record. Two more pointers start and last always point to the first and the last record, respectively. The program will create a telephone directory in the memory.
Algorithmic Improvements to MCNP5 for High-Resolution Fusion Neutronics Analyses
Published in Fusion Science and Technology, 2018
Scott W. Mosher, Stephen C. Wilson
In ORNL-TN, a doubly linked list data structure13 is used when editing the cell definitions. Unlike arrays, inserting and deleting elements in a linked list are O(1) operations because they merely involve the manipulation of the links between elements. At the beginning of the editing process, a temporary array is allocated to have the same size as the existing cell definitions array. This is easily accommodated because even for very large models, the array consumes only a few megabytes of memory. Then for each cell, the definition elements are copied from the definitions array into a linked list structure where the editing steps are performed. When editing is completed, the elements from the linked list are copied onto the end of the temporary array. When all cell definitions have been processed, the temporary array is copied onto the definition array, overwriting the original contents, and the temporary array is de-allocated. Using this algorithm, the complexity of the cell editing process is O(n) in the asymptotic limit.
Efficient numerical methods to solve sparse linear equations with application to PageRank
Published in Optimization Methods and Software, 2022
Anton Anikin, Alexander Gasnikov, Alexander Gornov, Dmitry Kamzolov, Yury Maximov, Yurii Nesterov
Using the doubly-linked list of binary heaps, described in Section 2, the minimal coordinate of can be computed in time. Then is and and also