~ubuntu-branches/ubuntu/wily/afnix/wily

« back to all changes in this revision

Viewing changes to src/mod/mth/shl/Libmth.cpp

  • Committer: Package Import Robot
  • Author(s): Nobuhiro Iwamatsu
  • Date: 2015-07-11 02:00:35 UTC
  • mfrom: (10.1.1 sid)
  • Revision ID: package-import@ubuntu.com-20150711020035-2nhpztq7s15qyc0v
Tags: 2.5.1-1
* New upstream release. (Closes: #789968)
* Update debian/control.
  - Update Standards-Version to 3.9.6.
* Add support mips64(el) and ppc64el. (Closes: #741508, #748146)
* Add patches/support-gcc-5.x.patch. (Closes: #777767)
  - Fix build with gcc-5.x.
* Add patches/Disable-NET0001.als.patch.
  - Disable test of NET0001.als.

Show diffs side-by-side

added added

removed removed

Lines of Context:
11
11
// - the copyright holder be liable for any  direct, indirect, incidental or -
12
12
// - special damages arising in any way out of the use of this software.     -
13
13
// ---------------------------------------------------------------------------
14
 
// - copyright (c) 1999-2012 amaury darsch                                   -
 
14
// - copyright (c) 1999-2015 amaury darsch                                   -
15
15
// ---------------------------------------------------------------------------
16
16
 
 
17
#include "Qr.hpp"
 
18
#include "Mgs.hpp"
 
19
#include "Cgs.hpp"
 
20
#include "Bcs.hpp"
 
21
#include "Tqmr.hpp"
17
22
#include "Meta.hpp"
18
23
#include "Mpia.hpp"
 
24
#include "Ippd.hpp"
19
25
#include "Random.hpp"
20
26
#include "Linear.hpp"
21
27
#include "Newton.hpp"
 
28
#include "Rblock.hpp"
22
29
#include "Libmth.hpp"
23
30
#include "Predmth.hpp"
24
 
#include "IpPoint.hpp"
25
31
#include "Rvector.hpp"
 
32
#include "Rgivens.hpp"
26
33
#include "Rmatrix.hpp"
27
34
#include "Function.hpp"
28
 
#include "MthCalls.hpp"
 
35
#include "Analytic.hpp"
29
36
#include "Rsamples.hpp"
30
37
#include "Rpolynom.hpp"
31
38
#include "Rfunction.hpp"
32
39
#include "Primality.hpp"
 
40
#include "LinearFactory.hpp"
33
41
 
34
42
namespace afnix {
35
43
 
43
51
    Nameset* aset = interp->mknset ("afnix");
44
52
    Nameset* mset = aset->mknset   ("mth");
45
53
 
46
 
    // bind all symbols in the afnix:nwg nameset
 
54
    // bind all symbols in the afnix:mth nameset
 
55
    mset->symcst ("Qr",                  new Meta (Qr::mknew));
 
56
    mset->symcst ("Mgs",                 new Meta (Mgs::mknew));
 
57
    mset->symcst ("Rmd",                 new Meta (Rmd::mknew));
 
58
    mset->symcst ("Rpi",                 new Meta (Rpi::mknew));
 
59
    mset->symcst ("Cgs",                 new Meta (Cgs::mknew));
 
60
    mset->symcst ("Bcs",                 new Meta (Bcs::mknew));
 
61
    mset->symcst ("Tqmr",                new Meta (Tqmr::mknew));
 
62
    mset->symcst ("Rmit",                new Meta (Rmit::meval));
 
63
    mset->symcst ("Ippd",                new Meta (Ippd::mknew));
47
64
    mset->symcst ("Linear",              new Meta (Linear::mknew));
48
65
    mset->symcst ("Newton",              new Meta (Newton::mknew));
49
 
    mset->symcst ("IpPoint",             new Meta (IpPoint::mknew));
 
66
    mset->symcst ("Rblock",              new Meta (Rblock::mknew));
50
67
    mset->symcst ("Rvector",             new Meta (Rvector::mknew));
 
68
    mset->symcst ("Rgivens",             new Meta (Rgivens::mknew));
51
69
    mset->symcst ("Rmatrix",             new Meta (Rmatrix::mknew));
52
70
    mset->symcst ("Rsamples",            new Meta (Rsamples::mknew));
53
71
    mset->symcst ("Rpolynom",            new Meta (Rpolynom::mknew));
 
72
    mset->symcst ("Analytic",            new Meta (Analytic::mknew));
54
73
    mset->symcst ("Rfunction",           new Meta (Rfunction::mknew));
 
74
    mset->symcst ("LinearFactory",       new Meta (LinearFactory::mknew));
55
75
    
56
76
    // bind the predicates
 
77
    mset->symcst ("qr-p",                new Function (mth_qrdp));
 
78
    mset->symcst ("mgs-p",               new Function (mth_mgsp));
 
79
    mset->symcst ("rmd-p",               new Function (mth_rmdp));
 
80
    mset->symcst ("rpi-p",               new Function (mth_rpip));
57
81
    mset->symcst ("rvi-p",               new Function (mth_rvip));
58
82
    mset->symcst ("rmi-p",               new Function (mth_rmip));
59
83
    mset->symcst ("rfi-p",               new Function (mth_rfip));
 
84
    mset->symcst ("cgs-p",               new Function (mth_cgsp));
 
85
    mset->symcst ("bcs-p",               new Function (mth_bcsp));
 
86
    mset->symcst ("tqmr-p",              new Function (mth_tqmrp));
 
87
    mset->symcst ("ippd-p",              new Function (mth_ippdp));
 
88
    mset->symcst ("solver-p",            new Function (mth_slvp));
 
89
    mset->symcst ("direct-p",            new Function (mth_dlsp));
60
90
    mset->symcst ("linear-p",            new Function (mth_lnrp));
61
91
    mset->symcst ("newton-p",            new Function (mth_ntwp));
62
 
    mset->symcst ("i-ppoint-p",          new Function (mth_ippp));
 
92
    mset->symcst ("analytic-p",          new Function (mth_anap));
 
93
    mset->symcst ("parallel-p",          new Function (mth_parp));
 
94
    mset->symcst ("iterative-p",         new Function (mth_ilsp));
 
95
    mset->symcst ("r-block-p",           new Function (mth_rblokp));
63
96
    mset->symcst ("r-vector-p",          new Function (mth_rvectp));
 
97
    mset->symcst ("r-givens-p",          new Function (mth_rgvnsp));
 
98
    mset->symcst ("r-block-p",           new Function (mth_rblokp));
64
99
    mset->symcst ("r-matrix-p",          new Function (mth_rmtrxp));
65
100
    mset->symcst ("r-samples-p",         new Function (mth_rsap));
66
101
    mset->symcst ("r-polynom-p",         new Function (mth_rpolyp));
67
102
    mset->symcst ("r-function-p",        new Function (mth_rfuncp));
 
103
    mset->symcst ("solver-factory-p",    new Function (mth_sfcp));
 
104
    mset->symcst ("linear-factory-p",    new Function (mth_lfcp));
68
105
 
69
106
    // bind all mth calls in the afnix:mth nameset
70
107
    mset->symcst ("gcd",                 new Function (mth_gcd));
77
114
    mset->symcst ("get-random-prime",    new Function (mth_primrnd));
78
115
    mset->symcst ("get-random-bitset",   new Function (mth_bitsrnd));
79
116
    mset->symcst ("get-random-r-vector", new Function (mth_rvecrnd));
 
117
    mset->symcst ("get-random-r-block",  new Function (mth_rblkrnd));
80
118
    mset->symcst ("get-random-r-matrix", new Function (mth_rmtxrnd));
 
119
    mset->symcst ("get-sparse-r-block",  new Function (mth_rblksps));
 
120
    mset->symcst ("get-sparse-r-matrix", new Function (mth_rmtxsps));
81
121
 
82
122
    mset->symcst ("fermat-p",            new Function (mth_frmtp));
83
123
    mset->symcst ("miller-rabin-p",      new Function (mth_mrptp));
84
124
    mset->symcst ("prime-probable-p",    new Function (mth_ppntp));
85
125
 
86
 
    mset->symcst ("solver-cgs",          new Function (mth_cgs));
87
 
    mset->symcst ("solver-bcs",          new Function (mth_bcs));
88
 
 
89
126
    // not used but needed
90
127
    return nilp;
91
128
  }