2 full-storage.icc -- implement Full_storage inline functions
4 source file of the Flower Library
6 (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
10 #ifndef FULL_STORAGE_ICC
11 #define FULL_STORAGE_ICC
19 height_i_=width_i_=max_height_i_=max_width_i_=0;
23 Full_storage::valid (int i, int j) const
25 return (i>=0 && i < height_i_)
26 && (j < width_i_ && j >=0);
31 Full_storage::Full_storage (Full_storage const&s)
38 Full_storage::elem (int i,int j)
41 return els_p_p_[i][j];
45 Full_storage::elem (int i, int j) const {
47 return els_p_p_[i][j];
51 Full_storage::Full_storage() {
57 Full_storage::rows() const
63 Full_storage::cols() const
69 Full_storage::dim() const
71 assert (rows()==cols ());
76 Full_storage::resize (int i)
82 Full_storage::Full_storage (int i,int j)
89 Full_storage::Full_storage (int i)
98 Full_storage::mult_ok (int i, int ) const
100 return i < height_i_;
105 Full_storage::trans_ok (int , int j) const
113 Full_storage::trans_next (int &i, int &j) const
115 assert (trans_ok (i,j));
119 i= (0 >? j - band_i_);
126 Full_storage::mult_next (int &i, int &j) const
128 assert (mult_ok (i,j));
132 j= 0 >? (i - band_i_);
136 #endif // FULL_STORAGE_ICC