ReFRACtor
polynomial_eval.h
Go to the documentation of this file.
1 #ifndef POLYNOMIAL_EVAL_H
2 #define POLYNOMIAL_EVAL_H
3 
4 #include "array_ad.h"
5 
6 namespace FullPhysics {
7 /****************************************************************/
21 class Poly1d : public Printable<Poly1d> {
22 public:
23 
24  //-----------------------------------------------------------------------
26  //-----------------------------------------------------------------------
27  Poly1d(const ArrayAd<double, 1>& Coefficients, const bool Decreasing_order = true) : coeffs_(Coefficients), decreasing_order_(Decreasing_order) {}
28 
29  //-----------------------------------------------------------------------
31  //-----------------------------------------------------------------------
32  double operator()(double Value) const;
34 
35  //-----------------------------------------------------------------------
37  //-----------------------------------------------------------------------
38  blitz::Array<double,1> operator()(const blitz::Array<double,1>& Arr) const;
40 
41  virtual void print(std::ostream& Os) const;
42 
43 private:
44 
45  blitz::Array<int,1> eval_indexes() const;
46 
47  ArrayAd<double, 1> coeffs_;
48  bool decreasing_order_;
49 };
50 
51 }
52 #endif
This is a Mixin for classes that can be printed.
Definition: printable.h:24
Poly1d(const ArrayAd< double, 1 > &Coefficients, const bool Decreasing_order=true)
The polynomial&#39;s coefficients, in decreasing powers.
double operator()(double Value) const
Evaluate polynomial for a value.
A one-dimensional polynomial class.
Contains classes to abstract away details in various Spurr Radiative Transfer software.
Definition: doxygen_python.h:1
virtual void print(std::ostream &Os) const

Copyright © 2017, California Institute of Technology.
ALL RIGHTS RESERVED.
U.S. Government Sponsorship acknowledged.
Generated Fri Aug 24 2018 15:44:11