1 /*  CV.h  */
2 
3 /*--------------------------------------------------------------------*/
4 /*
5    -------------------------------------------------------------
6    prototype definitions for character vectors.
7 
8    note, our use of character vectors is different from strings.
9    most of their application is as marking vectors.
10    -------------------------------------------------------------
11 */
12 /*--------------------------------------------------------------------*/
13 /*
14    ---------------------------------------------------
15    purpose -- allocate a char array with size entries
16               and fill with value c
17 
18    return value -- a pointer to the start of the array
19 
20    created : 95sep22, cca
21    ---------------------------------------------------
22 */
23 char *
24 CVinit (
25    int    size,
26    char   c
27 ) ;
28 /*--------------------------------------------------------------------*/
29 /*
30    ---------------------------------------------------
31    purpose -- allocate a char array with size entries
32 
33    return value -- a pointer to the start of the array
34 
35    created : 95sep22, cca
36    ---------------------------------------------------
37 */
38 char *
39 CVinit2 (
40    int   size
41 ) ;
42 /*--------------------------------------------------------------------*/
43 /*
44    -------------------------------
45    purpose -- to copy y[*] := x[*]
46 
47    created -- 95sep22, cca
48    -------------------------------
49 */
50 void
51 CVcopy (
52    int    size,
53    char   y[],
54    char   x[]
55 ) ;
56 /*--------------------------------------------------------------------*/
57 /*
58    ----------------------------
59    purpose -- to fill y[*] := c
60 
61    created -- 95sep22, cca
62    ----------------------------
63 */
64 void
65 CVfill (
66    int    size,
67    char   y[],
68    char   c
69 ) ;
70 /*--------------------------------------------------------------------*/
71 /*
72    -------------------------------------
73    purpose -- to print out a char vector
74       the vector starts on a new line
75       and takes 80 characters per line
76 
77    created -- 95sep22, cca
78    -------------------------------------
79 */
80 void
81 CVfprintf (
82    FILE   *fp,
83    int    size,
84    char   y[]
85 ) ;
86 /*--------------------------------------------------------------------*/
87 /*
88    ------------------------------------------------------------------
89    purpose -- to write out a char vector with eighty column lines
90 
91    input --
92 
93       fp     -- file pointer, must be formatted and write access
94       size   -- length of the vector
95       y[]    -- char vector
96       column -- present column
97       pierr  -- pointer to int to hold return value,
98                 should be 1 if any print was successful,
99                 if fprintf() failed, then ierr = -1
100 
101    return value -- present column
102 
103    created -- 95sep22, cca
104    ------------------------------------------------------------------
105 */
106 int
107 CVfp80 (
108    FILE   *fp,
109    int    size,
110    char   y[],
111    int    column,
112    int    *pierr
113 ) ;
114 /*--------------------------------------------------------------------*/
115 /*
116    ------------------------------------------------------
117    purpose -- to release storage for a character vector,
118               note, should have been created using CVinit
119 
120    created -- 95sep22, cca
121    ------------------------------------------------------
122 */
123 void
124 CVfree (
125    char y[]
126 ) ;
127 /*--------------------------------------------------------------------*/
128 /*
129    -----------------------------------------
130    purpose -- to read in a char vector
131 
132    return value -- number of characters read
133 
134    created -- 95sep22, cca
135    -----------------------------------------
136 */
137 int
138 CVfscanf (
139    FILE   *fp,
140    int    size,
141    char   y[]
142 ) ;
143 /*--------------------------------------------------------------------*/
144 /*
145    ----------------------------------------------
146    purpose -- to compute the multiple dot product
147 
148      [ y0 y1 y2 ]^T [ x0 x1 x2]
149 
150    created -- 98apr17, cca
151    ----------------------------------------------
152 */
153 void
154 ZVdotU33 (
155    int      n,
156    double   y0[],
157    double   y1[],
158    double   y2[],
159    double   x0[],
160    double   x1[],
161    double   x2[],
162    double   sums[]
163 ) ;
164 /*
165    ----------------------------------------------
166    purpose -- to compute the multiple dot product
167 
168      [ y0 y1 y2 ]^T [ x0 x1 ]
169 
170    created -- 98apr17, cca
171    ----------------------------------------------
172 */
173 void
174 ZVdotU32 (
175    int      n,
176    double   y0[],
177    double   y1[],
178    double   y2[],
179    double   x0[],
180    double   x1[],
181    double   sums[]
182 ) ;
183 /*
184    ----------------------------------------------
185    purpose -- to compute the multiple dot product
186 
187      [ y0 y1 y2 ]^T [ x0 ]
188 
189    created -- 98apr17, cca
190    ----------------------------------------------
191 */
192 void
193 ZVdotU31 (
194    int      n,
195    double   y0[],
196    double   y1[],
197    double   y2[],
198    double   x0[],
199    double   sums[]
200 ) ;
201 /*
202    ----------------------------------------------
203    purpose -- to compute the multiple dot product
204 
205      [ y0 y1 ]^T [ x0 x1 x2]
206 
207    created -- 98apr17, cca
208    ----------------------------------------------
209 */
210 void
211 ZVdotU23 (
212    int      n,
213    double   y0[],
214    double   y1[],
215    double   x0[],
216    double   x1[],
217    double   x2[],
218    double   sums[]
219 ) ;
220 /*
221    ----------------------------------------------
222    purpose -- to compute the multiple dot product
223 
224      [ y0 y1 ]^T [ x0 x1 ]
225 
226    created -- 98apr17, cca
227    ----------------------------------------------
228 */
229 void
230 ZVdotU22 (
231    int      n,
232    double   y0[],
233    double   y1[],
234    double   x0[],
235    double   x1[],
236    double   sums[]
237 ) ;
238 /*
239    ----------------------------------------------
240    purpose -- to compute the multiple dot product
241 
242      [ y0 y1 ]^T [ x0 ]
243 
244    created -- 98apr17, cca
245    ----------------------------------------------
246 */
247 void
248 ZVdotU21 (
249    int      n,
250    double   y0[],
251    double   y1[],
252    double   x0[],
253    double   sums[]
254 ) ;
255 /*
256    ----------------------------------------------
257    purpose -- to compute the multiple dot product
258 
259      [ y0 ]^T [ x0 x1 x2]
260 
261    created -- 98apr17, cca
262    ----------------------------------------------
263 */
264 void
265 ZVdotU13 (
266    int      n,
267    double   y0[],
268    double   x0[],
269    double   x1[],
270    double   x2[],
271    double   sums[]
272 ) ;
273 /*
274    ----------------------------------------------
275    purpose -- to compute the multiple dot product
276 
277      [ y0 ]^T [ x0 x1 ]
278 
279    created -- 98apr17, cca
280    ----------------------------------------------
281 */
282 void
283 ZVdotU12 (
284    int      n,
285    double   y0[],
286    double   x0[],
287    double   x1[],
288    double   sums[]
289 ) ;
290 /*
291    ----------------------------------------------
292    purpose -- to compute the multiple dot product
293 
294      [ y0 ]^T [ x0 ]
295 
296    created -- 98apr17, cca
297    ----------------------------------------------
298 */
299 void
300 ZVdotU11 (
301    int      n,
302    double   y0[],
303    double   x0[],
304    double   sums[]
305 ) ;
306 /*
307    ----------------------------------------------
308    purpose -- to compute the multiple dot product
309 
310      [ y0 y1 y2 ]^H [ x0 x1 x2]
311 
312    created -- 98apr17, cca
313    ----------------------------------------------
314 */
315 void
316 ZVdotC33 (
317    int      n,
318    double   y0[],
319    double   y1[],
320    double   y2[],
321    double   x0[],
322    double   x1[],
323    double   x2[],
324    double   sums[]
325 ) ;
326 /*
327    ----------------------------------------------
328    purpose -- to compute the multiple dot product
329 
330      [ y0 y1 y2 ]^H [ x0 x1 ]
331 
332    created -- 98apr17, cca
333    ----------------------------------------------
334 */
335 void
336 ZVdotC32 (
337    int      n,
338    double   y0[],
339    double   y1[],
340    double   y2[],
341    double   x0[],
342    double   x1[],
343    double   sums[]
344 ) ;
345 /*
346    ----------------------------------------------
347    purpose -- to compute the multiple dot product
348 
349      [ y0 y1 y2 ]^H [ x0 ]
350 
351    created -- 98apr17, cca
352    ----------------------------------------------
353 */
354 void
355 ZVdotC31 (
356    int      n,
357    double   y0[],
358    double   y1[],
359    double   y2[],
360    double   x0[],
361    double   sums[]
362 ) ;
363 /*
364    ----------------------------------------------
365    purpose -- to compute the multiple dot product
366 
367      [ y0 y1 ]^H [ x0 x1 x2]
368 
369    created -- 98apr17, cca
370    ----------------------------------------------
371 */
372 void
373 ZVdotC23 (
374    int      n,
375    double   y0[],
376    double   y1[],
377    double   x0[],
378    double   x1[],
379    double   x2[],
380    double   sums[]
381 ) ;
382 /*
383    ----------------------------------------------
384    purpose -- to compute the multiple dot product
385 
386      [ y0 y1 ]^H [ x0 x1 ]
387 
388    created -- 98apr17, cca
389    ----------------------------------------------
390 */
391 void
392 ZVdotC22 (
393    int      n,
394    double   y0[],
395    double   y1[],
396    double   x0[],
397    double   x1[],
398    double   sums[]
399 ) ;
400 /*
401    ----------------------------------------------
402    purpose -- to compute the multiple dot product
403 
404      [ y0 y1 ]^H [ x0 ]
405 
406    created -- 98apr17, cca
407    ----------------------------------------------
408 */
409 void
410 ZVdotC21 (
411    int      n,
412    double   y0[],
413    double   y1[],
414    double   x0[],
415    double   sums[]
416 ) ;
417 /*
418    ----------------------------------------------
419    purpose -- to compute the multiple dot product
420 
421      [ y0 ]^H [ x0 x1 x2]
422 
423    created -- 98apr17, cca
424    ----------------------------------------------
425 */
426 void
427 ZVdotC13 (
428    int      n,
429    double   y0[],
430    double   x0[],
431    double   x1[],
432    double   x2[],
433    double   sums[]
434 ) ;
435 /*
436    ----------------------------------------------
437    purpose -- to compute the multiple dot product
438 
439      [ y0 ]^H [ x0 x1 ]
440 
441    created -- 98apr17, cca
442    ----------------------------------------------
443 */
444 void
445 ZVdotC12 (
446    int      n,
447    double   y0[],
448    double   x0[],
449    double   x1[],
450    double   sums[]
451 ) ;
452 /*
453    ----------------------------------------------
454    purpose -- to compute the multiple dot product
455 
456      [ y0 ]^H [ x0 ]
457 
458    created -- 98apr17, cca
459    ----------------------------------------------
460 */
461 void
462 ZVdotC11 (
463    int      n,
464    double   y0[],
465    double   x0[],
466    double   sums[]
467 ) ;
468 /*--------------------------------------------------------------------*/
469