Revision 1939

trunk/src/linad99/fvar.hpp (revision 1939)
764 764

  
765 765
   void read_from(const uistream & s);
766 766

  
767
#ifdef OPT_LIB
768
   inline int &operator[] (int i)
769
   {
770
      return (*(v + i));
771
   }
772
   inline int &operator() (int i)
773
   {
774
      return (*(v + i));
775
   }
776
#else
777
   int &operator[] (int i);
778
   int &operator() (int i);
779
#endif
767
   int& operator[](int i);
768
   int& operator()(int i);
769
   const int& operator[](int i) const;
770
   const int& operator()(int i) const;
780 771

  
781
#ifdef OPT_LIB
782
   inline const int &operator[] (int i) const
783
   {
784
      return (*(v + i));
785
   }
786
   inline const int &operator() (int i) const
787
   {
788
      return (*(v + i));
789
   }
790
#else
791
   const int &operator[] (int i) const;
792
   const int &operator() (int i) const;
793
#endif
794

  
795 772
   ivector sub(int lb, int ub)
796 773
   {
797 774
      return preivector(this, lb, ub);
......
819 796
   ivector & operator +=(int t);
820 797
};
821 798

  
799
#ifdef OPT_LIB
800
inline int& ivector::operator[](int i)
801
{
802
  return *(v + i);
803
}
804
inline int& ivector::operator()(int i)
805
{
806
  return *(v + i);
807
}
808
inline const int& ivector::operator[](int i) const
809
{
810
  return *(v + i);
811
}
812
inline const int& ivector::operator()(int i) const
813
{
814
  return *(v + i);
815
}
816
#endif
817

  
822 818
ivector operator+(const ivector & v, const ivector & w);
823 819
ivector operator-(const ivector & v, const ivector & w);
824 820
ivector operator+(const ivector & v, int w);
......
917 913

  
918 914
   void read_from(const uistream & s);
919 915

  
920
#ifdef OPT_LIB
921
   inline AD_LONG_INT & operator[] (int i)
922
   {
923
      return v[i];
924
   }
925
   inline AD_LONG_INT & operator() (int i)
926
   {
927
      return v[i];
928
   }
929
#else
930
   AD_LONG_INT & operator[](int i);
931
   AD_LONG_INT & operator()(int i);
932
#endif
916
   AD_LONG_INT& operator[](int i);
917
   AD_LONG_INT& operator()(int i);
918
   const AD_LONG_INT& operator[](int i) const;
919
   const AD_LONG_INT& operator()(int i) const;
933 920

  
934
#ifdef OPT_LIB
935
   inline const AD_LONG_INT & operator[] (int i) const
936
   {
937
      return v[i];
938
   }
939
   inline const AD_LONG_INT & operator() (int i) const
940
   {
941
      return v[i];
942
   }
943
#else
... This diff was truncated because it exceeds the maximum size that can be displayed.

Also available in: Unified diff