NeoPZ
tinyfadfive.h
Go to the documentation of this file.
1 #ifndef _tinyfadfive_h_
2 #define _tinyfadfive_h_
3 
4 //*********************************************************
5 // This file is generated by generate.cc.
6 // Use this file for any modification
7 //*********************************************************
8 
9 template <class T> class TinyFad<5,T> {
10 public:
11  typedef T value_type;
12  typedef T grad_type;
13 protected:
14 
15  int n;
16  T val_;
17 
18  T dx0_;
19  T dx1_;
20  T dx2_;
21  T dx3_;
22  T dx4_;
23 
24 
25 public:
26  void diff(const size_t ith, const size_t sz){
27  n = ith+1;
28  dx0_ = T(0.);
29  dx1_ = T(0.);
30  dx2_ = T(0.);
31  dx3_ = T(0.);
32  dx4_ = T(0.);
33 
34  switch(ith){
35  case 0 : dx0_ = T(1.);break;
36  case 1 : dx1_ = T(1.);break;
37  case 2 : dx2_ = T(1.);break;
38  case 3 : dx3_ = T(1.);break;
39  case 4 : dx4_ = T(1.);break;
40  default : cout << "ith = " << ith << " out of definition set" << endl;exit(1);
41  }
42  }
43 
44  TinyFad(const T& ind, const int ini) : n(ini+1), val_(ind) {
45  dx0_ = T(0.);
46  dx1_ = T(0.);
47  dx2_ = T(0.);
48  dx3_ = T(0.);
49  dx4_ = T(0.);
50 
51  switch(ini){
52  case 0 : dx0_ = T(1.);break;
53  case 1 : dx1_ = T(1.);break;
54  case 2 : dx2_ = T(1.);break;
55  case 3 : dx3_ = T(1.);break;
56  case 4 : dx4_ = T(1.);break;
57  default : cout << "ini = " << ini << " out of definition set" << endl;exit(1);
58  }
59  }
60  TinyFad() : n(0), val_(0.) {
61  dx0_ = T(0.);
62  dx1_ = T(0.);
63  dx2_ = T(0.);
64  dx3_ = T(0.);
65  dx4_ = T(0.);
66  }
67  TinyFad(const No_Initialization &): n(0) {}
68  TinyFad(const T& in) : n(0), val_(in) {
69  dx0_ = T(0.);
70  dx1_ = T(0.);
71  dx2_ = T(0.);
72  dx3_ = T(0.);
73  dx4_ = T(0.);
74  }
75  TinyFad(const TinyFad<5,T> & in) : n(0), val_(in.val_) {
76  dx0_ = in.dx0_;
77  dx1_ = in.dx1_;
78  dx2_ = in.dx2_;
79  dx3_ = in.dx3_;
80  dx4_ = in.dx4_;
81  }
82 
83  ~TinyFad() {}
84 
85  int N() const {return n-1;}
86 
87  const T& val() const { return val_;}
88  T& val() { return val_;}
89 
90  const T& d0() const { return dx0_;}
91  T& d0() { return dx0_;}
92 
93  const T& d1() const { return dx1_;}
94  T& d1() { return dx1_;}
95 
96  const T& d2() const { return dx2_;}
97  T& d2() { return dx2_;}
98 
99  const T& d3() const { return dx3_;}
100  T& d3() { return dx3_;}
101 
102  const T& d4() const { return dx4_;}
103  T& d4() { return dx4_;}
104 
105  T& dx(int i){
106  switch(i){
107  case 0 : return dx0_;
108  case 1 : return dx1_;
109  case 2 : return dx2_;
110  case 3 : return dx3_;
111  case 4 : return dx4_;
112  default : cout << "i out of bounds" << endl;exit(1);
113  }
114  }
115  const T& dx(int i) const {
116  switch(i){
117  case 0 : return dx0_;
118  case 1 : return dx1_;
119  case 2 : return dx2_;
120  case 3 : return dx3_;
121  case 4 : return dx4_;
122  default : cout << "i out of bounds" << endl;exit(1);
123  }
124  }
125  T& d(int i){
126  switch(i){
127  case 0 : return dx0_;
128  case 1 : return dx1_;
129  case 2 : return dx2_;
130  case 3 : return dx3_;
131  case 4 : return dx4_;
132  default : cout << "i out of bounds" << endl;exit(1);
133  }
134  }
135  const T& d(int i) const {
136  switch(i){
137  case 0 : return dx0_;
138  case 1 : return dx1_;
139  case 2 : return dx2_;
140  case 3 : return dx3_;
141  case 4 : return dx4_;
142  default : cout << "i out of bounds" << endl;exit(1);
143  }
144  }
145 
147  val_ = in.val_;
148 
149  dx0_ = in.dx0_;
150  dx1_ = in.dx1_;
151  dx2_ = in.dx2_;
152  dx3_ = in.dx3_;
153  dx4_ = in.dx4_;
154 
155  return *this;
156  }
157 
158  TinyFad<5,T> & operator = (const T & in){
159  val_ = in;
160 
161  dx0_ = T(0.);
162  dx1_ = T(0.);
163  dx2_ = T(0.);
164  dx3_ = T(0.);
165  dx4_ = T(0.);
166 
167  return *this;
168  }
169 
171  dx0_ += in.dx0_;
172  dx1_ += in.dx1_;
173  dx2_ += in.dx2_;
174  dx3_ += in.dx3_;
175  dx4_ += in.dx4_;
176  val_ += in.val_;
177 
178 
179  return *this;
180  }
182  dx0_ -= in.dx0_;
183  dx1_ -= in.dx1_;
184  dx2_ -= in.dx2_;
185  dx3_ -= in.dx3_;
186  dx4_ -= in.dx4_;
187  val_ -= in.val_;
188 
189  return *this;
190  }
192  dx0_ = dx0_ * in.val_ + val_ * in.dx0_;
193  dx1_ = dx1_ * in.val_ + val_ * in.dx1_;
194  dx2_ = dx2_ * in.val_ + val_ * in.dx2_;
195  dx3_ = dx3_ * in.val_ + val_ * in.dx3_;
196  dx4_ = dx4_ * in.val_ + val_ * in.dx4_;
197  val_ *= in.val_;
198 
199  return *this;
200  }
202  if (in.val_ == 0.) error("TinyFad & TinyFad::operator /= (const TinyFad & in), dividing by 0");
203  dx0_ = ( dx0_ * in.val_ - val_ * in.dx0_ ) / in.val_ / in.val_ ;
204  dx1_ = ( dx1_ * in.val_ - val_ * in.dx1_ ) / in.val_ / in.val_ ;
205  dx2_ = ( dx2_ * in.val_ - val_ * in.dx2_ ) / in.val_ / in.val_ ;
206  dx3_ = ( dx3_ * in.val_ - val_ * in.dx3_ ) / in.val_ / in.val_ ;
207  dx4_ = ( dx4_ * in.val_ - val_ * in.dx4_ ) / in.val_ / in.val_ ;
208  val_ /= in.val_;
209 
210  return *this;
211  }
212 
213  TinyFad<5,T> & operator += (const T & in){ val_ += in;
214 
215  return *this;
216  }
217  TinyFad<5,T> & operator -= (const T & in){ val_ -= in;
218 
219  return *this;
220  }
221  TinyFad<5,T> & operator *= (const T & in){
222  val_ *= in;
223 
224  dx0_ *= in;
225  dx1_ *= in;
226  dx2_ *= in;
227  dx3_ *= in;
228  dx4_ *= in;
229 
230  return *this;
231  }
232  TinyFad<5,T> & operator /= (const T & in){
233  if ( in == T(0.) ) error("TinyFad & TinyFad::operator /= (const T & in), dividing by 0");
234  val_ /= in;
235 
236  dx0_ /= in;
237  dx1_ /= in;
238  dx2_ /= in;
239  dx3_ /= in;
240  dx4_ /= in;
241 
242  return *this;
243  }
244 
246  TinyFad<5,T> tmp(*this);
247  tmp.val_++;
248  return tmp;
249  };
251  TinyFad<5,T> tmp(*this);
252  tmp.val_--;
253  return tmp;
254  };
256  return *this;
257  }
259  return *this;
260  }
261 };
262 
263 
264 template <class T> inline TinyFad<5,T> operator + (const TinyFad<5,T>& in)
265 {
266  return TinyFad<5,T>(in);
267 }
268 
269 template <class T> inline TinyFad<5,T> operator - (const TinyFad<5,T>& in)
270 {
272  tmp -= in;
273  return tmp;
274 }
275 
276 template <class L, class R> inline
278 operator +(const TinyFad<5,L>& un, const TinyFad<5,R>& deux) {
279 
280  typedef typename NumericalTraits<L,R>::promote value_type;
281 
282  No_Initialization nothing;
283  TinyFad<5,value_type> tmp( nothing );
284 
285  tmp.d0() = un.d0() + deux.d0();
286 
287  tmp.d1() = un.d1() + deux.d1();
288 
289  tmp.d2() = un.d2() + deux.d2();
290 
291  tmp.d3() = un.d3() + deux.d3();
292 
293  tmp.d4() = un.d4() + deux.d4();
294 
295  tmp.val() = un.val() + deux.val();
296 
297  return tmp;
298 }
299 
300 template <class L, class R> inline
302 operator +(const TinyFad<5,L>& un, const R& deux) {
303 
304  typedef typename NumericalTraits<L,R>::promote value_type;
305 
306  No_Initialization nothing;
307  TinyFad<5,value_type> tmp( nothing );
308 
309  tmp.d0() = un.d0();
310 
311  tmp.d1() = un.d1();
312 
313  tmp.d2() = un.d2();
314 
315  tmp.d3() = un.d3();
316 
317  tmp.d4() = un.d4();
318 
319  tmp.val() = un.val() + deux;
320 
321  return tmp;
322 }
323 
324 template <class L, class R> inline
326 operator +(const L& un, const TinyFad<5,R>& deux) {
327  return operator +(deux,un);
328 }
329 
330 template <class L, class R> inline
332 operator *(const TinyFad<5,L>& un, const TinyFad<5,R>& deux) {
333 
334  typedef typename NumericalTraits<L,R>::promote value_type;
335 
336  No_Initialization nothing;
337  TinyFad<5,value_type> tmp( nothing );
338 
339  tmp.d0() = un.d0()*deux.val() + un.val() * deux.d0();
340 
341  tmp.d1() = un.d1()*deux.val() + un.val() * deux.d1();
342 
343  tmp.d2() = un.d2()*deux.val() + un.val() * deux.d2();
344 
345  tmp.d3() = un.d3()*deux.val() + un.val() * deux.d3();
346 
347  tmp.d4() = un.d4()*deux.val() + un.val() * deux.d4();
348 
349  tmp.val() = un.val() * deux.val();
350 
351  return tmp;
352 }
353 
354 template <class L, class R> inline
356 operator *(const TinyFad<5,L>& un, const R& deux) {
357 
358  typedef typename NumericalTraits<L,R>::promote value_type;
359 
360  No_Initialization nothing;
361  TinyFad<5,value_type> tmp( nothing );
362 
363  tmp.d0() = un.d0()*deux;
364 
365  tmp.d1() = un.d1()*deux;
366 
367  tmp.d2() = un.d2()*deux;
368 
369  tmp.d3() = un.d3()*deux;
370 
371  tmp.d4() = un.d4()*deux;
372 
373  tmp.val() = un.val() * deux;
374 
375  return tmp;
376 }
377 
378 template <class L, class R> inline
380 operator *(const L& un, const TinyFad<5,R>& deux) {
381 
382  return operator *(deux,un);
383 }
384 
385 
386 template <class L, class R> inline
388 operator -(const TinyFad<5,L> & un, const TinyFad<5,R> & deux) {
389 
390  typedef typename NumericalTraits<L,R>::promote value_type;
391 
392  No_Initialization nothing;
393  TinyFad<5,value_type> tmp( nothing );
394 
395  tmp.d0() = un.d0() - deux.d0();
396 
397  tmp.d1() = un.d1() - deux.d1();
398 
399  tmp.d2() = un.d2() - deux.d2();
400 
401  tmp.d3() = un.d3() - deux.d3();
402 
403  tmp.d4() = un.d4() - deux.d4();
404 
405  tmp.val() = un.val() - deux.val();
406 
407  return tmp;
408 }
409 
410 template <class L, class R> inline
412 operator -(const L & un, const TinyFad<5,R> & deux) {
413 
414  typedef typename NumericalTraits<L,R>::promote value_type;
415 
416  No_Initialization nothing;
417  TinyFad<5,value_type> tmp( nothing );
418 
419  tmp.d0() -= deux.d0();
420 
421  tmp.d1() -= deux.d1();
422 
423  tmp.d2() -= deux.d2();
424 
425  tmp.d3() -= deux.d3();
426 
427  tmp.d4() -= deux.d4();
428 
429  tmp.val() = un - deux.val();
430 
431  return tmp;
432 }
433 
434 template <class L, class R> inline
436 operator -(const TinyFad<5,L> & un, const R & deux) {
437  typedef typename NumericalTraits<L,R>::promote value_type;
438 
439  No_Initialization nothing;
440  TinyFad<5,value_type> tmp( nothing );
441 
442  tmp.d0() = un.d0();
443 
444  tmp.d1() = un.d1();
445 
446  tmp.d2() = un.d2();
447 
448  tmp.d3() = un.d3();
449 
450  tmp.d4() = un.d4();
451 
452  tmp.val() = un.val() - deux;
453 
454  return tmp;
455 }
456 
457 template <class L, class R> inline
459 operator /(const TinyFad<5,L> & un, const TinyFad<5,R> & deux) {
460 
461  typedef typename NumericalTraits<L,R>::promote value_type;
462 
463  if (deux.val() == 0.) error("TinyFad & TinyFad::operator /(const TinyFad<5,L> & un, const TinyFad<5,R> & deux), dividing by 0");
464 
465  No_Initialization nothing;
466  TinyFad<5,value_type> tmp( nothing );
467  value_type dval = deux.val();
468 
469  tmp.d0() = ( un.d0()* deux.val() - un.val() * deux.d0() ) / dval / dval ;
470 
471  tmp.d1() = ( un.d1()* deux.val() - un.val() * deux.d1() ) / dval / dval ;
472 
473  tmp.d2() = ( un.d2()* deux.val() - un.val() * deux.d2() ) / dval / dval ;
474 
475  tmp.d3() = ( un.d3()* deux.val() - un.val() * deux.d3() ) / dval / dval ;
476 
477  tmp.d4() = ( un.d4()* deux.val() - un.val() * deux.d4() ) / dval / dval ;
478 
479  tmp.val() = un.val() / dval;
480 
481  return tmp;
482 }
483 
484 template <class L, class R> inline
486 operator /(const L & un, const TinyFad<5,R> & deux) {
487 
488  typedef typename NumericalTraits<L,R>::promote value_type;
489 
490  if (deux.val() == 0.) error("TinyFad & TinyFad::operator /(const L & un, const TinyFad<5,R> & deux), dividing by 0");
491 
492  No_Initialization nothing;
493  TinyFad<5,value_type> tmp( nothing );
494  value_type dval = deux.val();
495 
496  tmp.d0() = - un * deux.d0() / dval / dval ;
497 
498  tmp.d1() = - un * deux.d1() / dval / dval ;
499 
500  tmp.d2() = - un * deux.d2() / dval / dval ;
501 
502  tmp.d3() = - un * deux.d3() / dval / dval ;
503 
504  tmp.d4() = - un * deux.d4() / dval / dval ;
505 
506  tmp.val() = un / dval;
507 
508  return tmp;
509 }
510 
511 template <class L, class R> inline
513 operator /(const TinyFad<5,L> & un, const R & deux) {
514 
515  typedef typename NumericalTraits<L,R>::promote value_type;
516 
517  if (deux == 0.) error("TinyFad & TinyFad::operator /(const TinyFad<5,L> & un, const R & deux), dividing by 0");
518 
519  No_Initialization nothing;
520  TinyFad<5,value_type> tmp( nothing );
521 
522  tmp.d0() = un.d0() / deux;
523 
524  tmp.d1() = un.d1() / deux;
525 
526  tmp.d2() = un.d2() / deux;
527 
528  tmp.d3() = un.d3() / deux;
529 
530  tmp.d4() = un.d4() / deux;
531 
532  tmp.val() = un.val() / deux;
533 
534  return tmp;
535 }
536 
537 template <class T> TinyFad<5,T> exp (const TinyFad<5,T>& in)
538 {
539  TinyFad<5,T> tmp(exp(in.val()));
540 
541  tmp.d0() = in.d0()*exp(in.val());
542  tmp.d1() = in.d1()*exp(in.val());
543  tmp.d2() = in.d2()*exp(in.val());
544  tmp.d3() = in.d3()*exp(in.val());
545  tmp.d4() = in.d4()*exp(in.val());
546 
547  return tmp;
548 }
549 
550 template <class T> TinyFad<5,T> log (const TinyFad<5,T>& in)
551 {
552  if ( in.val() <= 0) error("TinyFad log (const TinyFad& in) : zero or negative value");
553  TinyFad<5,T> tmp(log(in.val()));
554 
555  tmp.d0() = in.d0() / in.val();
556  tmp.d1() = in.d1() / in.val();
557  tmp.d2() = in.d2() / in.val();
558  tmp.d3() = in.d3() / in.val();
559  tmp.d4() = in.d4() / in.val();
560 
561  return tmp;
562 }
563 
564 template <class T> TinyFad<5,T> sqrt (const TinyFad<5,T>& in)
565 {
566  if ( in.val() < 0. ) error("TinyFad<5,T> sqrt (const TinyFad& in) : negative value");
567  TinyFad<5,T> tmp(sqrt(in.val()));
568 
569  bool test=true;
570  if ( in.val() == T(0.) ){
571  if ( in.d0() != T(0.) ) test = false;
572 
573  if ( in.d1() != T(0.) ) test = false;
574 
575  if ( in.d2() != T(0.) ) test = false;
576 
577  if ( in.d3() != T(0.) ) test = false;
578 
579  if ( in.d4() != T(0.) ) test = false;
580 
581  if ( !test )
582  error("TinyFad<5,T> sqrt (const TinyFad& in) : null value");
583  }
584  else {
585  tmp.d0() = in.d0() / sqrt(in.val()) / 2.;
586  tmp.d1() = in.d1() / sqrt(in.val()) / 2.;
587  tmp.d2() = in.d2() / sqrt(in.val()) / 2.;
588  tmp.d3() = in.d3() / sqrt(in.val()) / 2.;
589  tmp.d4() = in.d4() / sqrt(in.val()) / 2.;
590  }
591 
592  return tmp;
593 }
594 
595 template <class T> TinyFad<5,T> sin (const TinyFad<5,T>& in)
596 {
597  TinyFad<5,T> tmp( sin(in.val()) );
598 
599  tmp.d0() = in.d0() * cos( in.val() );
600  tmp.d1() = in.d1() * cos( in.val() );
601  tmp.d2() = in.d2() * cos( in.val() );
602  tmp.d3() = in.d3() * cos( in.val() );
603  tmp.d4() = in.d4() * cos( in.val() );
604 
605  return tmp;
606 }
607 
608 template <class T> TinyFad<5,T> cos (const TinyFad<5,T>& in)
609 {
610  TinyFad<5,T> tmp(cos(in.val()));
611 
612  tmp.d0() = - in.d0() * sin( in.val() );
613  tmp.d1() = - in.d1() * sin( in.val() );
614  tmp.d2() = - in.d2() * sin( in.val() );
615  tmp.d3() = - in.d3() * sin( in.val() );
616  tmp.d4() = - in.d4() * sin( in.val() );
617 
618  return tmp;
619 }
620 
621 template <class T> TinyFad<5,T> tan (const TinyFad<5,T>& in)
622 {
623  if ( in.val() == 0) error("TinyFad tan (const TinyFad& in) undiefined in 0.");
624  TinyFad<5,T> tmp(tan(in.val()));
625 
626  T cosinus = cos(in.val());
627  tmp.d0() = in.d0() / cosinus / cosinus;
628  tmp.d1() = in.d1() / cosinus / cosinus;
629  tmp.d2() = in.d2() / cosinus / cosinus;
630  tmp.d3() = in.d3() / cosinus / cosinus;
631  tmp.d4() = in.d4() / cosinus / cosinus;
632 
633  return tmp;
634 }
635 
636 template <class T> TinyFad<5,T> pow (const TinyFad<5,T>& in, double e)
637 {
638  TinyFad<5,T> tmp(pow(in.val(), e));
639 
640  tmp.d0() = e*in.d0()*pow(in.val(), e-1);
641  tmp.d1() = e*in.d1()*pow(in.val(), e-1);
642  tmp.d2() = e*in.d2()*pow(in.val(), e-1);
643  tmp.d3() = e*in.d3()*pow(in.val(), e-1);
644  tmp.d4() = e*in.d4()*pow(in.val(), e-1);
645 
646  return tmp;
647 }
648 
649 template <class T> TinyFad<5,T> pow (const TinyFad<5,T>& un, const TinyFad<5,T>& deux)
650 {
651  if (un.val() == 0) error("TinyFad pow (const TinyFad& un, const TinyFad& deux), un = 0. ");
652  TinyFad<5,T> tmp(pow(un.val(), deux.val()));
653 
654  tmp.d0() = deux.d0() * log(un.val()) * pow(un.val(), deux.val())
655  + deux.val() * un.d0() * pow(un.val(), deux.val()-1);
656  tmp.d1() = deux.d1() * log(un.val()) * pow(un.val(), deux.val())
657  + deux.val() * un.d1() * pow(un.val(), deux.val()-1);
658  tmp.d2() = deux.d2() * log(un.val()) * pow(un.val(), deux.val())
659  + deux.val() * un.d2() * pow(un.val(), deux.val()-1);
660  tmp.d3() = deux.d3() * log(un.val()) * pow(un.val(), deux.val())
661  + deux.val() * un.d3() * pow(un.val(), deux.val()-1);
662  tmp.d4() = deux.d4() * log(un.val()) * pow(un.val(), deux.val())
663  + deux.val() * un.d4() * pow(un.val(), deux.val()-1);
664 
665  return tmp;
666 }
667 
668 template <class T> TinyFad<5,T> pow (const TinyFad<5,T>& in, const int e)
669 {
670  TinyFad<5,T> tmp( pow((double)in.val(), (double)e) );
671 
672  tmp.d0() = e*in.d0()*pow((double)in.val(), (double)e-1);
673  tmp.d1() = e*in.d1()*pow((double)in.val(), (double)e-1);
674  tmp.d2() = e*in.d2()*pow((double)in.val(), (double)e-1);
675  tmp.d3() = e*in.d3()*pow((double)in.val(), (double)e-1);
676  tmp.d4() = e*in.d4()*pow((double)in.val(), (double)e-1);
677 
678  return tmp;
679 }
680 
681 template <class T> TinyFad<5,T> abs (const TinyFad<5,T>& in)
682 {
683  int sign = in.val() > 0? 1:0;
684 
685  if (sign) return in;
686  else return (-in);
687 }
688 
689 template <class T> std::ostream& operator << (std::ostream& os, const TinyFad<5,T>& a)
690 {
691  os.setf(std::ios::fixed,std::ios::scientific);
692  os.width(12);
693  os << a.val() << " [";
694 
695  os.width(12);
696  os << a.d0();
697  os.width(12);
698  os << a.d1();
699  os.width(12);
700  os << a.d2();
701  os.width(12);
702  os << a.d3();
703  os.width(12);
704  os << a.d4();
705 
706  os << "]";
707 
708  return os;
709 }
710 
711 
712 #endif
TinyFad< 5, typename NumericalTraits< L, R >::promote > operator/(const TinyFad< 5, L > &un, const TinyFad< 5, R > &deux)
Definition: tinyfadfive.h:459
const T & d(int i) const
Definition: tinyfadfive.h:135
TinyFad< 5, T > operator++(int)
Definition: tinyfadfive.h:245
TinyFad< 5, T > operator--(int)
Definition: tinyfadfive.h:250
const T & dx(int i) const
Definition: tinyfadfive.h:115
TinyFad< 5, typename NumericalTraits< L, R >::promote > operator*(const TinyFad< 5, L > &un, const TinyFad< 5, R > &deux)
Definition: tinyfadfive.h:332
TinyFad< Num, T > & operator-=(const TinyFad< Num, T > &in)
Definition: tinyfad.h:233
TinyFad< 5, T > abs(const TinyFad< 5, T > &in)
Definition: tinyfadfive.h:681
void diff(const size_t ith, const size_t sz)
Definition: tinyfadfive.h:26
TinyFad(const No_Initialization &)
Definition: tinyfadfive.h:67
TinyFad< 5, T > & operator--()
Definition: tinyfadfive.h:258
Definition: test.py:1
TinyFad< 5, T > tan(const TinyFad< 5, T > &in)
Definition: tinyfadfive.h:621
AutoPointerMutexArrayInit tmp
TinyFad< 5, T > cos(const TinyFad< 5, T > &in)
Definition: tinyfadfive.h:608
TinyFad< 5, T > operator-(const TinyFad< 5, T > &in)
Definition: tinyfadfive.h:269
T val_
Definition: tinyfad.h:47
T & d(int i)
Definition: tinyfadfive.h:125
void error(char *string)
Definition: testShape.cc:7
const T & d0() const
Definition: tinyfadfive.h:90
const T & d3() const
Definition: tinyfadfive.h:99
int N() const
Definition: tinyfadfive.h:85
TinyFad< 5, T > sqrt(const TinyFad< 5, T > &in)
Definition: tinyfadfive.h:564
TinyFad< 5, T > & operator++()
Definition: tinyfadfive.h:255
const T & d1() const
Definition: tinyfadfive.h:93
const T & val() const
Definition: tinyfadfive.h:87
TinyFad< Num, T > & operator=(const TinyFad< Num, T > &in)
Definition: tinyfad.h:189
const T & d4() const
Definition: tinyfadfive.h:102
TinyFad< 5, T > log(const TinyFad< 5, T > &in)
Definition: tinyfadfive.h:550
TinyFad(const TinyFad< 5, T > &in)
Definition: tinyfadfive.h:75
const T & d2() const
Definition: tinyfadfive.h:96
TinyFad< Num, T > & operator+=(const TinyFad< Num, T > &in)
Definition: tinyfad.h:219
T value_type
Definition: tinyfad.h:53
TinyFad< 5, T > operator+(const TinyFad< 5, T > &in)
Definition: tinyfadfive.h:264
TinyFad< 5, T > pow(const TinyFad< 5, T > &in, double e)
Definition: tinyfadfive.h:636
TinyFad< Num, T > & operator*=(const TinyFad< Num, T > &in)
Definition: tinyfad.h:247
TinyFad(const T &ind, const int ini)
Definition: tinyfadfive.h:44
TinyFad< 5, T > sin(const TinyFad< 5, T > &in)
Definition: tinyfadfive.h:595
TinyFad< Num, T > & operator/=(const TinyFad< Num, T > &in)
Definition: tinyfad.h:261
TinyFad(const T &in)
Definition: tinyfadfive.h:68
T & dx(int i)
Definition: tinyfadfive.h:105
const T & val() const
Definition: tinyfad.h:72
TinyFad< 5, T > exp(const TinyFad< 5, T > &in)
Definition: tinyfadfive.h:537