26#
if defined(mumps_f2003)
27 TYPE (
idll_t ),
POINTER,
INTENT ( OUT ) :: dll
29 TYPE (
idll_t ),
POINTER :: dll
32 ALLOCATE ( dll, stat=ierr )
33 IF ( ierr .NE. 0 )
THEN
45 TYPE (
idll_t ),
POINTER,
INTENT ( OUT ) :: dll
47 TYPE (
idll_t ),
POINTER :: dll
50IF ( .NOT.
associated ( dll ) )
THEN
54 DO WHILE (
associated ( dll%FRONT ) )
56 dll%FRONT => dll%FRONT%NEXT
64#
if defined(mumps_f2003)
65 TYPE (
idll_t ),
POINTER,
INTENT ( INOUT ) :: dll
67 TYPE (
idll_t ),
POINTER :: dll
69 INTEGER,
INTENT ( IN ) :: elmt
72 IF ( .NOT.
associated ( dll ) )
THEN
76 ALLOCATE( node, stat=ierr )
77 IF ( ierr .NE. 0 )
THEN
82 node%NEXT => dll%FRONT
84 IF (
associated ( dll%FRONT ) )
THEN
85 dll%FRONT%PREV => node
88 IF ( .NOT.
associated ( dll%BACK ) )
THEN
95#
if defined(mumps_f2003)
96 TYPE (
idll_t ),
POINTER,
INTENT ( INOUT ) :: dll
98 TYPE (
idll_t ),
POINTER :: dll
100 INTEGER,
INTENT ( OUT ) :: elmt
102 IF ( .NOT.
associated ( dll ) )
THEN
106 IF ( .NOT.
associated ( dll%FRONT ) )
THEN
110 elmt = dll%FRONT%ELMT
112 dll%FRONT => dll%FRONT%NEXT
113 IF (
associated ( dll%FRONT ) )
THEN
114 NULLIFY ( dll%FRONT%PREV )
116 IF (
associated ( dll%BACK, aux ) )
THEN
124#
if defined(mumps_f2003)
125 TYPE (
idll_t ),
POINTER,
INTENT ( INOUT ) :: dll
127 TYPE (
idll_t ),
POINTER :: dll
129 INTEGER,
INTENT ( IN ) :: elmt
132 IF ( .NOT.
associated ( dll ) )
THEN
136 ALLOCATE( node, stat=ierr )
137 IF ( ierr .NE. 0 )
THEN
142 NULLIFY ( node%NEXT )
143 node%PREV => dll%BACK
144 IF (
associated ( dll%BACK ) )
THEN
145 dll%BACK%NEXT => node
148 IF ( .NOT.
associated ( dll%FRONT ) )
THEN
155#
if defined(mumps_f2003)
156 TYPE (
idll_t ),
POINTER,
INTENT ( INOUT ) :: dll
158 TYPE (
idll_t ),
POINTER :: dll
160 INTEGER,
INTENT ( OUT ) :: elmt
162 IF ( .NOT.
associated ( dll ) )
THEN
166 IF ( .NOT.
associated ( dll%BACK ) )
THEN
172 dll%BACK => dll%BACK%PREV
173 IF (
associated ( dll%BACK ) )
THEN
174 NULLIFY ( dll%BACK%NEXT )
176 IF (
associated ( dll%FRONT, aux ) )
THEN
177 NULLIFY ( dll%FRONT )
184# defined(mumps_f2003)
185 TYPE (
idll_t ),
POINTER,
INTENT ( INOUT ) :: dll
187 TYPE (
idll_t ),
POINTER :: dll
189 INTEGER,
INTENT ( IN ) :: pos, elmt
193 IF ( .NOT.
associated ( dll ) )
THEN
197 IF ( pos .LE. 0 )
THEN
204 DO WHILE ( ( cpt .LT. pos ) .AND.
205 & (
associated ( new_ptr ) ) )
207 new_ptr => new_ptr%NEXT
210 ALLOCATE ( node, stat=ierr )
211 IF ( ierr .NE. 0 )
THEN
216 IF ( .NOT.
associated ( old_ptr ) )
THEN
217 IF ( .NOT.
associated ( new_ptr ) )
THEN
218 NULLIFY ( node%PREV )
219 NULLIFY ( node%NEXT )
223 NULLIFY ( node%PREV )
229 IF ( .NOT.
associated ( new_ptr ) )
THEN
231 NULLIFY ( node%NEXT )
245#
if defined(mumps_f2003)
246 TYPE (
idll_t ),
POINTER,
INTENT ( INOUT ) :: dll
247 TYPE (
idll_node_t ),
POINTER,
INTENT ( IN ) :: node_after
249 TYPE (
idll_t ),
POINTER :: dll
252 INTEGER,
INTENT ( IN ) :: elmt
255 ALLOCATE ( node_before, stat=ierr )
256 IF ( ierr .NE. 0 )
THEN
260 node_before%ELMT = elmt
261 IF ( .NOT.
associated ( node_after%PREV ) )
THEN
262 node_after%PREV => node_before
263 node_before%NEXT => node_after
264 NULLIFY ( node_before%PREV )
265 dll%FRONT => node_before
267 node_before%NEXT => node_after
268 node_before%PREV => node_after%PREV
269 node_after%PREV => node_before
270 node_before%PREV%NEXT => node_before
276#
if defined(mumps_f2003)
277 TYPE (
idll_t ),
POINTER,
INTENT ( INOUT ) :: dll
278 TYPE (
idll_node_t ),
POINTER,
INTENT ( IN ) :: node_before
280 TYPE (
idll_t ),
POINTER :: dll
283 INTEGER,
INTENT ( IN ) :: elmt
286 ALLOCATE ( node_after, stat=ierr )
287 IF ( ierr .NE. 0 )
THEN
291 node_after%ELMT = elmt
292 IF ( .NOT.
associated ( node_before%NEXT ) )
THEN
293 node_before%NEXT => node_after
294 node_after%PREV => node_before
295 NULLIFY ( node_after%NEXT )
296 dll%BACK => node_after
298 node_after%PREV => node_before
299 node_after%NEXT => node_before%NEXT
300 node_before%NEXT => node_after
301 node_after%NEXT%PREV => node_after
307#
if defined(mumps_f2003)
308 TYPE (
idll_t ),
POINTER,
INTENT ( INOUT ) :: dll
310 TYPE (
idll_t ),
POINTER :: dll
312 INTEGER,
INTENT ( IN ) :: pos
313 INTEGER,
INTENT ( OUT ) :: elmt
316 IF ( .NOT.
associated ( dll ) )
THEN
320 IF ( pos .LE. 0 )
THEN
326 DO WHILE ( ( cpt .LT. pos ) .AND. (
associated ( aux ) ) )
330 IF ( .NOT.
associated ( aux ) )
THEN
339#
if defined(mumps_f2003)
340 TYPE (
idll_t ),
POINTER,
INTENT ( INOUT ) :: dll
342 TYPE (
idll_t ),
POINTER :: dll
344 INTEGER,
INTENT ( IN ) :: pos
345 INTEGER,
INTENT ( OUT ) :: elmt
348 IF ( .NOT.
associated ( dll )
THEN
354 DO WHILE ( (
associated ( aux ) ) .AND.
359 IF (
associated ( aux ) )
THEN
360 IF ( .NOT.
associated ( aux%PREV ) )
THEN
361 IF ( .NOT.
associated ( aux%NEXT ) )
THEN
362 NULLIFY ( dll%FRONT )
365 NULLIFY ( aux%NEXT%PREV )
366 dll%FRONT => aux%NEXT
369 IF ( .NOT.
associated ( aux%NEXT ) )
THEN
370 NULLIFY ( aux%PREV%NEXT )
373 aux%PREV%NEXT => aux%NEXT
374 aux%NEXT%PREV => aux%PREV
387#
if defined(mumps_f2003)
388 TYPE (
idll_t ),
POINTER,
INTENT ( INOUT ) :: dll
390 TYPE (
idll_t ),
POINTER :: dll
392 INTEGER,
INTENT ( IN ) :: elmt
393 INTEGER,
INTENT ( OUT ) :: pos
396 IF ( .NOT.
associated ( dll ) )
THEN
402 DO WHILE ( (
associated ( aux ) ) .AND.
403 & ( aux%ELMT .NE. elmt ) )
407 IF (
associated ( aux ) )
THEN
408 IF ( .NOT.
associated ( aux%PREV ) )
THEN
409 IF ( .NOT.
associated ( aux%NEXT ) )
THEN
410 NULLIFY ( dll%FRONT )
413 NULLIFY ( aux%NEXT%PREV )
414 dll%FRONT => aux%NEXT
417 IF ( .NOT.
associated ( aux%NEXT ) )
THEN
418 NULLIFY ( aux%PREV%NEXT )
421 aux%PREV%NEXT => aux%NEXT
422 aux%NEXT%PREV => aux%PREV
435#
if defined(mumps_f2003)
436 TYPE (
idll_t ),
POINTER,
INTENT ( IN ) ::
438 TYPE (
idll_t ),
POINTER :: dll
443 IF ( .NOT.
associated ( dll ) )
THEN
448 DO WHILE (
associated ( aux ) )
456#
if defined(mumps_f2003)
457 TYPE (
idll_t ),
POINTER,
INTENT ( IN ) :: dll
458 TYPE (
idll_node_t ),
POINTER,
INTENT ( OUT ) :: ptr
460 TYPE (
idll_t ),
POINTER :: dll
461 TYPE ( ),
POINTER :: ptr
463 IF ( .NOT.
associated ( dll ) )
THEN
472#
if defined(mumps_f2003)
473 TYPE (
idll_t ),
POINTER,
INTENT ( IN ) :: dll
474 TYPE (
idll_node_t ),
POINTER,
INTENT ( OUT ) :: ptr
476 TYPE (
idll_t ),
POINTER :: dll
479 IF ( .NOT.
associated ( dll ) )
THEN
488#
if defined(mumps_f2003)
489 TYPE (
idll_t ),
POINTER,
INTENT ( IN ) :: dll
491 TYPE (
idll_t ),
POINTER :: dll
498 TYPE (
idll_t ),
POINTER,
INTENT ( IN ) :: dll
499 INTEGER,
POINTER,
DIMENSION (:),
INTENT ( OUT ) :: array
501 TYPE (
idll_t ),
POINTER :: dll
502 INTEGER,
POINTER,
DIMENSION (:) :: array
504 INTEGER,
INTENT ( OUT ) :: length
507 IF ( .NOT.
associated ( dll ) )
THEN
512 ALLOCATE ( array(
max(1,length) ), stat=ierr )
513 IF ( ierr .NE. 0 )
THEN
519 DO WHILE (
associated ( aux ) )
520 array( i ) = aux%ELMT
531 DOUBLE PRECISION :: elmt
539#
if defined(mumps_f2003)
540 TYPE (
ddll_t ),
POINTER,
INTENT ( OUT ) :: dll
542 TYPE (
ddll_t ),
POINTER :: dll
545 ALLOCATE ( dll, stat=ierr )
546 IF ( ierr .NE. 0 )
THEN
550 NULLIFY ( dll%FRONT )
557#
if defined(mumps_f2003)
558 TYPE (
ddll_t ),
POINTER,
INTENT ( INOUT ) :: dll
560 TYPE (
ddll_t ),
POINTER :: dll
563 IF ( .NOT.
associated ( dll ) )
THEN
567 DO WHILE (
associated ( dll%FRONT ) )
569 dll%FRONT => dll%FRONT%NEXT
577#
if defined(mumps_f2003)
578 TYPE (
ddll_t ),
POINTER,
INTENT ( INOUT ) :: dll
580 TYPE (
ddll_t ),
POINTER :: dll
582 DOUBLE PRECISION,
INTENT ( IN ) :: elmt
585 IF ( .NOT.
associated ( dll ) )
THEN
589 ALLOCATE( node, stat=ierr )
590 IF ( ierr .NE. 0 )
THEN
595 node%NEXT => dll%FRONT
596 NULLIFY ( node%PREV )
597 IF (
associated ( dll%FRONT ) )
THEN
598 dll%FRONT%PREV => node
601 IF ( .NOT.
associated ( dll%BACK ) )
THEN
608#
if defined(mumps_f2003)
609 TYPE (
ddll_t ),
POINTER,
INTENT ( INOUT ) :: dll
611 TYPE (
ddll_t ),
POINTER :: dll
613 DOUBLE PRECISION,
INTENT ( OUT ) :: elmt
615 IF ( .NOT.
associated ( dll ) )
THEN
619 IF ( .NOT.
associated ( dll%FRONT ) )
THEN
623 elmt = dll%FRONT%ELMT
625 dll%FRONT => dll%FRONT%NEXT
626 IF (
associated ( dll%FRONT ) )
THEN
627 NULLIFY ( dll%FRONT%PREV )
629 IF (
associated ( dll%BACK, aux ) )
THEN
637#
if defined(mumps_f2003)
638 TYPE (
ddll_t ),
POINTER,
INTENT ( INOUT ) :: dll
640 TYPE (
ddll_t ),
POINTER ::
642 DOUBLE PRECISION,
INTENT ( IN ) :: elmt
645 IF ( .NOT.
associated ( dll ) )
THEN
649 ALLOCATE( node, stat=ierr )
650 IF ( ierr .NE. 0 )
THEN
655 NULLIFY ( node%NEXT )
656 node%PREV => dll%BACK
657 IF (
associated ( dll%BACK ) )
THEN
658 dll%BACK%NEXT => node
661 IF ( .NOT.
associated ( dll%FRONT ) )
THEN
668#
if defined(mumps_f2003)
669 TYPE (
ddll_t ),
POINTER,
INTENT ( INOUT ) :: dll
671 TYPE (
ddll_t ),
POINTER :: dll
673 DOUBLE PRECISION,
INTENT ( OUT ) :: elmt
675 IF ( .NOT.
associated ( dll ) )
THEN
679 IF ( .NOT.
associated ( dll%BACK ) )
THEN
685 dll%BACK => dll%BACK%PREV
686 IF (
associated ( dll%BACK ) )
THEN
687 NULLIFY ( dll%BACK%NEXT )
689 IF (
associated ( dll%FRONT, aux ) )
THEN
690 NULLIFY ( dll%FRONT )
697#
if defined(mumps_f2003)
698 TYPE (
ddll_t ),
POINTER,
INTENT ( INOUT ) :: dll
700 TYPE (
ddll_t ),
POINTER :: dll
702 INTEGER,
INTENT ( IN ) :: pos
703 DOUBLE PRECISION ,
INTENT ( IN ) :: elmt
707 IF ( .NOT.
associated ( dll ) )
THEN
711 IF ( pos .LE. 0 )
THEN
718 DO WHILE ( ( cpt .LT. pos ) .AND.
719 & (
associated ( new_ptr ) ) )
721 new_ptr => new_ptr%NEXT
724 ALLOCATE ( node, stat=ierr )
725 IF ( ierr .NE. 0 )
THEN
730 IF ( .NOT.
associated ( old_ptr ) )
THEN
731 IF ( .NOT.
associated ( new_ptr ) )
THEN
732 NULLIFY ( node%PREV )
733 NULLIFY ( node%NEXT )
737 NULLIFY ( node%PREV )
743 IF ( .NOT.
associated ( new_ptr ) )
THEN
745 NULLIFY ( node%NEXT )
759#
if defined(mumps_f2003)
760 TYPE (
ddll_t ),
POINTER,
INTENT ( INOUT ) :: dll
761 TYPE (
ddll_node_t ),
POINTER,
INTENT ( IN ) :: node_after
763 TYPE (
ddll_t ),
POINTER :: dll
766 DOUBLE PRECISION,
INTENT ( IN ) :: elmt
769 ALLOCATE ( node_before, stat=ierr )
770 IF ( ierr .NE. 0 )
THEN
774 node_before%ELMT = elmt
775 IF ( .NOT.
associated ( node_after%PREV ) )
THEN
776 node_after%PREV => node_before
777 node_before%NEXT => node_after
778 NULLIFY ( node_before%PREV )
779 dll%FRONT => node_before
781 node_before%NEXT => node_after
782 node_before%PREV => node_after%PREV
783 node_after%PREV => node_before
784 node_before%PREV%NEXT => node_before
790#
if defined(mumps_f2003)
791 TYPE (
ddll_t ),
POINTER,
INTENT ( INOUT ) :: dll
792 TYPE (
ddll_node_t ),
POINTER,
INTENT ( IN ) :: node_before
794 TYPE (
ddll_t ),
POINTER :: dll
797 DOUBLE PRECISION,
INTENT ( IN ) :: elmt
800 ALLOCATE ( node_after, stat=ierr )
801 IF ( ierr .NE. 0 )
THEN
805 node_after%ELMT = elmt
806 IF ( .NOT.
associated ( node_before%NEXT ) )
THEN
807 node_before%NEXT => node_after
808 node_after%PREV => node_before
809 NULLIFY ( node_after%NEXT )
810 dll%BACK => node_after
812 node_after%PREV => node_before
813 node_after%NEXT => node_before%NEXT
814 node_before%NEXT => node_after
815 node_after%NEXT%PREV => node_after
821#
if defined(mumps_f2003)
822 TYPE (
ddll_t ),
POINTER,
INTENT ( INOUT ) :: dll
824 TYPE ( ),
POINTER :: dll
826 INTEGER,
INTENT ( IN ) :: pos
827 DOUBLE PRECISION,
INTENT ( OUT ) :: elmt
830 IF ( .NOT.
associated ( dll ) )
THEN
834 IF ( pos .LE. 0 )
THEN
840 DO WHILE ( ( cpt .LT. pos ) .AND. (
associated ( aux ) ) )
844 IF ( .NOT.
associated ( aux ) )
THEN
853#
if defined(mumps_f2003)
854 TYPE (
ddll_t ),
POINTER,
INTENT ( INOUT ) :: dll
856 TYPE ( ),
POINTER :: dll
858 INTEGER,
INTENT ( IN ) :: pos
859 DOUBLE PRECISION,
INTENT ( OUT ) :: elmt
862 IF ( .NOT.
associated ( dll ) )
THEN
868 DO WHILE ( (
associated ( aux ) ) .AND.
873 IF (
associated ( aux ) )
THEN
874 IF ( .NOT.
associated ( aux%PREV ) )
THEN
875 IF ( .NOT.
associated ( aux%NEXT ) )
THEN
876 NULLIFY ( dll%FRONT )
879 NULLIFY ( aux%NEXT%PREV )
880 dll%FRONT => aux%NEXT
883 IF ( .NOT.
associated ( aux%NEXT ) )
THEN
884 NULLIFY ( aux%PREV%NEXT )
887 aux%PREV%NEXT => aux%NEXT
888 aux%NEXT%PREV => aux%PREV
901#
if defined(mumps_f2003)
902 TYPE (
ddll_t ),
POINTER,
INTENT ( INOUT ) :: dll
904 TYPE (
ddll_t ),
POINTER :: dll
906 DOUBLE PRECISION,
INTENT ( IN ) :: elmt
907 INTEGER,
INTENT ( OUT ) ::
910 IF ( .NOT.
associated ( dll ) )
THEN
916 DO WHILE ( (
associated ( aux ) ) .AND.
917 & ( aux%ELMT .NE. elmt ) )
921 IF (
associated ( aux ) )
THEN
922 IF ( .NOT.
associated ( aux%PREV ) )
THEN
923 IF ( .NOT.
associated ( aux%NEXT ) )
THEN
924 NULLIFY ( dll%FRONT )
927 NULLIFY ( aux%NEXT%PREV )
928 dll%FRONT => aux%NEXT
931 IF ( .NOT.
associated ( aux%NEXT ) )
THEN
932 NULLIFY ( aux%PREV%NEXT )
935 aux%PREV%NEXT => aux%NEXT
936 aux%NEXT%PREV => aux%PREV
949#
if defined(mumps_f2003)
950 TYPE (
ddll_t ),
POINTER,
INTENT ( IN ) :: dll
952 TYPE (
ddll_t ),
POINTER :: dll
956 IF ( .NOT.
associated ( dll ) )
THEN
962 DO WHILE (
associated ( aux ) )
970#
if defined(mumps_f2003)
971 TYPE (
ddll_t ),
POINTER,
INTENT ( IN ) :: dll
972 TYPE (
ddll_node_t ),
POINTER,
INTENT ( OUT ) :: ptr
974 TYPE (
ddll_t ),
POINTER :: dll
977 IF ( .NOT.
associated ( dll ) )
THEN
986#
if defined(mumps_f2003)
987 TYPE (
ddll_t ),
POINTER,
INTENT ( IN ) :: dll
988 TYPE (
ddll_node_t ),
POINTER,
INTENT ( OUT ) :: ptr
990 TYPE (
ddll_t ),
POINTER :: dll
993 IF ( .NOT.
associated ( dll ) )
THEN
1003 TYPE (
ddll_t ),
POINTER,
INTENT ( IN ) :: dll
1005 TYPE (
ddll_t ),
POINTER :: dll
1011#
if defined(mumps_f2003)
1012 TYPE (
ddll_t ),
POINTER,
INTENT ( IN ) :: dll
1013 DOUBLE PRECISION,
POINTER,
DIMENSION(:),
INTENT(OUT) :: array
1015 TYPE (
ddll_t ),
POINTER :: dll
1016 DOUBLE PRECISION,
POINTER,
DIMENSION(:) :: array
1018 INTEGER,
INTENT ( OUT ) :: length
1021 IF ( .NOT.
associated ( dll ) )
THEN
1026 ALLOCATE ( array(
max(1,length) ), stat=ierr )
1027 IF ( ierr .NE. 0 )
THEN
1033 DO WHILE (
associated ( aux ) )
1034 array( i ) = aux%ELMT
if(complex_arithmetic) id
integer function ddll_pop_front(dll, elmt)
integer function ddll_length(dll)
integer function ddll_remove_pos(dll, pos, elmt)
integer function ddll_insert_after(dll, node_before, elmt)
integer function ddll_create(dll)
integer function ddll_push_front(dll, elmt)
integer function ddll_iterator_begin(dll, ptr)
integer function ddll_lookup(dll, pos, elmt)
integer function ddll_remove_elmt(dll, elmt, pos)
integer function ddll_pop_back(dll, elmt)
integer function ddll_destroy(dll)
logical function ddll_is_empty(dll)
integer function ddll_2_array(dll, array, length)
integer function ddll_push_back(dll, elmt)
integer function ddll_insert(dll, pos, elmt)
integer function ddll_iterator_end(dll, ptr)
integer function ddll_insert_before(dll, node_after, elmt)
integer function idll_push_back(dll, elmt)
integer function idll_lookup(dll, pos, elmt)
integer function idll_length(dll)
integer function idll_2_array(dll, array, length)
integer function idll_insert_after(dll, node_before, elmt)
integer function idll_iterator_begin(dll, ptr)
integer function idll_insert(dll, pos, elmt)
integer function idll_create(dll)
integer function idll_remove_elmt(dll, elmt, pos)
integer function idll_remove_pos(dll, pos, elmt)
integer function idll_iterator_end(dll, ptr)
integer function idll_destroy(dll)
integer function idll_pop_front(dll, elmt)
integer function idll_insert_before(dll, node_after, elmt)
logical function idll_is_empty(dll)
integer function idll_pop_back(dll, elmt)
integer function idll_push_front(dll, elmt)