20#ifndef _alglibmisc_pkg_h
21#define _alglibmisc_pkg_h
23#include "alglibinternal.h"
62 ae_int_t debugcounter;
221void kdtreeserialize(
kdtree &obj, std::string &s_out);
227void kdtreeunserialize(
const std::string &s_in,
kdtree &obj);
243void kdtreeserialize(
kdtree &obj, std::ostream &s_out);
249void kdtreeunserialize(
const std::istream &s_in,
kdtree &obj);
287void kdtreebuild(
const real_2d_array &xy,
const ae_int_t n,
const ae_int_t nx,
const ae_int_t ny,
const ae_int_t normtype,
kdtree &kdt);
288void kdtreebuild(
const real_2d_array &xy,
const ae_int_t nx,
const ae_int_t ny,
const ae_int_t normtype,
kdtree &kdt);
328void kdtreebuildtagged(
const real_2d_array &xy,
const integer_1d_array &tags,
const ae_int_t n,
const ae_int_t nx,
const ae_int_t ny,
const ae_int_t normtype,
kdtree &kdt);
396ae_int_t kdtreequeryknn(
const kdtree &kdt,
const real_1d_array &x,
const ae_int_t k,
const bool selfmatch);
479ae_int_t kdtreequeryrnn(
const kdtree &kdt,
const real_1d_array &x,
const double r,
const bool selfmatch);
570ae_int_t kdtreequeryaknn(
const kdtree &kdt,
const real_1d_array &x,
const ae_int_t k,
const bool selfmatch,
const double eps);
571ae_int_t kdtreequeryaknn(
const kdtree &kdt,
const real_1d_array &x,
const ae_int_t k,
const double eps);
1079void hqrndseed(
const ae_int_t s1,
const ae_int_t s2,
hqrndstate &state);
1091double hqrnduniformr(
const hqrndstate &state);
1106ae_int_t hqrnduniformi(
const hqrndstate &state,
const ae_int_t n);
1131void hqrndunit2(
const hqrndstate &state,
double &x,
double &y);
1145void hqrndnormal2(
const hqrndstate &state,
double &x1,
double &x2);
1156double hqrndexponential(
const hqrndstate &state,
const double lambdav);
1471void xdebugb2outsin(
const ae_int_t m,
const ae_int_t n,
boolean_2d_array &a);
1522void xdebugi2outsin(
const ae_int_t m,
const ae_int_t n,
integer_2d_array &a);
1573void xdebugr2outsin(
const ae_int_t m,
const ae_int_t n,
real_2d_array &a);
1624void xdebugc2outsincos(
const ae_int_t m,
const ae_int_t n,
complex_2d_array &a);
1644namespace alglib_impl
1646void kdtreebuild( ae_matrix* xy,
1653void kdtreebuildtagged( ae_matrix* xy,
1661void kdtreecreaterequestbuffer(kdtree* kdt,
1662 kdtreerequestbuffer* buf,
1664ae_int_t kdtreequeryknn(kdtree* kdt,
1669ae_int_t kdtreetsqueryknn(kdtree* kdt,
1670 kdtreerequestbuffer* buf,
1675ae_int_t kdtreequeryrnn(kdtree* kdt,
1680ae_int_t kdtreetsqueryrnn(kdtree* kdt,
1681 kdtreerequestbuffer* buf,
1686ae_int_t kdtreequeryaknn(kdtree* kdt,
1692ae_int_t kdtreetsqueryaknn(kdtree* kdt,
1693 kdtreerequestbuffer* buf,
1699ae_int_t kdtreequerybox(kdtree* kdt,
1703ae_int_t kdtreetsquerybox(kdtree* kdt,
1704 kdtreerequestbuffer* buf,
1708void kdtreequeryresultsx(kdtree* kdt,
1711void kdtreequeryresultsxy(kdtree* kdt,
1714void kdtreequeryresultstags(kdtree* kdt,
1717void kdtreequeryresultsdistances(kdtree* kdt,
1720void kdtreetsqueryresultsx(kdtree* kdt,
1721 kdtreerequestbuffer* buf,
1724void kdtreetsqueryresultsxy(kdtree* kdt,
1725 kdtreerequestbuffer* buf,
1728void kdtreetsqueryresultstags(kdtree* kdt,
1729 kdtreerequestbuffer* buf,
1732void kdtreetsqueryresultsdistances(kdtree* kdt,
1733 kdtreerequestbuffer* buf,
1736void kdtreequeryresultsxi(kdtree* kdt,
1739void kdtreequeryresultsxyi(kdtree* kdt,
1742void kdtreequeryresultstagsi(kdtree* kdt,
1745void kdtreequeryresultsdistancesi(kdtree* kdt,
1748void kdtreeexplorebox(kdtree* kdt,
1752void kdtreeexplorenodetype(kdtree* kdt,
1756void kdtreeexploreleaf(kdtree* kdt,
1761void kdtreeexploresplit(kdtree* kdt,
1768void kdtreealloc(ae_serializer* s, kdtree* tree, ae_state *_state);
1769void kdtreeserialize(ae_serializer* s, kdtree* tree, ae_state *_state);
1770void kdtreeunserialize(ae_serializer* s, kdtree* tree, ae_state *_state);
1771void _kdtreerequestbuffer_init(
void* _p, ae_state *_state);
1772void _kdtreerequestbuffer_init_copy(
void* _dst,
void* _src, ae_state *_state);
1773void _kdtreerequestbuffer_clear(
void* _p);
1774void _kdtreerequestbuffer_destroy(
void* _p);
1775void _kdtree_init(
void* _p, ae_state *_state);
1776void _kdtree_init_copy(
void* _dst,
void* _src, ae_state *_state);
1777void _kdtree_clear(
void* _p);
1778void _kdtree_destroy(
void* _p);
1779void hqrndrandomize(hqrndstate* state, ae_state *_state);
1780void hqrndseed(ae_int_t s1,
1784double hqrnduniformr(hqrndstate* state, ae_state *_state);
1785ae_int_t hqrnduniformi(hqrndstate* state, ae_int_t n, ae_state *_state);
1786double hqrndnormal(hqrndstate* state, ae_state *_state);
1787void hqrndunit2(hqrndstate* state,
double* x,
double* y, ae_state *_state);
1788void hqrndnormal2(hqrndstate* state,
1792double hqrndexponential(hqrndstate* state,
1795double hqrnddiscrete(hqrndstate* state,
1799double hqrndcontinuous(hqrndstate* state,
1803void _hqrndstate_init(
void* _p, ae_state *_state);
1804void _hqrndstate_init_copy(
void* _dst,
void* _src, ae_state *_state);
1805void _hqrndstate_clear(
void* _p);
1806void _hqrndstate_destroy(
void* _p);
1807void xdebuginitrecord1(xdebugrecord1* rec1, ae_state *_state);
1808ae_int_t xdebugb1count( ae_vector* a, ae_state *_state);
1809void xdebugb1not( ae_vector* a, ae_state *_state);
1810void xdebugb1appendcopy( ae_vector* a, ae_state *_state);
1811void xdebugb1outeven(ae_int_t n,
1814ae_int_t xdebugi1sum( ae_vector* a, ae_state *_state);
1815void xdebugi1neg( ae_vector* a, ae_state *_state);
1816void xdebugi1appendcopy( ae_vector* a, ae_state *_state);
1817void xdebugi1outeven(ae_int_t n,
1820double xdebugr1sum( ae_vector* a, ae_state *_state);
1821void xdebugr1neg( ae_vector* a, ae_state *_state);
1822void xdebugr1appendcopy( ae_vector* a, ae_state *_state);
1823void xdebugr1outeven(ae_int_t n,
1826ae_complex xdebugc1sum( ae_vector* a, ae_state *_state);
1827void xdebugc1neg( ae_vector* a, ae_state *_state);
1828void xdebugc1appendcopy( ae_vector* a, ae_state *_state);
1829void xdebugc1outeven(ae_int_t n,
1832ae_int_t xdebugb2count( ae_matrix* a, ae_state *_state);
1833void xdebugb2not( ae_matrix* a, ae_state *_state);
1834void xdebugb2transpose( ae_matrix* a, ae_state *_state);
1835void xdebugb2outsin(ae_int_t m,
1839ae_int_t xdebugi2sum( ae_matrix* a, ae_state *_state);
1840void xdebugi2neg( ae_matrix* a, ae_state *_state);
1841void xdebugi2transpose( ae_matrix* a, ae_state *_state);
1842void xdebugi2outsin(ae_int_t m,
1846double xdebugr2sum( ae_matrix* a, ae_state *_state);
1847void xdebugr2neg( ae_matrix* a, ae_state *_state);
1848void xdebugr2transpose( ae_matrix* a, ae_state *_state);
1849void xdebugr2outsin(ae_int_t m,
1853ae_complex xdebugc2sum( ae_matrix* a, ae_state *_state);
1854void xdebugc2neg( ae_matrix* a, ae_state *_state);
1855void xdebugc2transpose( ae_matrix* a, ae_state *_state);
1856void xdebugc2outsincos(ae_int_t m,
1860double xdebugmaskedbiasedproductsum(ae_int_t m,
1866void _xdebugrecord1_init(
void* _p, ae_state *_state);
1867void _xdebugrecord1_init_copy(
void* _dst,
void* _src, ae_state *_state);
1868void _xdebugrecord1_clear(
void* _p);
1869void _xdebugrecord1_destroy(
void* _p);