Revision 1573 trunk/src/linad99/fvar.hpp

fvar.hpp (revision 1573)
676 676
 */
677 677
class ptr_vector
678 678
{
679
   void **v;
680
   vector_shape *shape;
679
  void **v;
680
  vector_shape *shape;
681 681

  
682
 public:
682
public:
683
  ptr_vector();
684
  ptr_vector(const ptr_vector & t);
685
  ptr_vector(int ncl, int ncu);
686
  ~ptr_vector();
683 687

  
684
   int indexmin() const
685
   {
686
      return shape->index_min;
687
   }				// returns the minimum allowable index
688
   int indexmax() const
689
   {
690
      return shape->index_max;
691
   }				// returns the maximum allowable index
692
   int size() const
693
   {
694
      return shape->index_max - shape->index_min + 1;
695
   }				// returns the maximum allowable index
688
  int indexmin() const
689
  {
690
    return shape->index_min;
691
  }				// returns the minimum allowable index
692
  int indexmax() const
693
  {
694
    return shape->index_max;
695
  }				// returns the maximum allowable index
696
  int size() const
697
  {
698
    return shape->index_max - shape->index_min + 1;
699
  }				// returns the maximum allowable index
696 700

  
697
   void shift(int min);
698
   ptr_vector(int ncl, int ncu);
699
   ptr_vector();
700
   void allocate(int, int);
701
   //operator void ** ();
702
   ~ptr_vector();
703
   void *&operator[] (int i);
704
   void *&operator() (int i);
705
   //void*& elem(int i);
706
   void *&elem(int i)
707
   {
708
      return (*(v + i));
709
   }
710
   int operator!(void) const
711
   {
712
      return (shape == NULL);
713
   }
714
   int operator() (void) const
715
   {
716
      return (shape != NULL);
717
   }
701
  void shift(int min);
702
  void allocate(int, int);
703
  //operator void ** ();
704
  void *&operator[] (int i);
705
  void *&operator() (int i);
706
  //void*& elem(int i);
707
  void *&elem(int i)
708
  {
709
    return (*(v + i));
710
  }
711
  int operator!(void) const
712
  {
713
    return (shape == NULL);
714
  }
715
  int operator() (void) const
716
  {
717
    return (shape != NULL);
718
  }
718 719

  
719
   ptr_vector(const ptr_vector & t);
720
   ptr_vector & operator=(const ptr_vector & t);
721
   void initialize();
722
};				// end of class ptr_vector
720
  ptr_vector& operator=(const ptr_vector& t);
721
  void initialize();
722
};
723 723

  
724 724
/**
725 725
 * Description not yet available.

Also available in: Unified diff