1 /* @include ajarr *************************************************************
2 **
3 ** AJAX ARRAY functions
4 **
5 ** These functions control all aspects of AJAX array utilities
6 **
7 ** @author Copyright (C) 1999 Alan Bleasby
8 ** @version $Revision: 1.16 $
9 ** @modified Mar 12 1999 ajb First version
10 ** @modified May 10 2000 ajb added dynamically allocated numeric arrays
11 ** @modified $Date: 2011/10/18 14:23:40 $ by $Author: rice $
12 ** @@
13 **
14 ** This library is free software; you can redistribute it and/or
15 ** modify it under the terms of the GNU Lesser General Public
16 ** License as published by the Free Software Foundation; either
17 ** version 2.1 of the License, or (at your option) any later version.
18 **
19 ** This library is distributed in the hope that it will be useful,
20 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
21 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
22 ** Lesser General Public License for more details.
23 **
24 ** You should have received a copy of the GNU Lesser General Public
25 ** License along with this library; if not, write to the Free Software
26 ** Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
27 ** MA  02110-1301,  USA.
28 **
29 ******************************************************************************/
30 
31 #ifndef AJARR_H
32 #define AJARR_H
33 
34 /* ========================================================================= */
35 /* ============================= include files ============================= */
36 /* ========================================================================= */
37 
38 #include "ajdefine.h"
39 #include "ajstr.h"
40 
41 #include <sys/types.h>
42 
43 AJ_BEGIN_DECLS
44 
45 
46 
47 
48 /* ========================================================================= */
49 /* =============================== constants =============================== */
50 /* ========================================================================= */
51 
52 
53 
54 
55 /* ========================================================================= */
56 /* ============================== public data ============================== */
57 /* ========================================================================= */
58 
59 
60 
61 
62 /* @data AjPChar **************************************************************
63 **
64 ** Ajax character object.
65 **
66 ** Holds a character array with additional data.
67 ** The length is known and held internally.
68 **
69 ** Saves on length calculation, and allows growth in reserved memory without
70 ** changing the pointer in the calling routine.
71 **
72 ** AjPChar is implemented as a pointer to a C data structure.
73 **
74 ** @alias AjSChar
75 ** @alias AjOChar
76 **
77 ** @new    ajChararrNew Default constructor
78 ** @new    ajChararrNewL Constructor with reserved size
79 ** @delete ajChararrDel Default destructor
80 ** @cast   ajChararrGet Retrieve a character from an array
81 ** @modify ajChararrPut Load a character array element
82 ** @cast   ajChararrChararr Retrieve internal pointer
83 **
84 ** @attr Res [ajuint] Reserved space in case of extension
85 ** @attr Len [ajuint] Actual length used
86 ** @attr Ptr [char*] Array of characters
87 ** @@
88 ******************************************************************************/
89 
90 typedef struct AjSChar
91 {
92     ajuint Res;
93     ajuint Len;
94     char *Ptr;
95 } AjOChar;
96 
97 #define AjPChar AjOChar*
98 
99 
100 
101 
102 /* @data AjPInt ***************************************************************
103 **
104 ** Ajax integer object.
105 **
106 ** Holds an integer array with additional data.
107 ** The length is known and held internally.
108 **
109 ** AjPInt is implemented as a pointer to a C data structure.
110 **
111 ** @alias AjSInt
112 ** @alias AjOInt
113 **
114 ** @new    ajIntNew Default constructor
115 ** @new    ajIntNewL Constructor with reserved size
116 ** @delete ajIntDel Default destructor
117 ** @cast   ajIntGet Retrieve an integer from an array
118 ** @modify ajIntPut Load an integer array element
119 ** @cast   ajIntInt Retrieve internal pointer
120 **
121 ** @attr Res [ajuint] Reserved space in case of extension
122 ** @attr Len [ajuint] Actual length used
123 ** @attr Ptr [ajint*] Array of integers
124 ** @@
125 ******************************************************************************/
126 
127 typedef struct AjSInt
128 {
129     ajuint Res;
130     ajuint Len;
131     ajint *Ptr;
132 } AjOInt;
133 
134 #define AjPInt AjOInt*
135 
136 
137 
138 
139 /* @data AjPInt2d *************************************************************
140 **
141 ** Ajax 2d integer object.
142 **
143 ** Holds an integer array with additional data.
144 ** The length is known and held internally.
145 **
146 ** AjPInt2d is implemented as a pointer to a C data structure.
147 **
148 ** @alias AjSInt2d
149 ** @alias AjOInt2d
150 **
151 ** @new    ajInt2dNew Default constructor
152 ** @new    ajInt2dNewL Constructor with reserved size
153 ** @delete ajInt2dDel Default destructor
154 ** @cast   ajInt2dGet Retrieve an integer from an array
155 ** @modify ajInt2dPut Load an integer array element
156 ** @cast   ajInt2dInt Retrieve internal pointer
157 **
158 ** @attr Res [ajuint] Reserved space in case of extension
159 ** @attr Len [ajuint] Actual length used
160 ** @attr Ptr [AjPInt*] Array of integer arrays
161 ** @@
162 ******************************************************************************/
163 
164 typedef struct AjSInt2d
165 {
166     ajuint Res;
167     ajuint Len;
168     AjPInt *Ptr;
169 } AjOInt2d;
170 
171 #define AjPInt2d AjOInt2d*
172 
173 
174 
175 
176 /* @data AjPInt3d *************************************************************
177 **
178 ** Ajax 3d integer object.
179 **
180 ** Holds an integer array with additional data.
181 ** The length is known and held internally.
182 **
183 ** AjPInt3d is implemented as a pointer to a C data structure.
184 **
185 ** @alias AjSInt3d
186 ** @alias AjOInt3d
187 **
188 ** @new    ajInt3dNew Default constructor
189 ** @new    ajInt3dNewL Constructor with reserved size
190 ** @delete ajInt3dDel Default destructor
191 ** @cast   ajInt3dGet Retrieve an integer from an array
192 ** @modify ajInt3dPut Load an integer array element
193 ** @cast   ajInt3dInt Retrieve internal pointer
194 **
195 ** @attr Res [ajuint] Reserved space in case of extension
196 ** @attr Len [ajuint] Actual length used
197 ** @attr Ptr [AjPInt2d*] Array of 2d integer arrays
198 ** @@
199 ******************************************************************************/
200 
201 typedef struct AjSInt3d
202 {
203     ajuint Res;
204     ajuint Len;
205     AjPInt2d *Ptr;
206 } AjOInt3d;
207 
208 #define AjPInt3d AjOInt3d*
209 
210 
211 
212 
213 /* @data AjPFloat *************************************************************
214 **
215 ** Ajax float object.
216 **
217 ** Holds a float array with additional data.
218 ** The length is known and held internally.
219 **
220 ** AjPFloat is implemented as a pointer to a C data structure.
221 **
222 ** @alias AjSFloat
223 ** @alias AjOFloat
224 **
225 ** @new    ajFloatNew Default constructor
226 ** @new    ajFloatNewL Constructor with reserved size
227 ** @delete ajFloatDel Default destructor
228 ** @cast   ajFloatGet Retrieve a float from an array
229 ** @modify ajFloatPut Load a float array element
230 ** @cast   ajFloatFloat Retrieve internal pointer
231 **
232 ** @attr Res [ajuint] Reserved space in case of extension
233 ** @attr Len [ajuint] Actual length used
234 ** @attr Ptr [float*] Array of floats
235 ** @@
236 ******************************************************************************/
237 
238 typedef struct AjSFloat
239 {
240     ajuint Res;
241     ajuint Len;
242     float *Ptr;
243 } AjOFloat;
244 
245 #define AjPFloat AjOFloat*
246 
247 
248 
249 
250 /* @data AjPFloat2d ***********************************************************
251 **
252 ** Ajax 2d float object.
253 **
254 ** Holds a 2d float array with additional data.
255 ** The length is known and held internally.
256 **
257 ** AjPFloat2d is implemented as a pointer to a C data structure.
258 **
259 ** @alias AjSFloat2d
260 ** @alias AjOFloat2d
261 **
262 ** @new    ajFloat2dNew Default constructor
263 ** @new    ajFloat2dNewL Constructor with reserved size
264 ** @delete ajFloat2dDel Default destructor
265 ** @cast   ajFloat2dGet Retrieve a float from an array
266 ** @modify ajFloat2dPut Load a float array element
267 ** @cast   ajFloat2dFloat Retrieve internal pointer
268 **
269 ** @attr Res [ajuint] Reserved space in case of extension
270 ** @attr Len [ajuint] Actual length used
271 ** @attr Ptr [AjPFloat*] Array of float arrays
272 ** @@
273 ******************************************************************************/
274 
275 typedef struct AjSFloat2d
276 {
277     ajuint Res;
278     ajuint Len;
279     AjPFloat *Ptr;
280 } AjOFloat2d;
281 
282 #define AjPFloat2d AjOFloat2d*
283 
284 
285 
286 
287 /* @data AjPFloat3d ***********************************************************
288 **
289 ** Ajax 3d float object.
290 **
291 ** Holds a 3d float array with additional data.
292 ** The length is known and held internally.
293 **
294 ** AjPFloat3d is implemented as a pointer to a C data structure.
295 **
296 ** @alias AjSFloat3d
297 ** @alias AjOFloat3d
298 **
299 ** @new    ajFloat3dNew Default constructor
300 ** @new    ajFloat3dNewL Constructor with reserved size
301 ** @delete ajFloat3dDel Default destructor
302 ** @cast   ajFloat3dGet Retrieve a float from an array
303 ** @modify ajFloat3dPut Load a float array element
304 ** @cast   ajFloat3dFloat Retrieve internal pointer
305 **
306 ** @attr Res [ajuint] Reserved space in case of extension
307 ** @attr Len [ajuint] Actual length used
308 ** @attr Ptr [AjPFloat2d*] Array of 2d float arrays
309 ** @@
310 ******************************************************************************/
311 
312 typedef struct AjSFloat3d
313 {
314     ajuint Res;
315     ajuint Len;
316     AjPFloat2d  *Ptr;
317 } AjOFloat3d;
318 
319 #define AjPFloat3d AjOFloat3d*
320 
321 
322 
323 
324 /* @data AjPDouble ************************************************************
325 **
326 ** Ajax double object.
327 **
328 ** Holds a double array with additional data.
329 ** The length is known and held internally.
330 **
331 ** AjPDouble is implemented as a pointer to a C data structure.
332 **
333 ** @alias AjSDouble
334 ** @alias AjODouble
335 **
336 ** @new    ajDoubleNew Default constructor
337 ** @new    ajDoubleNewL Constructor with reserved size
338 ** @delete ajDoubleDel Default destructor
339 ** @cast   ajDoubleGet Retrieve a double from an array
340 ** @modify ajDoublePut Load a double array element
341 ** @cast   ajDoubleDouble Retrieve internal pointer
342 **
343 ** @attr Res [ajuint] Reserved space in case of extension
344 ** @attr Len [ajuint] Actual length used
345 ** @attr Ptr [double*] Array of doubles
346 ** @@
347 ******************************************************************************/
348 
349 typedef struct AjSDouble
350 {
351     ajuint Res;
352     ajuint Len;
353     double *Ptr;
354 } AjODouble;
355 
356 #define AjPDouble AjODouble*
357 
358 
359 
360 
361 /* @data AjPDouble2d **********************************************************
362 **
363 ** Ajax 2d double object.
364 **
365 ** Holds a 2d double array with additional data.
366 ** The length is known and held internally.
367 **
368 ** AjPDouble2d is implemented as a pointer to a C data structure.
369 **
370 ** @alias AjSDouble2d
371 ** @alias AjODouble2d
372 **
373 ** @new    ajDouble2dNew Default constructor
374 ** @new    ajDouble2dNewL Constructor with reserved size
375 ** @delete ajDouble2dDel Default destructor
376 ** @cast   ajDouble2dGet Retrieve a double from an array
377 ** @modify ajDouble2dPut Load a double array element
378 ** @cast   ajDouble2dDouble Retrieve internal pointer
379 **
380 ** @attr Res [ajuint] Reserved space in case of extension
381 ** @attr Len [ajuint] Actual length used
382 ** @attr Ptr [AjPDouble*] Array of double arrays
383 ** @@
384 ******************************************************************************/
385 
386 typedef struct AjSDouble2d
387 {
388     ajuint Res;
389     ajuint Len;
390     AjPDouble *Ptr;
391 } AjODouble2d;
392 
393 #define AjPDouble2d AjODouble2d*
394 
395 
396 
397 
398 /* @data AjPDouble3d **********************************************************
399 **
400 ** Ajax 3d double object.
401 **
402 ** Holds a 3d double array with additional data.
403 ** The length is known and held internally.
404 **
405 ** AjPDouble3d is implemented as a pointer to a C data structure.
406 **
407 ** @alias AjSDouble3d
408 ** @alias AjODouble3d
409 **
410 ** @new    ajDouble3dNew Default constructor
411 ** @new    ajDouble3dNewL Constructor with reserved size
412 ** @delete ajDouble3dDel Default destructor
413 ** @cast ajDouble3dGet Retrieve a double from an array
414 ** @modify ajDouble3dPut Load a double array element
415 ** @cast   ajDouble3dDouble Retrieve internal pointer
416 **
417 ** @attr Res [ajuint] Reserved space in case of extension
418 ** @attr Len [ajuint] Actual length used
419 ** @attr Ptr [AjPDouble2d*] Array of 2d double arrays
420 ** @@
421 ******************************************************************************/
422 
423 typedef struct AjSDouble3d
424 {
425     ajuint Res;
426     ajuint Len;
427     AjPDouble2d  *Ptr;
428 } AjODouble3d;
429 
430 #define AjPDouble3d AjODouble3d*
431 
432 
433 
434 
435 /* @data AjPShort *************************************************************
436 **
437 ** Ajax short object.
438 **
439 ** Holds a short array with additional data.
440 ** The length is known and held internally.
441 **
442 ** AjPShort is implemented as a pointer to a C data structure.
443 **
444 ** @alias AjSShort
445 ** @alias AjOShort
446 **
447 ** @new    ajShortNew Default constructor
448 ** @new    ajShortNewL Constructor with reserved size
449 ** @delete ajShortDel Default destructor
450 ** @cast   ajShortGet Retrieve a short from an array
451 ** @modify ajShortPut Load a short array element
452 ** @cast   ajShortShort Retrieve internal pointer
453 **
454 ** @attr Res [ajuint] Reserved space in case of extension
455 ** @attr Len [ajuint] Actual length used
456 ** @attr Ptr [short*] Array of shorts
457 ** @@
458 ******************************************************************************/
459 
460 typedef struct AjSShort
461 {
462     ajuint Res;
463     ajuint Len;
464     short *Ptr;
465 } AjOShort;
466 
467 #define AjPShort AjOShort*
468 
469 
470 
471 
472 /* @data AjPShort2d ***********************************************************
473 **
474 ** Ajax 2d short object.
475 **
476 ** Holds a 2d short array with additional data.
477 ** The length is known and held internally.
478 **
479 ** AjPShort2d is implemented as a pointer to a C data structure.
480 **
481 ** @alias AjSShort2d
482 ** @alias AjOShort2d
483 **
484 ** @new    ajShort2dNew Default constructor
485 ** @new    ajShort2dNewL Constructor with reserved size
486 ** @delete ajShort2dDel Default destructor
487 ** @cast   ajShort2dGet Retrieve a short from an array
488 ** @modify ajShort2dPut Load a short array element
489 ** @cast   ajShort2dShort Retrieve internal pointer
490 **
491 ** @attr Res [ajuint] Reserved space in case of extension
492 ** @attr Len [ajuint] Actual length used
493 ** @attr Ptr [AjPShort*] Array of short arrays
494 ** @@
495 ******************************************************************************/
496 
497 typedef struct AjSShort2d
498 {
499     ajuint Res;
500     ajuint Len;
501     AjPShort *Ptr;
502 } AjOShort2d;
503 
504 #define AjPShort2d AjOShort2d*
505 
506 
507 
508 
509 /* @data AjPShort3d ***********************************************************
510 **
511 ** Ajax 3d short object.
512 **
513 ** Holds a 3d short array with additional data.
514 ** The length is known and held internally.
515 **
516 ** AjPShort3d is implemented as a pointer to a C data structure.
517 **
518 ** @alias AjSShort3d
519 ** @alias AjOShort3d
520 **
521 ** @new    ajShort3dNew Default constructor
522 ** @new    ajShort3dNewL Constructor with reserved size
523 ** @delete ajShort3dDel Default destructor
524 ** @cast   ajShort3dGet Retrieve a short from an array
525 ** @modify ajShort3dPut Load a short array element
526 ** @cast   ajShort3dShort Retrieve internal pointer
527 **
528 ** @attr Res [ajuint] Reserved space in case of extension
529 ** @attr Len [ajuint] Actual length used
530 ** @attr Ptr [AjPShort2d*] Array of 2d short arrays
531 ** @@
532 ******************************************************************************/
533 
534 typedef struct AjSShort3d
535 {
536     ajuint Res;
537     ajuint Len;
538     AjPShort2d  *Ptr;
539 } AjOShort3d;
540 
541 #define AjPShort3d AjOShort3d*
542 
543 
544 
545 
546 /* @data AjPLong **************************************************************
547 **
548 ** Ajax ajlong object.
549 **
550 ** Holds a ajlong array with additional data.
551 ** The length is known and held internally.
552 **
553 ** AjPLong is implemented as a pointer to a C data structure.
554 **
555 ** @alias AjSLong
556 ** @alias AjOLong
557 **
558 ** @new    ajLongNew Default constructor
559 ** @new    ajLongNewL Constructor with reserved size
560 ** @delete ajLongDel Default destructor
561 ** @cast   ajLongGet Retrieve a ajlong from an array
562 ** @modify ajLongPut Load a ajlong array element
563 ** @cast   ajLongLong Retrieve internal pointer
564 **
565 ** @attr Res [ajuint] Reserved space in case of extension
566 ** @attr Len [ajuint] Actual length used
567 ** @attr Ptr [ajlong*] Array of longs
568 ** @@
569 ******************************************************************************/
570 
571 typedef struct AjSLong
572 {
573     ajuint Res;
574     ajuint Len;
575     ajlong *Ptr;
576 } AjOLong;
577 
578 #define AjPLong AjOLong*
579 
580 
581 
582 
583 /* @data AjPLong2d ************************************************************
584 **
585 ** Ajax 2d ajlong object.
586 **
587 ** Holds a 2d ajlong array with additional data.
588 ** The length is known and held internally.
589 **
590 ** AjPLong2d is implemented as a pointer to a C data structure.
591 **
592 ** @alias AjSLong2d
593 ** @alias AjOLong2d
594 **
595 ** @new    ajLong2dNew Default constructor
596 ** @new    ajLong2dNewL Constructor with reserved size
597 ** @delete ajLong2dDel Default destructor
598 ** @cast   ajLong2dGet Retrieve a ajlong from an array
599 ** @modify ajLong2dPut Load a ajlong array element
600 ** @cast   ajLong2dLong Retrieve internal pointer
601 **
602 ** @attr Res [ajuint] Reserved space in case of extension
603 ** @attr Len [ajuint] Actual length used
604 ** @attr Ptr [AjPLong*] Array of long arrays
605 ** @@
606 ******************************************************************************/
607 
608 typedef struct AjSLong2d
609 {
610     ajuint Res;
611     ajuint Len;
612     AjPLong *Ptr;
613 } AjOLong2d;
614 
615 #define AjPLong2d AjOLong2d*
616 
617 
618 
619 
620 /* @data AjPLong3d ************************************************************
621 **
622 ** Ajax 3d ajlong object.
623 **
624 ** Holds a 3d ajlong array with additional data.
625 ** The length is known and held internally.
626 **
627 ** AjPLong3d is implemented as a pointer to a C data structure.
628 **
629 ** @alias AjSLong3d
630 ** @alias AjOLong3d
631 **
632 ** @new    ajLong3dNew Default constructor
633 ** @new    ajLong3dNewL Constructor with reserved size
634 ** @delete ajLong3dDel Default destructor
635 ** @cast   ajLong3dGet Retrieve a ajlong from an array
636 ** @modify ajLong3dPut Load a ajlong array element
637 ** @cast   ajLong3dLong Retrieve internal pointer
638 **
639 ** @attr Res [ajuint] Reserved space in case of extension
640 ** @attr Len [ajuint] Actual length used
641 ** @attr Ptr [AjPLong2d*] Array of 2d long arrays
642 ** @@
643 ******************************************************************************/
644 
645 typedef struct AjSLong3d
646 {
647     ajuint Res;
648     ajuint Len;
649     AjPLong2d  *Ptr;
650 } AjOLong3d;
651 
652 #define AjPLong3d AjOLong3d*
653 
654 
655 
656 
657 /* @data AjPUint **************************************************************
658 **
659 ** Ajax unsigned integer object.
660 **
661 ** Holds an unsigned integer array with additional data.
662 ** The length is known and held internally.
663 **
664 ** AjPUint is implemented as a pointer to a C data structure.
665 **
666 ** @alias AjSUint
667 ** @alias AjOUint
668 **
669 ** @new    ajUintNew Default constructor
670 ** @new    ajUintNewL Constructor with reserved size
671 ** @delete ajUintDel Default destructor
672 ** @cast   ajUintGet Retrieve an integer from an array
673 ** @modify ajUintPut Load an integer array element
674 ** @cast   ajUintUint Retrieve internal pointer
675 **
676 ** @attr Res [ajuint] Reserved space in case of extension
677 ** @attr Len [ajuint] Actual length used
678 ** @attr Ptr [ajuint*] Array of integers
679 ** @@
680 ******************************************************************************/
681 
682 typedef struct AjSUint
683 {
684     ajuint Res;
685     ajuint Len;
686     ajuint *Ptr;
687 } AjOUint;
688 
689 #define AjPUint AjOUint*
690 
691 
692 
693 
694 /* @data AjPUint2d ************************************************************
695 **
696 ** Ajax 2d unsigned integer object.
697 **
698 ** Holds an unsigned integer array with additional data.
699 ** The length is known and held internally.
700 **
701 ** AjPUint2d is implemented as a pointer to a C data structure.
702 **
703 ** @alias AjSUint2d
704 ** @alias AjOUint2d
705 **
706 ** @new    ajUint2dNew Default constructor
707 ** @new    ajUint2dNewL Constructor with reserved size
708 ** @delete ajUint2dDel Default destructor
709 ** @cast   ajUint2dGet Retrieve an integer from an array
710 ** @modify ajUint2dPut Load an integer array element
711 ** @cast   ajIUint2dUint Retrieve internal pointer
712 **
713 ** @attr Res [ajuint] Reserved space in case of extension
714 ** @attr Len [ajuint] Actual length used
715 ** @attr Ptr [AjPUint*] Array of integer arrays
716 ** @@
717 ******************************************************************************/
718 
719 typedef struct AjSUint2d
720 {
721     ajuint Res;
722     ajuint Len;
723     AjPUint *Ptr;
724 } AjOUint2d;
725 
726 #define AjPUint2d AjOUint2d*
727 
728 
729 
730 
731 /* @data AjPUint3d ************************************************************
732 **
733 ** Ajax 3d unsigned integer object.
734 **
735 ** Holds an unsigned integer array with additional data.
736 ** The length is known and held internally.
737 **
738 ** AjPUint3d is implemented as a pointer to a C data structure.
739 **
740 ** @alias AjSUint3d
741 ** @alias AjOUint3d
742 **
743 ** @new    ajUint3dNew Default constructor
744 ** @new    ajUint3dNewL Constructor with reserved size
745 ** @delete ajUint3dDel Default destructor
746 ** @cast   ajUint3dGet Retrieve an integer from an array
747 ** @modify ajUint3dPut Load an integer array element
748 ** @cast   ajUint3dUint Retrieve internal pointer
749 **
750 ** @attr Res [ajuint] Reserved space in case of extension
751 ** @attr Len [ajuint] Actual length used
752 ** @attr Ptr [AjPUint2d*] Array of 2d integer arrays
753 ** @@
754 ******************************************************************************/
755 
756 typedef struct AjSUint3d
757 {
758     ajuint Res;
759     ajuint Len;
760     AjPUint2d *Ptr;
761 } AjOUint3d;
762 
763 #define AjPUint3d AjOUint3d*
764 
765 
766 
767 
768 /* ========================================================================= */
769 /* =========================== public functions ============================ */
770 /* ========================================================================= */
771 
772 
773 
774 
775 /*
776 ** Prototype definitions
777 */
778 
779 void        ajArrExit(void);
780 
781 void        ajDoubleDel(AjPDouble *thys);
782 double*     ajDoubleDouble(const AjPDouble thys);
783 double      ajDoubleGet(const AjPDouble thys, ajuint elem);
784 ajuint      ajDoubleLen(const AjPDouble thys);
785 AjPDouble   ajDoubleNew(void);
786 AjPDouble   ajDoubleNewRes(ajuint size);
787 AjBool      ajDoublePut(AjPDouble *thys, ajuint elem, double v);
788 
789 void        ajDouble2dDel(AjPDouble2d *thys);
790 double      ajDouble2dGet(const AjPDouble2d thys, ajuint elem1, ajuint elem2);
791 double**    ajDouble2dDouble(const AjPDouble2d thys);
792 void        ajDouble2dLen(const AjPDouble2d thys, ajuint *len1, ajuint *len2);
793 AjPDouble2d ajDouble2dNew(void);
794 AjPDouble2d ajDouble2dNewRes(ajuint size);
795 AjBool      ajDouble2dPut(AjPDouble2d *thys,
796                           ajuint elem1, ajuint elem2, double v);
797 
798 void        ajDouble3dDel(AjPDouble3d *thys);
799 double      ajDouble3dGet(const AjPDouble3d thys,
800                           ajuint elem1, ajuint elem2, ajuint elem3);
801 double***   ajDouble3dDouble(const AjPDouble3d thys);
802 void        ajDouble3dLen(const AjPDouble3d thys,
803                           ajuint* len1, ajuint* len2, ajuint* len3);
804 AjPDouble3d ajDouble3dNew(void);
805 AjPDouble3d ajDouble3dNewRes(ajuint size);
806 AjBool      ajDouble3dPut(AjPDouble3d *thys,
807                           ajuint elem1, ajuint elem2, ajuint elem3,
808                           double v);
809 
810 void        ajFloatDel(AjPFloat *thys);
811 float*      ajFloatFloat(const AjPFloat thys);
812 float       ajFloatGet(const AjPFloat thys, ajuint elem);
813 ajuint      ajFloatLen(const AjPFloat thys);
814 AjPFloat    ajFloatNew(void);
815 AjPFloat    ajFloatNewRes(ajuint size);
816 AjBool      ajFloatPut(AjPFloat *thys, ajuint elem, float v);
817 
818 void        ajFloat2dDel(AjPFloat2d *thys);
819 float       ajFloat2dGet(const AjPFloat2d thys, ajuint elem1, ajuint elem2);
820 float**     ajFloat2dFloat(const AjPFloat2d thys);
821 void        ajFloat2dLen(const AjPFloat2d thys, ajuint *len1, ajuint *len2);
822 AjPFloat2d  ajFloat2dNew(void);
823 AjPFloat2d  ajFloat2dNewRes(ajuint size);
824 AjBool      ajFloat2dPut(AjPFloat2d *thys,
825                          ajuint elem1, ajuint elem2, float v);
826 
827 void        ajFloat3dDel(AjPFloat3d *thys);
828 float       ajFloat3dGet(const AjPFloat3d thys,
829                          ajuint elem1, ajuint elem2, ajuint elem3);
830 float***    ajFloat3dFloat(const AjPFloat3d thys);
831 void        ajFloat3dLen(const AjPFloat3d thys,
832                          ajuint* len1, ajuint* len2, ajuint* len3);
833 AjPFloat3d  ajFloat3dNew(void);
834 AjPFloat3d  ajFloat3dNewRes(ajuint size);
835 AjBool      ajFloat3dPut(AjPFloat3d *thys,
836                          ajuint elem1, ajuint elem2, ajuint elem3,
837                          float v);
838 
839 AjPChar     ajChararrNew(void);
840 AjPChar     ajChararrNewRes(ajuint size);
841 void        ajChararrDel(AjPChar *thys);
842 char        ajChararrGet(const AjPChar thys, ajuint elem);
843 AjBool      ajChararrPut(AjPChar *thys, ajuint elem, char v);
844 char*       ajChararrChararr(const AjPChar thys);
845 ajuint      ajChararrLen(const AjPChar thys);
846 
847 
848 void        ajIntDel(AjPInt *thys);
849 void        ajIntDec(AjPInt *thys, ajuint elem);
850 ajint       ajIntGet(const AjPInt thys, ajuint elem);
851 void        ajIntInc(AjPInt *thys, ajuint elem);
852 ajint*      ajIntInt(const AjPInt thys);
853 ajuint      ajIntLen(const AjPInt thys);
854 AjPInt      ajIntNew(void);
855 AjPInt      ajIntNewRes(ajuint size);
856 AjBool      ajIntPut(AjPInt *thys, ajuint elem, ajint v);
857 
858 void        ajInt2dDel(AjPInt2d *thys);
859 ajint       ajInt2dGet(const AjPInt2d thys, ajuint elem1, ajuint elem2);
860 ajint**     ajInt2dInt(const AjPInt2d thys);
861 void        ajInt2dLen(const AjPInt2d thys, ajuint *len1, ajuint *len2);
862 AjPInt2d    ajInt2dNew(void);
863 AjPInt2d    ajInt2dNewRes(ajuint size);
864 AjPInt2d    ajInt2dNewResRes2(ajuint size, ajuint size2);
865 AjBool      ajInt2dPut(AjPInt2d *thys, ajuint elem1, ajuint elem2, ajint v);
866 
867 void        ajInt3dDel(AjPInt3d *thys);
868 ajint       ajInt3dGet(const AjPInt3d thys, ajuint elem1, ajuint elem2,
869                        ajuint elem3);
870 ajint***    ajInt3dInt(const AjPInt3d thys);
871 void        ajInt3dLen(const AjPInt3d thys,
872                        ajuint* len1, ajuint* len2, ajuint* len3);
873 AjPInt3d    ajInt3dNew(void);
874 AjPInt3d    ajInt3dNewRes(ajuint size);
875 AjBool      ajInt3dPut(AjPInt3d *thys,
876                        ajuint elem1, ajuint elem2, ajuint elem3, ajint v);
877 
878 void        ajLongDel(AjPLong *thys);
879 ajlong      ajLongGet(const AjPLong thys, ajuint elem);
880 ajuint      ajLongLen(const AjPLong thys);
881 ajlong*     ajLongLong(const AjPLong thys);
882 AjPLong     ajLongNew(void);
883 AjPLong     ajLongNewRes(ajuint size);
884 AjBool      ajLongPut(AjPLong *thys, ajuint elem, ajlong v);
885 
886 void        ajLong2dDel(AjPLong2d *thys);
887 ajlong      ajLong2dGet(const AjPLong2d thys, ajuint elem1, ajuint elem2);
888 ajlong**    ajLong2dLong(const AjPLong2d thys);
889 void        ajLong2dLen(const AjPLong2d thys, ajuint *len1, ajuint *len2);
890 AjPLong2d   ajLong2dNew(void);
891 AjPLong2d   ajLong2dNewRes(ajuint size);
892 AjBool      ajLong2dPut(AjPLong2d *thys, ajuint elem1, ajuint elem2, ajlong v);
893 
894 void        ajLong3dDel(AjPLong3d *thys);
895 ajlong      ajLong3dGet(const AjPLong3d thys,
896                         ajuint elem1, ajuint elem2, ajuint elem3);
897 void        ajLong3dLen(const AjPLong3d thys,
898                         ajuint* len1, ajuint* len2, ajuint* len3);
899 ajlong***   ajLong3dLong(const AjPLong3d thys);
900 AjPLong3d   ajLong3dNew(void);
901 AjPLong3d   ajLong3dNewRes(ajuint size);
902 AjBool      ajLong3dPut(AjPLong3d *thys,
903                         ajuint elem1, ajuint elem2, ajuint elem3,
904                         ajlong v);
905 
906 void        ajShortDel(AjPShort *thys);
907 short       ajShortGet(const AjPShort thys, ajuint elem);
908 ajuint      ajShortLen(const AjPShort thys);
909 short*      ajShortShort(const AjPShort thys);
910 AjPShort    ajShortNew(void);
911 AjPShort    ajShortNewRes(ajuint size);
912 AjBool      ajShortPut(AjPShort *thys, ajuint elem, short v);
913 
914 void        ajShort2dDel(AjPShort2d *thys);
915 short       ajShort2dGet(const AjPShort2d thys, ajuint elem1, ajuint elem2);
916 short**     ajShort2dShort(const AjPShort2d thys);
917 void        ajShort2dLen(const AjPShort2d thys, ajuint *len1, ajuint *len2);
918 AjPShort2d  ajShort2dNew(void);
919 AjPShort2d  ajShort2dNewRes(ajuint size);
920 AjBool      ajShort2dPut(AjPShort2d *thys,
921                          ajuint elem1, ajuint elem2, short v);
922 
923 void        ajShort3dDel(AjPShort3d *thys);
924 short       ajShort3dGet(const AjPShort3d thys,
925                          ajuint elem1, ajuint elem2, ajuint elem3);
926 void        ajShort3dLen(const AjPShort3d thys,
927                          ajuint* len1, ajuint* len2, ajuint* len3);
928 short***    ajShort3dShort(const AjPShort3d thys);
929 AjPShort3d  ajShort3dNew(void);
930 AjPShort3d  ajShort3dNewRes(ajuint size);
931 AjBool      ajShort3dPut(AjPShort3d *thys,
932                          ajuint elem1, ajuint elem2, ajuint elem3,
933                          short v);
934 
935 
936 void        ajUintDel(AjPUint *thys);
937 void        ajUintDec(AjPUint *thys, ajuint elem);
938 ajuint      ajUintGet(const AjPUint thys, ajuint elem);
939 void        ajUintInc(AjPUint *thys, ajuint elem);
940 ajuint*     ajUintUint(const AjPUint thys);
941 ajuint      ajUintLen(const AjPUint thys);
942 AjPUint     ajUintNew(void);
943 AjPUint     ajUintNewRes(ajuint size);
944 AjBool      ajUintPut(AjPUint *thys, ajuint elem, ajuint v);
945 
946 void        ajUint2dDel(AjPUint2d *thys);
947 ajuint      ajUint2dGet(const AjPUint2d thys, ajuint elem1, ajuint elem2);
948 ajuint**    ajUint2dUint(const AjPUint2d thys);
949 void        ajUint2dLen(const AjPUint2d thys, ajuint *len1, ajuint *len2);
950 AjPUint2d   ajUint2dNew(void);
951 AjPUint2d   ajUint2dNewRes(ajuint size);
952 AjPUint2d   ajUint2dNewResRes2(ajuint size, ajuint size2);
953 AjBool      ajUint2dPut(AjPUint2d *thys, ajuint elem1, ajuint elem2, ajuint v);
954 
955 void        ajUint3dDel(AjPUint3d *thys);
956 ajuint      ajUint3dGet(const AjPUint3d thys, ajuint elem1, ajuint elem2,
957                         ajuint elem3);
958 ajuint***   ajUint3dUint(const AjPUint3d thys);
959 void        ajUint3dLen(const AjPUint3d thys,
960                         ajuint* len1, ajuint* len2, ajuint* len3);
961 AjPUint3d   ajUint3dNew(void);
962 AjPUint3d   ajUint3dNewRes(ajuint size);
963 AjBool      ajUint3dPut(AjPUint3d *thys,
964                         ajuint elem1, ajuint elem2, ajuint elem3, ajuint v);
965 
966 AjBool      ajFloatParse(const AjPStr str, AjPFloat *array);
967 void        ajFloatStr(const AjPFloat array, ajint precision, AjPStr* str);
968 void        ajFloatTrace(const AjPFloat array, ajint precision,
969                          const char* text);
970 
971 ajuint      ajArrCommaList(const  AjPStr s, AjPStr **a);
972 double*     ajArrDoubleLine(const AjPStr line, const char *delim,
973                             ajuint startcol, ajuint endcol);
974 ajint*      ajArrIntLine(const AjPStr line, const char *delim,
975                          ajuint startcol, ajuint endcol);
976 float*      ajArrFloatLine(const AjPStr line, const char *delim,
977                            ajuint startcol, ajuint endcol);
978 
979 /*
980 ** End of prototype definitions
981 */
982 
983 #ifdef AJ_COMPILE_DEPRECATED_BOOK
984 #endif /* AJ_COMPILE_DEPRECATED_BOOK */
985 
986 #ifdef AJ_COMPILE_DEPRECATED
987 
988 __deprecated AjPChar     ajChararrNewL(ajuint size);
989 __deprecated AjPDouble   ajDoubleNewL(ajuint size);
990 __deprecated AjPDouble2d ajDouble2dNewL(ajuint size);
991 __deprecated AjPDouble3d ajDouble3dNewL(ajuint size);
992 __deprecated AjPFloat    ajFloatNewL(ajuint size);
993 __deprecated AjPFloat2d  ajFloat2dNewL(ajuint size);
994 __deprecated AjPFloat3d  ajFloat3dNewL(ajuint size);
995 __deprecated AjPInt      ajIntNewL(ajuint size);
996 __deprecated AjPInt2d    ajInt2dNewL(ajuint size);
997 __deprecated AjPInt2d    ajInt2dNewLL(ajuint size, ajuint size2);
998 __deprecated AjPInt3d    ajInt3dNewL(ajuint size);
999 __deprecated AjPLong     ajLongNewL(ajuint size);
1000 __deprecated AjPLong2d   ajLong2dNewL(ajuint size);
1001 __deprecated AjPLong3d   ajLong3dNewL(ajuint size);
1002 __deprecated AjPShort    ajShortNewL(ajuint size);
1003 __deprecated AjPShort2d  ajShort2dNewL(ajuint size);
1004 __deprecated AjPShort3d  ajShort3dNewL(ajuint size);
1005 __deprecated AjPUint     ajUintNewL(ajuint size);
1006 __deprecated AjPUint2d   ajUint2dNewL(ajuint size);
1007 __deprecated AjPUint2d   ajUint2dNewLL(ajuint size, ajuint size2);
1008 __deprecated AjPUint3d   ajUint3dNewL(ajuint size);
1009 
1010 #endif /* AJ_COMPILE_DEPRECATED */
1011 
1012 
1013 
1014 
1015 AJ_END_DECLS
1016 
1017 #endif /* !AJARR_H */
1018