]> git.donarmstrong.com Git - lilypond.git/blob - flower/include/full-storage.hh
release: 0.1.12
[lilypond.git] / flower / include / full-storage.hh
1 /*
2   full-storage.hh -- declare Full_storage
3
4   source file of the Flower Library
5
6   (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
7 */
8
9
10 #ifndef FULL_STORAGE_HH
11 #define FULL_STORAGE_HH
12
13 #include "varray.hh"
14 #include "matrix-storage.hh"
15 #include "real.hh"
16
17 /// simplest matrix storage. refer to its baseclass for the doco.
18 class Full_storage : public Matrix_storage
19 {
20   /// height, width
21   int height_i_,width_i_;
22   /// maxima.
23   int max_height_i_, max_width_i_;
24     
25     /// the storage
26   Real** els_p_p_;
27
28   void
29   init() ;
30      
31   bool valid (int i, int j) const ; 
32
33   void resize_rows (int);
34   void resize_cols (int);
35
36 public:
37   virtual int rows() const;
38   virtual int cols() const ;
39     
40     
41   virtual void resize (int i, int j);
42   virtual void resize (int i);
43   virtual Real& elem (int i,int j);
44   virtual Real elem (int i, int j) const ;
45   int dim() const;
46   Full_storage (Matrix_storage*);
47   Full_storage();
48   Full_storage (int i, int j);
49   Full_storage (Full_storage const&);
50   Full_storage (int i);
51   void OK() const;
52   void operator=(Full_storage const &);
53     
54   virtual void insert_row (int k);
55   virtual void delete_row (int k);
56   virtual void delete_column (int k);
57     
58   ~Full_storage();
59   virtual bool mult_ok (int i, int j) const;
60   virtual void mult_next (int &i, int &j) const ;
61   virtual bool trans_ok (int i, int j) const;
62   virtual void trans_next (int &i, int &j) const;
63   DECLARE_VIRTUAL_COPY_CONS(Full_storage,Matrix_storage);
64   DECLARE_MY_RUNTIME_TYPEINFO;
65   virtual bool try_right_multiply (Matrix_storage * dest, Matrix_storage const *) const;
66 };
67
68 #endif // FULL_STORAGE_HH