Public Member Functions | Static Public Member Functions | Friends

dyadic_interval Class Reference

A dyadic interval. More...

#include <dyadic_interval.h>

Inheritance diagram for dyadic_interval:
dyadic

List of all members.

Public Member Functions

template<typename S >
 dyadic_interval (S s)
 The constructors from dyadic.
template<typename S , typename T >
 dyadic_interval (S s, T t)
 dyadic_interval (void)
 Default constructor.
 ~dyadic_interval (void)
 Default destructor.
const dyadicinf (void) const
dyadic sup (void) const
 The dyadic corresponding to the right hand end of the interval.
dyadic_intervalflip_interval (void)
 Flips to the complementary interval within the enlarged interval and returns a reference.
int aligned (void) const
 Returns true if it is the left half-interval of its parent and false if it is the right half-interval.
dyadic_intervalshrink_interval_left (const unsigned int Arg=1)
dyadic_intervalshrink_interval_right (void)
 Steps down 1 level in the dyadic framework without changing the numerical sup of the interval.
dyadic_intervalexpand_interval (const unsigned int Arg=1)
bool operator< (const dyadic_interval &Arg) const
 Comparison operator for dyadic intervals.
bool operator!= (const dyadic_interval &Arg) const
 Not-equal operator for dyadic intervals.
bool operator== (const dyadic_interval &Arg) const
 Are-equal operator for dyadic intervals.
bool contains (const dyadic_interval &Arg) const
 Contains operator for dyadic intervals.

Static Public Member Functions

static std::deque
< dyadic_interval
to_dyadic_intervals (double inf, double sup, int tolerance)
static dyadic_interval dyadic_bracket (const double Arg, const int AbsolutePrecision=0)
 Finds the unique dyadic interval with denominator precision containing Arg in [k/2^n,k+1/2^n).

Friends

std::ostream & operator<< (std::ostream &os, const dyadic_interval &rhs)
 Outputs a dyadic interval in the form [double, double) to an std::ostream.

Detailed Description

A dyadic interval.


Member Function Documentation

dyadic_interval& dyadic_interval::expand_interval ( const unsigned int  Arg = 1  )  [inline]

Steps up a number n (default 1) of levels in the dyadic framework giving the unique dyadic interval at that level to contain the current interval.

const dyadic& dyadic_interval::inf ( void   )  const [inline]

The dyadic corresponding to the left hand end of the interval which is the one that is stored in the interval.

dyadic_interval& dyadic_interval::shrink_interval_left ( const unsigned int  Arg = 1  )  [inline]

Steps down a number n (default 1) of levels in the dyadic framework without changing the numerical inf of the interval.

static std::deque<dyadic_interval> dyadic_interval::to_dyadic_intervals ( double  inf,
double  sup,
int  tolerance 
) [inline, static]

Creates a deque queue of disjoint dyadic intervals [k,k+1)/2^n of minimal number such that they exactly span the interval obtained by rounding the endpoints up. There is no obvious inclusion with [inf,sup) and this choice is made to ensure that if the real intervals form a partition so do the dyadic intervals.


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