[Developers] init_bounded_number_matrix

dave fournier otter at otter-rsch.com
Wed Jun 2 23:34:56 PDT 2010


a sketch of what need to be done.

Well you could start with the param_init_bunded_vector class
and modify it like this.
The main thing to notice is that the param_init_bunded_vector class
never had reference counting implemented. (See say the dvector class and
how ncopies is used. to be safe one should protect the copy constructor
so that shallow copies  are not made.  Then onme needs to add the class
to the tpl2cpp by modifying the lex input.




>  class param_init_bounded_number_matrix
>  {
>    param_init_bounded_number_vector * v;
>    int index_min;
>    int index_max;
>    double_index_type * it;
> 
>  public:
> 
>   void set_scalefactor(double s);
>   void set_scalefactor(const dvector& s);
>   dvector get_scalefactor(void);
>   param_init_bounded_number_matrix();
> 
> #if defined(OPT_LIB)
>    param_init_bounded_number_vector& operator [] (int i) { return v[i];}
>    param_init_bounded_number_vector& operator () (int i) { return v[i];}
> #else
>    param_init_bounded_number_vector& operator [] (int i);
>    param_init_bounded_number_vector& operator () (int i);
> #endif
>                                                                                                        1,1           Top
> 
> 
>    void allocate(int min1,int max1,const double_index_type & bmin,
>      const double_index_type & bmax,const index_type& phase_start,
>      const char * s);
> 
>    void allocate(int min1,int max1,const double_index_type & bmin,
>      const double_index_type & bmax,const char * s);
> 
>    int allocated(void) { return (v!=NULL); }
>    int indexmin(void) {return (index_min);}
>    int indexmax(void) {return (index_max);}
>    ~param_init_bounded_number_matrix();
>    void set_initial_value(const double_index_type& it);
>    void deallocate(void);
>  };
> 
>                      




More information about the Developers mailing list