20#ifndef _alglibinternal_pkg_h
21#define _alglibinternal_pkg_h
170ae_int_t getrdfserializationcode(ae_state *_state);
171ae_int_t getkdtreeserializationcode(ae_state *_state);
172ae_int_t getmlpserializationcode(ae_state *_state);
173ae_int_t getmlpeserializationcode(ae_state *_state);
174ae_int_t getrbfserializationcode(ae_state *_state);
175ae_bool seterrorflag(ae_bool* flag, ae_bool cond, ae_state *_state);
176ae_bool seterrorflagdiff(ae_bool* flag,
182void touchint(ae_int_t* a, ae_state *_state);
183void touchreal(
double* a, ae_state *_state);
184double coalesce(
double a,
double b, ae_state *_state);
185ae_int_t coalescei(ae_int_t a, ae_int_t b, ae_state *_state);
186double inttoreal(ae_int_t a, ae_state *_state);
187double logbase2(
double x, ae_state *_state);
188ae_bool approxequal(
double a,
double b,
double tol, ae_state *_state);
189ae_bool approxequalrel(
double a,
double b,
double tol, ae_state *_state);
190void taskgenint1d(
double a,
196void taskgenint1dequidist(
double a,
202void taskgenint1dcheb1(
double a,
208void taskgenint1dcheb2(
double a,
214ae_bool aredistinct( ae_vector* x,
217ae_bool aresameboolean(ae_bool v1, ae_bool v2, ae_state *_state);
218void bvectorsetlengthatleast( ae_vector* x,
221void ivectorsetlengthatleast( ae_vector* x,
224void rvectorsetlengthatleast( ae_vector* x,
227void rmatrixsetlengthatleast( ae_matrix* x,
231void ivectorresize( ae_vector* x,
234void rvectorresize( ae_vector* x,
237void rmatrixresize( ae_matrix* x,
241void imatrixresize( ae_matrix* x,
245ae_bool isfinitevector( ae_vector* x,
248ae_bool isfinitecvector( ae_vector* z,
251ae_bool apservisfinitematrix( ae_matrix* x,
255ae_bool apservisfinitecmatrix( ae_matrix* x,
259ae_bool isfinitertrmatrix( ae_matrix* x,
263ae_bool apservisfinitectrmatrix( ae_matrix* x,
267ae_bool apservisfiniteornanmatrix( ae_matrix* x,
271double safepythag2(
double x,
double y, ae_state *_state);
272double safepythag3(
double x,
double y,
double z, ae_state *_state);
273ae_int_t saferdiv(
double x,
double y,
double* r, ae_state *_state);
274double safeminposrv(
double x,
double y,
double v, ae_state *_state);
275void apperiodicmap(
double* x,
280double randomnormal(ae_state *_state);
281void randomunit(ae_int_t n, ae_vector* x, ae_state *_state);
282void swapi(ae_int_t* v0, ae_int_t* v1, ae_state *_state);
283void swapr(
double* v0,
double* v1, ae_state *_state);
284double maxreal3(
double v0,
double v1,
double v2, ae_state *_state);
285void inc(ae_int_t* v, ae_state *_state);
286void dec(ae_int_t* v, ae_state *_state);
287void countdown(ae_int_t* v, ae_state *_state);
288double rmul2(
double v0,
double v1, ae_state *_state);
289double boundval(
double x,
double b1,
double b2, ae_state *_state);
290void alloccomplex(ae_serializer* s, ae_complex v, ae_state *_state);
291void serializecomplex(ae_serializer* s, ae_complex v, ae_state *_state);
292ae_complex unserializecomplex(ae_serializer* s, ae_state *_state);
293void allocrealarray(ae_serializer* s,
297void serializerealarray(ae_serializer* s,
301void unserializerealarray(ae_serializer* s,
304void allocintegerarray(ae_serializer* s,
308void serializeintegerarray(ae_serializer* s,
312void unserializeintegerarray(ae_serializer* s,
315void allocrealmatrix(ae_serializer* s,
320void serializerealmatrix(ae_serializer* s,
325void unserializerealmatrix(ae_serializer* s,
328void copyintegerarray( ae_vector* src,
331void copyrealarray( ae_vector* src,
334void copyrealmatrix( ae_matrix* src,
337void unsetintegerarray( ae_vector* a, ae_state *_state);
338void unsetrealarray( ae_vector* a, ae_state *_state);
339void unsetrealmatrix( ae_matrix* a, ae_state *_state);
340ae_int_t recsearch( ae_vector* a,
347void splitlengtheven(ae_int_t tasksize,
351void splitlength(ae_int_t tasksize,
356ae_int_t chunkscount(ae_int_t tasksize,
359void _apbuffers_init(
void* _p, ae_state *_state);
360void _apbuffers_init_copy(
void* _dst,
void* _src, ae_state *_state);
361void _apbuffers_clear(
void* _p);
362void _apbuffers_destroy(
void* _p);
363void _sboolean_init(
void* _p, ae_state *_state);
364void _sboolean_init_copy(
void* _dst,
void* _src, ae_state *_state);
365void _sboolean_clear(
void* _p);
366void _sboolean_destroy(
void* _p);
367void _sbooleanarray_init(
void* _p, ae_state *_state);
368void _sbooleanarray_init_copy(
void* _dst,
void* _src, ae_state *_state);
369void _sbooleanarray_clear(
void* _p);
370void _sbooleanarray_destroy(
void* _p);
371void _sinteger_init(
void* _p, ae_state *_state);
372void _sinteger_init_copy(
void* _dst,
void* _src, ae_state *_state);
373void _sinteger_clear(
void* _p);
374void _sinteger_destroy(
void* _p);
375void _sintegerarray_init(
void* _p, ae_state *_state);
376void _sintegerarray_init_copy(
void* _dst,
void* _src, ae_state *_state);
377void _sintegerarray_clear(
void* _p);
378void _sintegerarray_destroy(
void* _p);
379void _sreal_init(
void* _p, ae_state *_state);
380void _sreal_init_copy(
void* _dst,
void* _src, ae_state *_state);
381void _sreal_clear(
void* _p);
382void _sreal_destroy(
void* _p);
383void _srealarray_init(
void* _p, ae_state *_state);
384void _srealarray_init_copy(
void* _dst,
void* _src, ae_state *_state);
385void _srealarray_clear(
void* _p);
386void _srealarray_destroy(
void* _p);
387void _scomplex_init(
void* _p, ae_state *_state);
388void _scomplex_init_copy(
void* _dst,
void* _src, ae_state *_state);
389void _scomplex_clear(
void* _p);
390void _scomplex_destroy(
void* _p);
391void _scomplexarray_init(
void* _p, ae_state *_state);
392void _scomplexarray_init_copy(
void* _dst,
void* _src, ae_state *_state);
393void _scomplexarray_clear(
void* _p);
394void _scomplexarray_destroy(
void* _p);
395void tagsort( ae_vector* a,
400void tagsortbuf( ae_vector* a,
406void tagsortfasti( ae_vector* a,
412void tagsortfastr( ae_vector* a,
418void tagsortfast( ae_vector* a,
422void tagsortmiddleir( ae_vector* a,
427void tagheappushi( ae_vector* a,
433void tagheapreplacetopi( ae_vector* a,
439void tagheappopi( ae_vector* a,
443ae_int_t lowerbound( ae_vector* a,
447ae_int_t upperbound( ae_vector* a,
451void generatereflection( ae_vector* x,
455void applyreflectionfromtheleft( ae_matrix* c,
464void applyreflectionfromtheright( ae_matrix* c,
473void complexgeneratereflection( ae_vector* x,
477void complexapplyreflectionfromtheleft( ae_matrix* c,
486void complexapplyreflectionfromtheright( ae_matrix* c,
495ae_bool cmatrixrank1f(ae_int_t m,
505ae_bool rmatrixrank1f(ae_int_t m,
515ae_bool cmatrixmvf(ae_int_t m,
526ae_bool rmatrixmvf(ae_int_t m,
537ae_bool cmatrixrighttrsmf(ae_int_t m,
549ae_bool cmatrixlefttrsmf(ae_int_t m,
561ae_bool rmatrixrighttrsmf(ae_int_t m,
573ae_bool rmatrixlefttrsmf(ae_int_t m,
585ae_bool cmatrixherkf(ae_int_t n,
598ae_bool rmatrixsyrkf(ae_int_t n,
611ae_bool rmatrixgemmf(ae_int_t m,
628ae_bool cmatrixgemmf(ae_int_t m,
645void cmatrixgemmk(ae_int_t m,
662void rmatrixgemmk(ae_int_t m,
679void rmatrixgemmk44v00(ae_int_t m,
694void rmatrixgemmk44v01(ae_int_t m,
709void rmatrixgemmk44v10(ae_int_t m,
724void rmatrixgemmk44v11(ae_int_t m,
739ae_bool rmatrixsyrkmkl(ae_int_t n,
752ae_bool cmatrixherkmkl(ae_int_t n,
765ae_bool rmatrixgemmmkl(ae_int_t m,
782ae_bool cmatrixgemmmkl(ae_int_t m,
799ae_bool cmatrixlefttrsmmkl(ae_int_t m,
811ae_bool cmatrixrighttrsmmkl(ae_int_t m,
823ae_bool rmatrixlefttrsmmkl(ae_int_t m,
835ae_bool rmatrixrighttrsmmkl(ae_int_t m,
847ae_bool spdmatrixcholeskymkl( ae_matrix* a,
853ae_bool rmatrixplumkl( ae_matrix* a,
859ae_bool rmatrixbdmkl( ae_matrix* a,
867ae_bool rmatrixbdmultiplybymkl( ae_matrix* qp,
876 ae_bool fromtheright,
879ae_bool rmatrixhessenbergmkl( ae_matrix* a,
883ae_bool rmatrixhessenbergunpackqmkl( ae_matrix* a,
888ae_bool smatrixtdmkl( ae_matrix* a,
895ae_bool smatrixtdunpackqmkl( ae_matrix* a,
901ae_bool hmatrixtdmkl( ae_matrix* a,
908ae_bool hmatrixtdunpackqmkl( ae_matrix* a,
914ae_bool rmatrixbdsvdmkl( ae_vector* d,
926ae_bool rmatrixinternalschurdecompositionmkl( ae_matrix* h,
935ae_bool rmatrixinternaltrevcmkl( ae_matrix* t,
944ae_bool smatrixtdevdmkl( ae_vector* d,
951void applyrotationsfromtheleft(ae_bool isforward,
961void applyrotationsfromtheright(ae_bool isforward,
971void generaterotation(
double f,
977void rmatrixtrsafesolve( ae_matrix* a,
985void safesolvetriangular( ae_matrix* a,
995ae_bool rmatrixscaledtrsafesolve( ae_matrix* a,
1004ae_bool cmatrixscaledtrsafesolve( ae_matrix* a,
1013void hermitianmatrixvectormultiply( ae_matrix* a,
1021void hermitianrank2update( ae_matrix* a,
1030void symmetricmatrixvectormultiply( ae_matrix* a,
1038void symmetricrank2update( ae_matrix* a,
1047double vectornorm2( ae_vector* x,
1051ae_int_t vectoridxabsmax( ae_vector* x,
1055ae_int_t columnidxabsmax( ae_matrix* x,
1060ae_int_t rowidxabsmax( ae_matrix* x,
1065double upperhessenberg1norm( ae_matrix* a,
1072void copymatrix( ae_matrix* a,
1083void inplacetranspose( ae_matrix* a,
1090void copyandtranspose( ae_matrix* a,
1101void matrixvectormultiply( ae_matrix* a,
1116double pythag2(
double x,
double y, ae_state *_state);
1117void matrixmatrixmultiply( ae_matrix* a,
1138void linminnormalized( ae_vector* d,
1142void mcsrch(ae_int_t n,
1156void armijocreate(ae_int_t n,
1165ae_bool armijoiteration(armijostate* state, ae_state *_state);
1166void armijoresults(armijostate* state,
1171void _linminstate_init(
void* _p, ae_state *_state);
1172void _linminstate_init_copy(
void* _dst,
void* _src, ae_state *_state);
1173void _linminstate_clear(
void* _p);
1174void _linminstate_destroy(
void* _p);
1175void _armijostate_init(
void* _p, ae_state *_state);
1176void _armijostate_init_copy(
void* _dst,
void* _src, ae_state *_state);
1177void _armijostate_clear(
void* _p);
1178void _armijostate_destroy(
void* _p);
1179void xdot( ae_vector* a,
1186void xcdot( ae_vector* a,
1193void rmatrixinternalschurdecomposition( ae_matrix* h,
1202ae_bool upperhessenbergschurdecomposition( ae_matrix* h,
1206void internalschurdecomposition( ae_matrix* h,
1215void rankx( ae_vector* x,
1220void rankxuntied( ae_vector* x,
1224void hpcpreparechunkedgradient( ae_vector* weights,
1231void hpcfinalizechunkedgradient(mlpbuffers* buf,
1234ae_bool hpcchunkedgradient( ae_vector* weights,
1235 ae_vector* structinfo,
1236 ae_vector* columnmeans,
1237 ae_vector* columnsigmas,
1241 ae_vector* batch4buf,
1244 ae_bool naturalerrorfunc,
1246ae_bool hpcchunkedprocess( ae_vector* weights,
1247 ae_vector* structinfo,
1248 ae_vector* columnmeans,
1249 ae_vector* columnsigmas,
1253 ae_vector* batch4buf,
1256void _mlpbuffers_init(
void* _p, ae_state *_state);
1257void _mlpbuffers_init_copy(
void* _dst,
void* _src, ae_state *_state);
1258void _mlpbuffers_clear(
void* _p);
1259void _mlpbuffers_destroy(
void* _p);
1260void findprimitiverootandinverse(ae_int_t n,
1264void ftcomplexfftplan(ae_int_t n,
1266 fasttransformplan* plan,
1268void ftapplyplan(fasttransformplan* plan,
1273void ftbasefactorize(ae_int_t n,
1278ae_bool ftbaseissmooth(ae_int_t n, ae_state *_state);
1279ae_int_t ftbasefindsmooth(ae_int_t n, ae_state *_state);
1280ae_int_t ftbasefindsmootheven(ae_int_t n, ae_state *_state);
1281double ftbasegetflopestimate(ae_int_t n, ae_state *_state);
1282void _fasttransformplan_init(
void* _p, ae_state *_state);
1283void _fasttransformplan_init_copy(
void* _dst,
void* _src, ae_state *_state);
1284void _fasttransformplan_clear(
void* _p);
1285void _fasttransformplan_destroy(
void* _p);
1286double nulog1p(
double x, ae_state *_state);
1287double nuexpm1(
double x, ae_state *_state);
1288double nucosm1(
double x, ae_state *_state);