> next up previous contents index
: Continuous types : Discrete types : Sparse Type   目次   索引

Discrete real types

A Discrete real type $X=[min,max):k$ consists on a half-open real interval divided in $k$ equal size half-open sub-intervals. Computable objects containing discrete real type variables executes some of its functionalities in function of $n$ (see section[*] and [*]). Computable objects containing only discrete type variables can use tabulation methods such as tabulate and compile (see section [*] for more details).

Here are some examples of discrete real types definitions:

  plRealType distance(0.0, 100.0, 50);
  plRealType hight(0.2, 2.40, 30);

The previous lines defines the types distance $=[0.0, 100.0):50$ and hight $=[0.2, 2.40):30$, they are divided in 50 and 30 subintervals respectively. Example, given

plRealType A(min, max, n);

we have that :

\begin{displaymath}
A=[min,max)=\bigcup_{i=1}^n A_i
\end{displaymath}

where $A_i = [min_i,max_i)$ with $min_i=min+\delta*(i-1)$, $max_i=min_i+\delta*i$ and $\delta = (max-min)/n$.



Juan-Manuel Ahuactzin 平成17年3月31日