-
Notifications
You must be signed in to change notification settings - Fork 20
/
alglibinternal.h
868 lines (856 loc) · 24.8 KB
/
alglibinternal.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
/*************************************************************************
Copyright (c) Sergey Bochkanov (ALGLIB project).
>>> SOURCE LICENSE >>>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation (www.fsf.org); either version 2 of the
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
A copy of the GNU General Public License is available at
http://www.fsf.org/licensing/licenses
>>> END OF LICENSE >>>
*************************************************************************/
#ifndef _alglibinternal_pkg_h
#define _alglibinternal_pkg_h
#include "ap.h"
/////////////////////////////////////////////////////////////////////////
//
// THIS SECTION CONTAINS COMPUTATIONAL CORE DECLARATIONS (DATATYPES)
//
/////////////////////////////////////////////////////////////////////////
namespace alglib_impl
{
typedef struct
{
ae_vector ia0;
ae_vector ia1;
ae_vector ia2;
ae_vector ia3;
ae_vector ra0;
ae_vector ra1;
ae_vector ra2;
ae_vector ra3;
} apbuffers;
typedef struct
{
ae_bool val;
} sboolean;
typedef struct
{
ae_vector val;
} sbooleanarray;
typedef struct
{
ae_int_t val;
} sinteger;
typedef struct
{
ae_vector val;
} sintegerarray;
typedef struct
{
double val;
} sreal;
typedef struct
{
ae_vector val;
} srealarray;
typedef struct
{
ae_complex val;
} scomplex;
typedef struct
{
ae_vector val;
} scomplexarray;
typedef struct
{
ae_bool brackt;
ae_bool stage1;
ae_int_t infoc;
double dg;
double dgm;
double dginit;
double dgtest;
double dgx;
double dgxm;
double dgy;
double dgym;
double finit;
double ftest1;
double fm;
double fx;
double fxm;
double fy;
double fym;
double stx;
double sty;
double stmin;
double stmax;
double width;
double width1;
double xtrapf;
} linminstate;
typedef struct
{
ae_bool needf;
ae_vector x;
double f;
ae_int_t n;
ae_vector xbase;
ae_vector s;
double stplen;
double fcur;
double stpmax;
ae_int_t fmax;
ae_int_t nfev;
ae_int_t info;
rcommstate rstate;
} armijostate;
typedef struct
{
ae_vector plan;
ae_vector precomputed;
ae_vector tmpbuf;
ae_vector stackbuf;
} ftplan;
}
/////////////////////////////////////////////////////////////////////////
//
// THIS SECTION CONTAINS C++ INTERFACE
//
/////////////////////////////////////////////////////////////////////////
namespace alglib
{
}
/////////////////////////////////////////////////////////////////////////
//
// THIS SECTION CONTAINS COMPUTATIONAL CORE DECLARATIONS (FUNCTIONS)
//
/////////////////////////////////////////////////////////////////////////
namespace alglib_impl
{
ae_int_t getrdfserializationcode(ae_state *_state);
ae_int_t getkdtreeserializationcode(ae_state *_state);
ae_int_t getmlpserializationcode(ae_state *_state);
ae_int_t getmlpeserializationcode(ae_state *_state);
ae_int_t getrbfserializationcode(ae_state *_state);
ae_bool approxequalrel(double a, double b, double tol, ae_state *_state);
void taskgenint1d(double a,
double b,
ae_int_t n,
/* Real */ ae_vector* x,
/* Real */ ae_vector* y,
ae_state *_state);
void taskgenint1dequidist(double a,
double b,
ae_int_t n,
/* Real */ ae_vector* x,
/* Real */ ae_vector* y,
ae_state *_state);
void taskgenint1dcheb1(double a,
double b,
ae_int_t n,
/* Real */ ae_vector* x,
/* Real */ ae_vector* y,
ae_state *_state);
void taskgenint1dcheb2(double a,
double b,
ae_int_t n,
/* Real */ ae_vector* x,
/* Real */ ae_vector* y,
ae_state *_state);
ae_bool aredistinct(/* Real */ ae_vector* x,
ae_int_t n,
ae_state *_state);
ae_bool aresameboolean(ae_bool v1, ae_bool v2, ae_state *_state);
void bvectorsetlengthatleast(/* Boolean */ ae_vector* x,
ae_int_t n,
ae_state *_state);
void ivectorsetlengthatleast(/* Integer */ ae_vector* x,
ae_int_t n,
ae_state *_state);
void rvectorsetlengthatleast(/* Real */ ae_vector* x,
ae_int_t n,
ae_state *_state);
void rmatrixsetlengthatleast(/* Real */ ae_matrix* x,
ae_int_t m,
ae_int_t n,
ae_state *_state);
void rmatrixresize(/* Real */ ae_matrix* x,
ae_int_t m,
ae_int_t n,
ae_state *_state);
ae_bool isfinitevector(/* Real */ ae_vector* x,
ae_int_t n,
ae_state *_state);
ae_bool isfinitecvector(/* Complex */ ae_vector* z,
ae_int_t n,
ae_state *_state);
ae_bool apservisfinitematrix(/* Real */ ae_matrix* x,
ae_int_t m,
ae_int_t n,
ae_state *_state);
ae_bool apservisfinitecmatrix(/* Complex */ ae_matrix* x,
ae_int_t m,
ae_int_t n,
ae_state *_state);
ae_bool isfinitertrmatrix(/* Real */ ae_matrix* x,
ae_int_t n,
ae_bool isupper,
ae_state *_state);
ae_bool apservisfinitectrmatrix(/* Complex */ ae_matrix* x,
ae_int_t n,
ae_bool isupper,
ae_state *_state);
ae_bool apservisfiniteornanmatrix(/* Real */ ae_matrix* x,
ae_int_t m,
ae_int_t n,
ae_state *_state);
double safepythag2(double x, double y, ae_state *_state);
double safepythag3(double x, double y, double z, ae_state *_state);
ae_int_t saferdiv(double x, double y, double* r, ae_state *_state);
double safeminposrv(double x, double y, double v, ae_state *_state);
void apperiodicmap(double* x,
double a,
double b,
double* k,
ae_state *_state);
double randomnormal(ae_state *_state);
double boundval(double x, double b1, double b2, ae_state *_state);
void alloccomplex(ae_serializer* s, ae_complex v, ae_state *_state);
void serializecomplex(ae_serializer* s, ae_complex v, ae_state *_state);
ae_complex unserializecomplex(ae_serializer* s, ae_state *_state);
void allocrealarray(ae_serializer* s,
/* Real */ ae_vector* v,
ae_int_t n,
ae_state *_state);
void serializerealarray(ae_serializer* s,
/* Real */ ae_vector* v,
ae_int_t n,
ae_state *_state);
void unserializerealarray(ae_serializer* s,
/* Real */ ae_vector* v,
ae_state *_state);
void allocintegerarray(ae_serializer* s,
/* Integer */ ae_vector* v,
ae_int_t n,
ae_state *_state);
void serializeintegerarray(ae_serializer* s,
/* Integer */ ae_vector* v,
ae_int_t n,
ae_state *_state);
void unserializeintegerarray(ae_serializer* s,
/* Integer */ ae_vector* v,
ae_state *_state);
void allocrealmatrix(ae_serializer* s,
/* Real */ ae_matrix* v,
ae_int_t n0,
ae_int_t n1,
ae_state *_state);
void serializerealmatrix(ae_serializer* s,
/* Real */ ae_matrix* v,
ae_int_t n0,
ae_int_t n1,
ae_state *_state);
void unserializerealmatrix(ae_serializer* s,
/* Real */ ae_matrix* v,
ae_state *_state);
void copyintegerarray(/* Integer */ ae_vector* src,
/* Integer */ ae_vector* dst,
ae_state *_state);
void copyrealarray(/* Real */ ae_vector* src,
/* Real */ ae_vector* dst,
ae_state *_state);
void copyrealmatrix(/* Real */ ae_matrix* src,
/* Real */ ae_matrix* dst,
ae_state *_state);
ae_int_t recsearch(/* Integer */ ae_vector* a,
ae_int_t nrec,
ae_int_t nheader,
ae_int_t i0,
ae_int_t i1,
/* Integer */ ae_vector* b,
ae_state *_state);
ae_bool _apbuffers_init(void* _p, ae_state *_state, ae_bool make_automatic);
ae_bool _apbuffers_init_copy(void* _dst, void* _src, ae_state *_state, ae_bool make_automatic);
void _apbuffers_clear(void* _p);
void _apbuffers_destroy(void* _p);
ae_bool _sboolean_init(void* _p, ae_state *_state, ae_bool make_automatic);
ae_bool _sboolean_init_copy(void* _dst, void* _src, ae_state *_state, ae_bool make_automatic);
void _sboolean_clear(void* _p);
void _sboolean_destroy(void* _p);
ae_bool _sbooleanarray_init(void* _p, ae_state *_state, ae_bool make_automatic);
ae_bool _sbooleanarray_init_copy(void* _dst, void* _src, ae_state *_state, ae_bool make_automatic);
void _sbooleanarray_clear(void* _p);
void _sbooleanarray_destroy(void* _p);
ae_bool _sinteger_init(void* _p, ae_state *_state, ae_bool make_automatic);
ae_bool _sinteger_init_copy(void* _dst, void* _src, ae_state *_state, ae_bool make_automatic);
void _sinteger_clear(void* _p);
void _sinteger_destroy(void* _p);
ae_bool _sintegerarray_init(void* _p, ae_state *_state, ae_bool make_automatic);
ae_bool _sintegerarray_init_copy(void* _dst, void* _src, ae_state *_state, ae_bool make_automatic);
void _sintegerarray_clear(void* _p);
void _sintegerarray_destroy(void* _p);
ae_bool _sreal_init(void* _p, ae_state *_state, ae_bool make_automatic);
ae_bool _sreal_init_copy(void* _dst, void* _src, ae_state *_state, ae_bool make_automatic);
void _sreal_clear(void* _p);
void _sreal_destroy(void* _p);
ae_bool _srealarray_init(void* _p, ae_state *_state, ae_bool make_automatic);
ae_bool _srealarray_init_copy(void* _dst, void* _src, ae_state *_state, ae_bool make_automatic);
void _srealarray_clear(void* _p);
void _srealarray_destroy(void* _p);
ae_bool _scomplex_init(void* _p, ae_state *_state, ae_bool make_automatic);
ae_bool _scomplex_init_copy(void* _dst, void* _src, ae_state *_state, ae_bool make_automatic);
void _scomplex_clear(void* _p);
void _scomplex_destroy(void* _p);
ae_bool _scomplexarray_init(void* _p, ae_state *_state, ae_bool make_automatic);
ae_bool _scomplexarray_init_copy(void* _dst, void* _src, ae_state *_state, ae_bool make_automatic);
void _scomplexarray_clear(void* _p);
void _scomplexarray_destroy(void* _p);
void tagsort(/* Real */ ae_vector* a,
ae_int_t n,
/* Integer */ ae_vector* p1,
/* Integer */ ae_vector* p2,
ae_state *_state);
void tagsortbuf(/* Real */ ae_vector* a,
ae_int_t n,
/* Integer */ ae_vector* p1,
/* Integer */ ae_vector* p2,
apbuffers* buf,
ae_state *_state);
void tagsortfasti(/* Real */ ae_vector* a,
/* Integer */ ae_vector* b,
/* Real */ ae_vector* bufa,
/* Integer */ ae_vector* bufb,
ae_int_t n,
ae_state *_state);
void tagsortfastr(/* Real */ ae_vector* a,
/* Real */ ae_vector* b,
/* Real */ ae_vector* bufa,
/* Real */ ae_vector* bufb,
ae_int_t n,
ae_state *_state);
void tagsortfast(/* Real */ ae_vector* a,
/* Real */ ae_vector* bufa,
ae_int_t n,
ae_state *_state);
void tagsortmiddleir(/* Integer */ ae_vector* a,
/* Real */ ae_vector* b,
ae_int_t offset,
ae_int_t n,
ae_state *_state);
void tagheappushi(/* Real */ ae_vector* a,
/* Integer */ ae_vector* b,
ae_int_t* n,
double va,
ae_int_t vb,
ae_state *_state);
void tagheapreplacetopi(/* Real */ ae_vector* a,
/* Integer */ ae_vector* b,
ae_int_t n,
double va,
ae_int_t vb,
ae_state *_state);
void tagheappopi(/* Real */ ae_vector* a,
/* Integer */ ae_vector* b,
ae_int_t* n,
ae_state *_state);
ae_int_t lowerbound(/* Real */ ae_vector* a,
ae_int_t n,
double t,
ae_state *_state);
ae_int_t upperbound(/* Real */ ae_vector* a,
ae_int_t n,
double t,
ae_state *_state);
void rankx(/* Real */ ae_vector* x,
ae_int_t n,
apbuffers* buf,
ae_state *_state);
ae_bool cmatrixrank1f(ae_int_t m,
ae_int_t n,
/* Complex */ ae_matrix* a,
ae_int_t ia,
ae_int_t ja,
/* Complex */ ae_vector* u,
ae_int_t iu,
/* Complex */ ae_vector* v,
ae_int_t iv,
ae_state *_state);
ae_bool rmatrixrank1f(ae_int_t m,
ae_int_t n,
/* Real */ ae_matrix* a,
ae_int_t ia,
ae_int_t ja,
/* Real */ ae_vector* u,
ae_int_t iu,
/* Real */ ae_vector* v,
ae_int_t iv,
ae_state *_state);
ae_bool cmatrixmvf(ae_int_t m,
ae_int_t n,
/* Complex */ ae_matrix* a,
ae_int_t ia,
ae_int_t ja,
ae_int_t opa,
/* Complex */ ae_vector* x,
ae_int_t ix,
/* Complex */ ae_vector* y,
ae_int_t iy,
ae_state *_state);
ae_bool rmatrixmvf(ae_int_t m,
ae_int_t n,
/* Real */ ae_matrix* a,
ae_int_t ia,
ae_int_t ja,
ae_int_t opa,
/* Real */ ae_vector* x,
ae_int_t ix,
/* Real */ ae_vector* y,
ae_int_t iy,
ae_state *_state);
ae_bool cmatrixrighttrsmf(ae_int_t m,
ae_int_t n,
/* Complex */ ae_matrix* a,
ae_int_t i1,
ae_int_t j1,
ae_bool isupper,
ae_bool isunit,
ae_int_t optype,
/* Complex */ ae_matrix* x,
ae_int_t i2,
ae_int_t j2,
ae_state *_state);
ae_bool cmatrixlefttrsmf(ae_int_t m,
ae_int_t n,
/* Complex */ ae_matrix* a,
ae_int_t i1,
ae_int_t j1,
ae_bool isupper,
ae_bool isunit,
ae_int_t optype,
/* Complex */ ae_matrix* x,
ae_int_t i2,
ae_int_t j2,
ae_state *_state);
ae_bool rmatrixrighttrsmf(ae_int_t m,
ae_int_t n,
/* Real */ ae_matrix* a,
ae_int_t i1,
ae_int_t j1,
ae_bool isupper,
ae_bool isunit,
ae_int_t optype,
/* Real */ ae_matrix* x,
ae_int_t i2,
ae_int_t j2,
ae_state *_state);
ae_bool rmatrixlefttrsmf(ae_int_t m,
ae_int_t n,
/* Real */ ae_matrix* a,
ae_int_t i1,
ae_int_t j1,
ae_bool isupper,
ae_bool isunit,
ae_int_t optype,
/* Real */ ae_matrix* x,
ae_int_t i2,
ae_int_t j2,
ae_state *_state);
ae_bool cmatrixsyrkf(ae_int_t n,
ae_int_t k,
double alpha,
/* Complex */ ae_matrix* a,
ae_int_t ia,
ae_int_t ja,
ae_int_t optypea,
double beta,
/* Complex */ ae_matrix* c,
ae_int_t ic,
ae_int_t jc,
ae_bool isupper,
ae_state *_state);
ae_bool rmatrixsyrkf(ae_int_t n,
ae_int_t k,
double alpha,
/* Real */ ae_matrix* a,
ae_int_t ia,
ae_int_t ja,
ae_int_t optypea,
double beta,
/* Real */ ae_matrix* c,
ae_int_t ic,
ae_int_t jc,
ae_bool isupper,
ae_state *_state);
ae_bool rmatrixgemmf(ae_int_t m,
ae_int_t n,
ae_int_t k,
double alpha,
/* Real */ ae_matrix* a,
ae_int_t ia,
ae_int_t ja,
ae_int_t optypea,
/* Real */ ae_matrix* b,
ae_int_t ib,
ae_int_t jb,
ae_int_t optypeb,
double beta,
/* Real */ ae_matrix* c,
ae_int_t ic,
ae_int_t jc,
ae_state *_state);
ae_bool cmatrixgemmf(ae_int_t m,
ae_int_t n,
ae_int_t k,
ae_complex alpha,
/* Complex */ ae_matrix* a,
ae_int_t ia,
ae_int_t ja,
ae_int_t optypea,
/* Complex */ ae_matrix* b,
ae_int_t ib,
ae_int_t jb,
ae_int_t optypeb,
ae_complex beta,
/* Complex */ ae_matrix* c,
ae_int_t ic,
ae_int_t jc,
ae_state *_state);
double vectornorm2(/* Real */ ae_vector* x,
ae_int_t i1,
ae_int_t i2,
ae_state *_state);
ae_int_t vectoridxabsmax(/* Real */ ae_vector* x,
ae_int_t i1,
ae_int_t i2,
ae_state *_state);
ae_int_t columnidxabsmax(/* Real */ ae_matrix* x,
ae_int_t i1,
ae_int_t i2,
ae_int_t j,
ae_state *_state);
ae_int_t rowidxabsmax(/* Real */ ae_matrix* x,
ae_int_t j1,
ae_int_t j2,
ae_int_t i,
ae_state *_state);
double upperhessenberg1norm(/* Real */ ae_matrix* a,
ae_int_t i1,
ae_int_t i2,
ae_int_t j1,
ae_int_t j2,
/* Real */ ae_vector* work,
ae_state *_state);
void copymatrix(/* Real */ ae_matrix* a,
ae_int_t is1,
ae_int_t is2,
ae_int_t js1,
ae_int_t js2,
/* Real */ ae_matrix* b,
ae_int_t id1,
ae_int_t id2,
ae_int_t jd1,
ae_int_t jd2,
ae_state *_state);
void inplacetranspose(/* Real */ ae_matrix* a,
ae_int_t i1,
ae_int_t i2,
ae_int_t j1,
ae_int_t j2,
/* Real */ ae_vector* work,
ae_state *_state);
void copyandtranspose(/* Real */ ae_matrix* a,
ae_int_t is1,
ae_int_t is2,
ae_int_t js1,
ae_int_t js2,
/* Real */ ae_matrix* b,
ae_int_t id1,
ae_int_t id2,
ae_int_t jd1,
ae_int_t jd2,
ae_state *_state);
void matrixvectormultiply(/* Real */ ae_matrix* a,
ae_int_t i1,
ae_int_t i2,
ae_int_t j1,
ae_int_t j2,
ae_bool trans,
/* Real */ ae_vector* x,
ae_int_t ix1,
ae_int_t ix2,
double alpha,
/* Real */ ae_vector* y,
ae_int_t iy1,
ae_int_t iy2,
double beta,
ae_state *_state);
double pythag2(double x, double y, ae_state *_state);
void matrixmatrixmultiply(/* Real */ ae_matrix* a,
ae_int_t ai1,
ae_int_t ai2,
ae_int_t aj1,
ae_int_t aj2,
ae_bool transa,
/* Real */ ae_matrix* b,
ae_int_t bi1,
ae_int_t bi2,
ae_int_t bj1,
ae_int_t bj2,
ae_bool transb,
double alpha,
/* Real */ ae_matrix* c,
ae_int_t ci1,
ae_int_t ci2,
ae_int_t cj1,
ae_int_t cj2,
double beta,
/* Real */ ae_vector* work,
ae_state *_state);
void hermitianmatrixvectormultiply(/* Complex */ ae_matrix* a,
ae_bool isupper,
ae_int_t i1,
ae_int_t i2,
/* Complex */ ae_vector* x,
ae_complex alpha,
/* Complex */ ae_vector* y,
ae_state *_state);
void hermitianrank2update(/* Complex */ ae_matrix* a,
ae_bool isupper,
ae_int_t i1,
ae_int_t i2,
/* Complex */ ae_vector* x,
/* Complex */ ae_vector* y,
/* Complex */ ae_vector* t,
ae_complex alpha,
ae_state *_state);
void generatereflection(/* Real */ ae_vector* x,
ae_int_t n,
double* tau,
ae_state *_state);
void applyreflectionfromtheleft(/* Real */ ae_matrix* c,
double tau,
/* Real */ ae_vector* v,
ae_int_t m1,
ae_int_t m2,
ae_int_t n1,
ae_int_t n2,
/* Real */ ae_vector* work,
ae_state *_state);
void applyreflectionfromtheright(/* Real */ ae_matrix* c,
double tau,
/* Real */ ae_vector* v,
ae_int_t m1,
ae_int_t m2,
ae_int_t n1,
ae_int_t n2,
/* Real */ ae_vector* work,
ae_state *_state);
void complexgeneratereflection(/* Complex */ ae_vector* x,
ae_int_t n,
ae_complex* tau,
ae_state *_state);
void complexapplyreflectionfromtheleft(/* Complex */ ae_matrix* c,
ae_complex tau,
/* Complex */ ae_vector* v,
ae_int_t m1,
ae_int_t m2,
ae_int_t n1,
ae_int_t n2,
/* Complex */ ae_vector* work,
ae_state *_state);
void complexapplyreflectionfromtheright(/* Complex */ ae_matrix* c,
ae_complex tau,
/* Complex */ ae_vector* v,
ae_int_t m1,
ae_int_t m2,
ae_int_t n1,
ae_int_t n2,
/* Complex */ ae_vector* work,
ae_state *_state);
void symmetricmatrixvectormultiply(/* Real */ ae_matrix* a,
ae_bool isupper,
ae_int_t i1,
ae_int_t i2,
/* Real */ ae_vector* x,
double alpha,
/* Real */ ae_vector* y,
ae_state *_state);
void symmetricrank2update(/* Real */ ae_matrix* a,
ae_bool isupper,
ae_int_t i1,
ae_int_t i2,
/* Real */ ae_vector* x,
/* Real */ ae_vector* y,
/* Real */ ae_vector* t,
double alpha,
ae_state *_state);
void applyrotationsfromtheleft(ae_bool isforward,
ae_int_t m1,
ae_int_t m2,
ae_int_t n1,
ae_int_t n2,
/* Real */ ae_vector* c,
/* Real */ ae_vector* s,
/* Real */ ae_matrix* a,
/* Real */ ae_vector* work,
ae_state *_state);
void applyrotationsfromtheright(ae_bool isforward,
ae_int_t m1,
ae_int_t m2,
ae_int_t n1,
ae_int_t n2,
/* Real */ ae_vector* c,
/* Real */ ae_vector* s,
/* Real */ ae_matrix* a,
/* Real */ ae_vector* work,
ae_state *_state);
void generaterotation(double f,
double g,
double* cs,
double* sn,
double* r,
ae_state *_state);
ae_bool upperhessenbergschurdecomposition(/* Real */ ae_matrix* h,
ae_int_t n,
/* Real */ ae_matrix* s,
ae_state *_state);
void internalschurdecomposition(/* Real */ ae_matrix* h,
ae_int_t n,
ae_int_t tneeded,
ae_int_t zneeded,
/* Real */ ae_vector* wr,
/* Real */ ae_vector* wi,
/* Real */ ae_matrix* z,
ae_int_t* info,
ae_state *_state);
void rmatrixtrsafesolve(/* Real */ ae_matrix* a,
ae_int_t n,
/* Real */ ae_vector* x,
double* s,
ae_bool isupper,
ae_bool istrans,
ae_bool isunit,
ae_state *_state);
void safesolvetriangular(/* Real */ ae_matrix* a,
ae_int_t n,
/* Real */ ae_vector* x,
double* s,
ae_bool isupper,
ae_bool istrans,
ae_bool isunit,
ae_bool normin,
/* Real */ ae_vector* cnorm,
ae_state *_state);
ae_bool rmatrixscaledtrsafesolve(/* Real */ ae_matrix* a,
double sa,
ae_int_t n,
/* Real */ ae_vector* x,
ae_bool isupper,
ae_int_t trans,
ae_bool isunit,
double maxgrowth,
ae_state *_state);
ae_bool cmatrixscaledtrsafesolve(/* Complex */ ae_matrix* a,
double sa,
ae_int_t n,
/* Complex */ ae_vector* x,
ae_bool isupper,
ae_int_t trans,
ae_bool isunit,
double maxgrowth,
ae_state *_state);
void xdot(/* Real */ ae_vector* a,
/* Real */ ae_vector* b,
ae_int_t n,
/* Real */ ae_vector* temp,
double* r,
double* rerr,
ae_state *_state);
void xcdot(/* Complex */ ae_vector* a,
/* Complex */ ae_vector* b,
ae_int_t n,
/* Real */ ae_vector* temp,
ae_complex* r,
double* rerr,
ae_state *_state);
void linminnormalized(/* Real */ ae_vector* d,
double* stp,
ae_int_t n,
ae_state *_state);
void mcsrch(ae_int_t n,
/* Real */ ae_vector* x,
double* f,
/* Real */ ae_vector* g,
/* Real */ ae_vector* s,
double* stp,
double stpmax,
double gtol,
ae_int_t* info,
ae_int_t* nfev,
/* Real */ ae_vector* wa,
linminstate* state,
ae_int_t* stage,
ae_state *_state);
void armijocreate(ae_int_t n,
/* Real */ ae_vector* x,
double f,
/* Real */ ae_vector* s,
double stp,
double stpmax,
ae_int_t fmax,
armijostate* state,
ae_state *_state);
ae_bool armijoiteration(armijostate* state, ae_state *_state);
void armijoresults(armijostate* state,
ae_int_t* info,
double* stp,
double* f,
ae_state *_state);
ae_bool _linminstate_init(void* _p, ae_state *_state, ae_bool make_automatic);
ae_bool _linminstate_init_copy(void* _dst, void* _src, ae_state *_state, ae_bool make_automatic);
void _linminstate_clear(void* _p);
void _linminstate_destroy(void* _p);
ae_bool _armijostate_init(void* _p, ae_state *_state, ae_bool make_automatic);
ae_bool _armijostate_init_copy(void* _dst, void* _src, ae_state *_state, ae_bool make_automatic);
void _armijostate_clear(void* _p);
void _armijostate_destroy(void* _p);
void ftbasegeneratecomplexfftplan(ae_int_t n,
ftplan* plan,
ae_state *_state);
void ftbasegeneraterealfftplan(ae_int_t n, ftplan* plan, ae_state *_state);
void ftbasegeneraterealfhtplan(ae_int_t n, ftplan* plan, ae_state *_state);
void ftbaseexecuteplan(/* Real */ ae_vector* a,
ae_int_t aoffset,
ae_int_t n,
ftplan* plan,
ae_state *_state);
void ftbaseexecuteplanrec(/* Real */ ae_vector* a,
ae_int_t aoffset,
ftplan* plan,
ae_int_t entryoffset,
ae_int_t stackptr,
ae_state *_state);
void ftbasefactorize(ae_int_t n,
ae_int_t tasktype,
ae_int_t* n1,
ae_int_t* n2,
ae_state *_state);
ae_bool ftbaseissmooth(ae_int_t n, ae_state *_state);
ae_int_t ftbasefindsmooth(ae_int_t n, ae_state *_state);
ae_int_t ftbasefindsmootheven(ae_int_t n, ae_state *_state);
double ftbasegetflopestimate(ae_int_t n, ae_state *_state);
ae_bool _ftplan_init(void* _p, ae_state *_state, ae_bool make_automatic);
ae_bool _ftplan_init_copy(void* _dst, void* _src, ae_state *_state, ae_bool make_automatic);
void _ftplan_clear(void* _p);
void _ftplan_destroy(void* _p);
double nulog1p(double x, ae_state *_state);
double nuexpm1(double x, ae_state *_state);
double nucosm1(double x, ae_state *_state);
}
#endif