home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The World of Computer Software
/
World_Of_Computer_Software-02-387-Vol-3of3.iso
/
m
/
mar93.zip
/
1103109A
< prev
next >
Wrap
Text File
|
1993-01-08
|
609b
|
33 lines
// fv1.h - a dynamic vector of float (with a possibly
// non-zero low-bound) using a subscripting object
#include <iostream.h>
#include "fa1.h"
class float_vector : public float_array
{
public:
float_vector(int lo = 0, int hi = 0);
float operator[](int i) const;
fa_index operator[](int i);
int low() const;
int high() const;
private:
int _low;
};
inline float_vector::float_vector(int lo, int hi)
: _low(lo), float_array(hi - lo + 1)
{ }
inline float_vector::low() const
{
return _low;
}
inline float_vector::high() const
{
return _low + length() - 1;
}