Rogue Wave banner
Previous fileTop of DocumentContentsIndexNext file

RWInterval<T>



Data Type and Member Function Indexes
(exclusive of constructors and destructors)

Synopsis

#include <rw/analytics/interval.h>

RWInterval<double> ci( -1.031, 2.045, RWInterval<double>::closed);

Description

RWInterval<T> is a general-purpose class for describing an interval of values. The values in the interval are of type T. An interval may be considered a set of contiguous values where the interval endpoints are either included or excluded from the set. If an interval's endpoints are excluded, it is said to be open; if the endpoints are included, the interval is said to be closed.

In Analytics.h++, the class RWInterval<T> is used to describe confidence intervals for regression predictions and parameter estimates.

Example

The following example prints the linear regression prediction interval for the first pattern in the predictor matrix at a confidence level of 99 percent.

Public Enumeration

enum Type {open, closed, openClosed, closedOpen}

Public Constructors

RWInterval(); 
RWInterval(T lb, T up,  RWInterval<T>::Type t); 
RWInterval(const RWInterval<T>& i); 

Public Member Functions

RWBoolean 
contains(T x) const; 
T 
lowerBound() const; 
void 
setBound(T x);
void 
setBounds(T x, T y) const; 
void  
setType(RWInterval<T>::Type t);
RWInterval<T>::Type  
type() const; 
T 
upperBound() const; 

Public Member Operator

RWInterval<T>&  
operator=(const RWInterval<T>& i);

Global Operator

RWBoolean  operator==(const RWInterval<T>& lhs, 
                      const RWInterval<T>& rhs);


Previous fileTop of DocumentContentsIndexNext file

©Copyright 1999, Rogue Wave Software, Inc.
Send mail to report errors or comment on the documentation.