Revision 1131 trunk/src/linad99/fvar.hpp

fvar.hpp (revision 1131)
216 216
#   endif
217 217
#endif
218 218

  
219
#define USE_CONST
219
//#define USE_CONST
220 220

  
221 221
#define _CONST const
222 222

  
......
789 789
   {
790 790
      return (v[i]);
791 791
   }
792
#ifdef USE_CONST
793 792
   const int &elem(int i) const
794 793
   {
795 794
      return v[i];
796 795
   }
797
#endif
798 796
   int indexmin() const
799 797
   {
800 798
      return index_min;
......
870 868
   int &operator() (int i);
871 869
#endif
872 870

  
873
#ifdef USE_CONST
874 871
#ifdef OPT_LIB
875 872
   inline const int &operator[] (int i) const
876 873
   {
......
884 881
   const int &operator[] (int i) const;
885 882
   const int &operator() (int i) const;
886 883
#endif
887
#endif
888 884

  
889 885
   ivector sub(int lb, int ub)
890 886
   {
......
955 951
   {
956 952
      return (v[i]);
957 953
   }
958
#ifdef USE_CONST
959 954
   inline const AD_LONG_INT & elem(int i) const
960 955
   {
961 956
      return v[i];
962 957
   }
963
#endif
964 958
   int indexmin() const
965 959
   {
966 960
      return shape->index_min;
......
1025 1019
   AD_LONG_INT & operator()(int i);
1026 1020
#endif
1027 1021

  
1028
#ifdef USE_CONST
1029 1022
#ifdef OPT_LIB
1030 1023
   inline const AD_LONG_INT & operator[] (int i) const
1031 1024
   {
......
1039 1032
   const AD_LONG_INT & operator[] (int i) const;
1040 1033
   const AD_LONG_INT & operator() (int i) const;
1041 1034
#endif
1042
#endif
1043 1035

  
1044 1036
   lvector operator() (const lvector & u);
1045 1037

  
......
1840 1832
   {
1841 1833
      return v;
1842 1834
   }
1843
#ifdef USE_CONST
1844 1835
   inline double_and_int *get_v() const
1845 1836
   {
1846 1837
      return v;
1847 1838
   }
1848
#endif
1849 1839

  
1850 1840
   prevariable & operator=(const prevariable &);
1851 1841
   prevariable & operator=(double);
......
2455 2445
   {
2456 2446
      return (v + indexmin());
2457 2447
   }
2458
#ifdef USE_CONST
2459 2448
   const double *initpointer(void) const
2460 2449
   {
2461 2450
      return (v + indexmin());
......
2468 2457
   {
2469 2458
      return v[i];
2470 2459
   }
2471
#endif
2472 2460

  
2473 2461
   void fill(const char *s);
2474 2462
   void fill_randu_ni(long int &n);
... This diff was truncated because it exceeds the maximum size that can be displayed.

Also available in: Unified diff