implementation< ball_rounding, W, ball_rounded > Struct Template Reference

#include <ball_rounded.hpp>

List of all members.

Static Public Member Functions


Detailed Description

template<typename W>
struct mmx::implementation< ball_rounding, W, ball_rounded >

Definition at line 44 of file ball_rounded.hpp.


Member Function Documentation

static R abs_down ( const ball< C, R, V > &  z  )  [inline, static]

Definition at line 95 of file ball_rounded.hpp.

References mmx::center(), Down, R, mmx::radius(), Round_down, and mmx::sub().

00095                          {
00096   typedef Round_down(R) Down;
00097   R a= Down::template abs_as<R> (center (z));
00098   if (a <= radius (z)) return R(0);
00099   else return Down::sub (a, radius (z));
00100 }

static R abs_up ( const ball< C, R, V > &  z  )  [inline, static]

Definition at line 103 of file ball_rounded.hpp.

References mmx::add(), mmx::center(), R, mmx::radius(), Round_up, and Up.

00103                        {
00104   typedef Round_up(R) Up;
00105   return Up::add (Up::template abs_as<R> (center(z)), radius(z));
00106 }

static void add_additive_error ( ball< C, R, V > &  d  )  [inline, static]

Definition at line 54 of file ball_rounded.hpp.

References mmx::add(), mmx::additive_error(), mmx::center(), R, mmx::radius(), Round_up, and Up.

00054                              {
00055   typedef Round_up(R) Up;
00056   R err= Up::template as<R> (additive_error (center (d)));
00057   radius (d)= Up::add (radius (d), err);
00058 }

static void add_elementary_error ( ball< C, R, V > &  d  )  [inline, static]

Definition at line 68 of file ball_rounded.hpp.

References mmx::add(), mmx::center(), mmx::elementary_error(), R, mmx::radius(), Round_up, and Up.

00068                                {
00069   typedef Round_up(R) Up;
00070   R err= Up::template as<R> (elementary_error (center (d)));
00071   radius (d)= Up::add (radius (d), err);
00072 }

static void add_multiplicative_error ( ball< C, R, V > &  d  )  [inline, static]

Definition at line 61 of file ball_rounded.hpp.

References mmx::add(), mmx::center(), mmx::multiplicative_error(), R, mmx::radius(), Round_up, and Up.

00061                                    {
00062   typedef Round_up(R) Up;
00063   R err= Up::template as<R> (multiplicative_error (center (d)));
00064   radius (d)= Up::add (radius (d), err);
00065 }

static void add_rounding_error ( ball< C, R, V > &  d  )  [inline, static]

Definition at line 47 of file ball_rounded.hpp.

References mmx::add(), mmx::center(), R, mmx::radius(), Round_up, mmx::rounding_error(), and Up.

00047                              {
00048   typedef Round_up(R) Up;
00049   R err= Up::template as<R> (rounding_error (center (d)));
00050   radius (d)= Up::add (radius (d), err);
00051 }

static R bnd_down ( const ball< C, R, V > &  z  )  [inline, static]

Definition at line 109 of file ball_rounded.hpp.

References mmx::center(), Down, R, mmx::radius(), Round_down, and mmx::sub().

00109                          {
00110   typedef Round_down(R) Down;
00111   return Down::sub (Down::template as<R> (center(z)), radius(z));
00112 }

static R bnd_up ( const ball< C, R, V > &  z  )  [inline, static]

Definition at line 115 of file ball_rounded.hpp.

References mmx::add(), mmx::center(), R, mmx::radius(), Round_up, and Up.

00115                        {
00116   typedef Round_up(R) Up;
00117   return Up::add (Up::template as<R> (center(z)), radius(z));
00118 }

static C lower ( const ball< C, R, V > &  z  )  [inline, static]

Definition at line 75 of file ball_rounded.hpp.

References mmx::C, mmx::center(), Down, mmx::radius(), and Round_down.

00075                       {
00076   typedef Round_down(C) Down;
00077   return Down::template sub_as<C> (center (z), radius (z));
00078 }

static void make_interval ( ball< C, R, V > &  d,
const C l,
const C r 
) [inline, static]

Definition at line 87 of file ball_rounded.hpp.

References mmx::C, mmx::center(), mmx::decexp2(), mmx::max(), mmx::radius(), Round_up, and Up.

00087                                                 {
00088   typedef Round_up(C) Up;
00089   C c= decexp2 (l + r, 1);
00090   center (d)= c;
00091   radius (d)= Up::template as<R> (max (Up::sub (r, c), Up::sub (c, l)));
00092 }

static C upper ( const ball< C, R, V > &  z  )  [inline, static]

Definition at line 81 of file ball_rounded.hpp.

References mmx::C, mmx::center(), mmx::radius(), Round_up, and Up.

00081                       {
00082   typedef Round_up(C) Up;
00083   return Up::template add_as<C> (center (z), radius (z));
00084 }


The documentation for this struct was generated from the following file:

Generated on 6 Dec 2012 for numerix by  doxygen 1.6.1