Anaphe Home Page Reference Documentation

Main Page     Namespaces     Classes     Source Code    

Even_Partition Class Reference

#include <Even_Partition.h>

Inheritance diagram for Even_Partition:

I_Partition List of all members.

Detailed Description

Previously known as FixedLengthPartition.

Definition at line 16 of file Even_Partition.h.

Public Types

typedef T_Point Mapped_Point
typedef Even_Partition Like_Current
typedef Even_Partition T__Partition

Public Methods

 H_IID_IMPLEMENT (Even_Partition)
 Very simple RTTI feature.

virtual ~Even_Partition ()
 Destructor.

 Even_Partition ()
 Empty constructor.

 Even_Partition (Size a_bin_count, T_Point a_leftmost_point, T_Point a_rightmost_point, End_Point_Convention a_convention=RIGHT_OPEN)
 Construct an elementary even partition whose range is ( a_leftmost_point, a_rightmost_point ) with the end-point convention a_convention.

 Even_Partition (I_Partition &another)
 Construct an Even_Partition from another one.

virtual double i_bin_width (Index i) const
 Number of bin indexes that are not in range.

virtual Size bin_count () const
 Number of in-range bin indexes.

virtual double i_lower_point () const
 Leftmost point of the partition.

virtual double i_upper_point () const
 Rightmost point of the partition.

virtual double i_lower_point (Index i) const
 Leftmost point of bin indexed by i.

virtual double i_upper_point (Index i) const
 Rightmost point of bin indexed by i.

virtual void map_point (double a_point, Index &an_index, Extra_Index &an_extra_index)
 Bin mapped to point a_point.

void map_index (T_Point a_point, Index &an_index, Extra_Index &an_extra_index)
 Map a_point to a bin index.

void map_index1 (T_Point a_point, Index &an_index, Extra_Index &an_extra_index)
 Map a_point to a bin index.

T_Point bin_width (Index) const
 Width of the bin indexed by i.

T_Point lower_point () const
 Same as left-most point of the partition.

T_Point upper_point () const
 Same as right-most point of the partition.

T_Point lower_point (Index i) const
 Left-most point of the in-range bin whose index is i .

T_Point upper_point (Index i) const
 Right-most point of the in-range bin whose index is i .

virtual End_Point_Convention end_point_convention () const
 End point convention used by all of the bins.


Protected Attributes

Size count_
T_Point lower_point_
T_Point upper_point_
T_Point bin_width_
End_Point_Convention end_point_convention_


Member Typedef Documentation

typedef Even_Partition Even_Partition::Like_Current
 

Definition at line 23 of file Even_Partition.h.

typedef T_Point Even_Partition::Mapped_Point
 

Definition at line 22 of file Even_Partition.h.

typedef Even_Partition Even_Partition::T__Partition
 

Definition at line 24 of file Even_Partition.h.


Constructor & Destructor Documentation

virtual Even_Partition::~Even_Partition   [inline, virtual]
 

Definition at line 27 of file Even_Partition.h.

Even_Partition::Even_Partition   [inline]
 

Definition at line 29 of file Even_Partition.h.

Even_Partition::Even_Partition Size    a_bin_count,
T_Point    a_leftmost_point,
T_Point    a_rightmost_point,
End_Point_Convention    a_convention = RIGHT_OPEN
 

Even_Partition::Even_Partition I_Partition   another
 

If another has the actual type *Uneven_Partition and cant be successfully matched to an Even_Partition then an error message is issued.


Member Function Documentation

virtual Size Even_Partition::bin_count   const [inline, virtual]
 

Implements I_Partition.

Definition at line 55 of file Even_Partition.h.

References count_, and Size.

T_Point Even_Partition::bin_width Index    const [inline]
 

Definition at line 110 of file Even_Partition.h.

References bin_width_, Index, and T_Point.

Referenced by i_bin_width(), lower_point(), and upper_point().

virtual End_Point_Convention Even_Partition::end_point_convention   const [inline, virtual]
 

Implements I_Partition.

Definition at line 146 of file Even_Partition.h.

References End_Point_Convention, and end_point_convention_.

Even_Partition::H_IID_IMPLEMENT Even_Partition   
 

virtual double Even_Partition::i_bin_width Index    i const [inline, virtual]
 

Implements I_Partition.

Definition at line 52 of file Even_Partition.h.

References bin_width(), and Index.

virtual double Even_Partition::i_lower_point Index    i const [inline, virtual]
 

Implements I_Partition.

Definition at line 64 of file Even_Partition.h.

References Index, and lower_point().

virtual double Even_Partition::i_lower_point   const [inline, virtual]
 

Implements I_Partition.

Definition at line 58 of file Even_Partition.h.

References lower_point().

virtual double Even_Partition::i_upper_point Index    i const [inline, virtual]
 

Implements I_Partition.

Definition at line 67 of file Even_Partition.h.

References Index, and upper_point().

virtual double Even_Partition::i_upper_point   const [inline, virtual]
 

Implements I_Partition.

Definition at line 61 of file Even_Partition.h.

References upper_point().

T_Point Even_Partition::lower_point Index    i const [inline]
 

Definition at line 121 of file Even_Partition.h.

References bin_width(), count_, HTL_ERR, Index, lower_point(), and T_Point.

T_Point Even_Partition::lower_point   const [inline]
 

The returned type is more specialized.

Definition at line 114 of file Even_Partition.h.

References lower_point_, and T_Point.

Referenced by i_lower_point(), lower_point(), and upper_point().

void Even_Partition::map_index T_Point    a_point,
Index   an_index,
Extra_Index   an_extra_index
[inline]
 

The mapped index is passed to an_index when the mapped bin is in range, i.e when the value passed to an_extra_index equals H_IN_RANGE. If an_extra_index equals H_UNDERFLOW or H_OVERFLOW, one cannot not rely on the value passed to an_index: it is undefined. This is a fast inline function which handle the most common case. More complex cases are managed by the non-inlined method map_index1

Definition at line 86 of file Even_Partition.h.

References bin_width_, end_point_convention_, Extra_Index, H_IN_RANGE, Index, lower_point_, map_index1(), RIGHT_OPEN, T_Point, and upper_point_.

Referenced by map_point().

void Even_Partition::map_index1 T_Point    a_point,
Index   an_index,
Extra_Index   an_extra_index
 

The mapped index is passed to an_index when the mapped bin is in range, i.e when the value passed to an_extra_index equals H_IN_RANGE. If an_extra_index equals H_UNDERFLOW or H_OVERFLOW, one cannot not rely on the value passed toan_index: it is undefined.

Referenced by map_index().

virtual void Even_Partition::map_point double    a_point,
Index   an_index,
Extra_Index   an_extra_index
[inline, virtual]
 

Implements I_Partition.

Definition at line 70 of file Even_Partition.h.

References Extra_Index, Index, and map_index().

T_Point Even_Partition::upper_point Index    i const [inline]
 

Definition at line 133 of file Even_Partition.h.

References bin_width(), count_, HTL_ERR, Index, lower_point(), and T_Point.

T_Point Even_Partition::upper_point   const [inline]
 

The returned type is more specialized.

Definition at line 118 of file Even_Partition.h.

References T_Point, and upper_point_.

Referenced by i_upper_point().


Member Data Documentation

T_Point Even_Partition::bin_width_ [protected]
 

Definition at line 152 of file Even_Partition.h.

Referenced by bin_width(), and map_index().

Size Even_Partition::count_ [protected]
 

Definition at line 149 of file Even_Partition.h.

Referenced by bin_count(), lower_point(), and upper_point().

End_Point_Convention Even_Partition::end_point_convention_ [protected]
 

Definition at line 153 of file Even_Partition.h.

Referenced by end_point_convention(), and map_index().

T_Point Even_Partition::lower_point_ [protected]
 

Definition at line 150 of file Even_Partition.h.

Referenced by lower_point(), and map_index().

T_Point Even_Partition::upper_point_ [protected]
 

Definition at line 151 of file Even_Partition.h.

Referenced by map_index(), and upper_point().


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

Anaphe documentation generated by Doxygen (www.doxygen.org)