[BACK]Return to vlprs_tables.ads CVS log [TXT][DIR] Up to [local] / OpenXM_contrib / PHC / Ada / Continuation

Annotation of OpenXM_contrib/PHC/Ada/Continuation/vlprs_tables.ads, Revision 1.1.1.1

1.1       maekawa     1: with Standard_Floating_Numbers;          use Standard_Floating_Numbers;
                      2: with Standard_Floating_Vectors;          use Standard_Floating_Vectors;
                      3: with Standard_Floating_Matrices;         use Standard_Floating_Matrices;
                      4:
                      5: package vLpRs_Tables is
                      6:
                      7: -- DESCRIPTION :
                      8: --   This package implements the tables for an r-order extrapolation method.
                      9: --   For all tables, there is a full and a pipe-lining version.
                     10: --   For efficiency reasons the full v- and L-table are combined.
                     11:
                     12: -- I. The v-table : extrapolated values of log(|x_i(s_k)|).
                     13:
                     14:   procedure v_pipe ( v : in out Vector; p : in Vector; vr : in double_float );
                     15:   procedure v_pipe ( v,p : in Vector; vr : in double_float;
                     16:                      vrp : in out Vector );
                     17:
                     18:   -- DESCRIPTION : computes one additional row of the v-table.
                     19:
                     20:   -- REQUIRED : v'range = vrp'range = 0..r, p'range = 0..r-1.
                     21:
                     22:   -- ON ENTRY :
                     23:   --   v             previous row of the v-table;
                     24:   --   p             current vector of p-factors;
                     25:   --   vr            equals log(|x_i(s_r)|).
                     26:
                     27:   -- ON RETURN :
                     28:   --   v or vrp      last row in the v-table: vrp(r) should have error O(s^r).
                     29:
                     30: -- II. The L-table : linear combinations of the logarithms log(s_k).
                     31:
                     32:   procedure L_pipe ( l : in out Vector; p : in Vector; lr : in double_float );
                     33:   procedure L_pipe ( l,p : in Vector; lr : in double_float;
                     34:                      lrp : in out Vector );
                     35:
                     36:   -- DESCRIPTION : computes one additional row of the L-table.
                     37:
                     38:   -- REQUIRED : l'range = lrp'range = 0..r, p'range = 0..r-1.
                     39:
                     40:   -- ON ENTRY :
                     41:   --   l             previous row of the v-table;
                     42:   --   p             current vector of p'factors;
                     43:   --   lr            equals log(s_r).
                     44:
                     45:   -- ON RETURN :
                     46:   --   l or lrp      last row in the L-table, vrp(r)/lpr(r) = w_i + O(s^r).
                     47:
                     48: -- The full computation of both v- and L-table :
                     49:
                     50:   procedure vL_full ( s,l,v : in Vector; srp,dsp,p,lrp,vrp : out Vector;
                     51:                       rt1,rt2 : in out Matrix );
                     52:
                     53:   -- DESCRIPTION : computes the last row of v- and L-table from s-values.
                     54:
                     55:   -- REQUIRED :
                     56:   --   s'range = l'range = v'range = 0..r = lrp'range = vrp'range,
                     57:   --   srp'range = dsp'range = 1..r-1, p'range = 0..r-1,
                     58:   --   rt1'range(*) = 1..r-1 = rt2'range(*).
                     59:
                     60:   -- ON ENTRY :
                     61:   --   s             consecutive s-values: s(0) > s(1) > .. > s(r) > 0;
                     62:   --   l             logs of the s-values: l(k) = log(s(k));
                     63:   --   v             points at the s-values: v(k) = log(|x_i(s(k))|).
                     64:
                     65:   -- ON RETURN :
                     66:   --   srp           consecutive powers of s(r): srp(l) = s(r)**l;
                     67:   --   dsp           differences of powers: dsp(l) = srp(l) - s(r-1)**l.
                     68:   --   p             last row used in the p-table;
                     69:   --   vrp           last row in the v-table;
                     70:   --   lrp           last row in the L-table, vrp(r)/lpr(r) = w_i + O(s^r);
                     71:   --   rt1           previous instance of the r-table;
                     72:   --   rt2           last instance of the r-table.
                     73:
                     74: -- III. The p-table : extrapolation factors needed for v-table and L-table.
                     75:
                     76:   procedure p_full ( s : in Vector; srp,dsp,p : out Vector;
                     77:                      rt1,rt2 : in out Matrix );
                     78:
                     79:   -- DESCRIPTION : computes the last row of p-table from s-values.
                     80:
                     81:   -- REQUIRED :
                     82:   --   s'range = 0..r, srp'range = dsp'range = 1..r-1, p'range = 0..r-1,
                     83:   --   rt1'range(*) = 1..r-1 = rt2'range(*).
                     84:
                     85:   -- NOTE : p_full = R_full followed by p_pipe.
                     86:
                     87:   procedure p_pipe ( rt1,rt2 : in Matrix; p : out Vector );
                     88:
                     89:   -- DESCRIPTION : update of one row of the p-table.
                     90:
                     91:   -- REQUIRED : rt1'range(*) = rt2'range(*) = 1..r-1, p'range = 0..r-1.
                     92:
                     93:   -- ON ENTRY :
                     94:   --   rt1           previous instance of the R-table;
                     95:   --   rt2           last instance of the R-table.
                     96:
                     97:   -- ON RETURN :
                     98:   --   p             p-factors, with p(0) = 1, p(i) = rt1(i,i)/rt2(i,i).
                     99:
                    100: -- IV. The R-table : propagated error factors.
                    101:
                    102:   procedure R_full ( s : in Vector; srp,dsp,p : out Vector;
                    103:                      rt1,rt2 : in out Matrix );
                    104:
                    105:   procedure RR_full ( s : in Vector; srp,dsp,p : out Vector;
                    106:                       rt1,rt2 : in out Matrix );
                    107:
                    108:   -- DESCRIPTION : computation of the r-table from a sequence of s-values.
                    109:   --   The RR_full computes the subdiagonal as well.
                    110:
                    111:   -- REQUIRED :
                    112:   --   s'range = 0..r, srp'range = dsp'range = 1..r-1, p'range = 0..r-1,
                    113:   --   rt1'range(*) = 1..r-1 = rt2'range(*).
                    114:
                    115:   -- ON ENTRY :
                    116:   --   s             sequence of consecutive s-values.
                    117:
                    118:   -- ON RETURN :
                    119:   --   srp,dsp       see the output of s_full;
                    120:   --   p             last row used in the p-table;
                    121:   --   rt1           previous instance of the r-table;
                    122:   --   rt2           last instance of the r-table.
                    123:
                    124:   procedure R_pipe ( rt1 : in Matrix; s,p : in Vector; rt2 : in out Matrix );
                    125:   procedure RR_pipe ( rt1 : in Matrix; s,p : in Vector; rt2 : in out Matrix );
                    126:
                    127:   -- DESCRIPTION : update of the r-table.  RR_pipe updates also subdiagonal.
                    128:
                    129:   -- REQUIRED :
                    130:   --   rt1'range(*) = rt2'range(*) = s'range = 1..r-1, p'range = 0..r-1.
                    131:
                    132:   -- ON ENTRY :
                    133:   --   rt1           last instance of the R-table;
                    134:   --   s             current row of differences of powers of s-values;
                    135:   --   p             last row of the current p-table.
                    136:
                    137:   -- ON RETURN :
                    138:   --   rt2           new instance of the R-table.
                    139:
                    140: -- V. The s-table : consecutive s-values with differences of their powers.
                    141:
                    142:   procedure s_full ( s : in Vector; srp,dsp : out Vector );
                    143:
                    144:   -- DESCRIPTION : computes the s-table in full.
                    145:
                    146:   -- REQUIRED : s'range = 0..r, srp'range = dsp'range = 1..r-1.
                    147:
                    148:   -- ON ENTRY :
                    149:   --   s             the s-values, with s(0) > s(1) > .. > s(r) > 0.
                    150:
                    151:   -- ON RETURN :
                    152:   --   srp           consecutive powers of s(r): srp(l) = s(r)**l;
                    153:   --   dsp           differences of powers: dsp(l) = srp(l) - s(r-1)**l.
                    154:
                    155:   procedure s_pipe ( srp : in out Vector; sr : in double_float;
                    156:                      dsp : out Vector );
                    157:   procedure s_pipe ( sr1 : in Vector; sr : in double_float;
                    158:                      srp,dsp : out Vector );
                    159:
                    160:   -- DESCRIPTION : computes an additional row of the s-table.
                    161:
                    162:   -- REQUIRED : sr1'range = srp'range = dsp'range = 1..r-1.
                    163:
                    164:   -- ON ENTRY :
                    165:   --   sr1 or srp    consecutive powers of s(r-1): srp(l) = s(r-1)**l.
                    166:   --   sr            new last value for s(r).
                    167:
                    168:   -- ON RETURN : same as s_full.
                    169:
                    170: end vLpRs_Tables;

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>