|  Home 
  
   Install 
  
   Use 
  
   Develop 
  
   Support 
  
   News 
 
 Credits
 
 hosted by
 
   | 
   21class Stokes : public Vector <4,T>    26  Stokes (T a = T(0.0), T b = T(0.0), T c = T(0.0), T d = T(0.0))    32    : Vector <4,T> (T(v[0]), T(v[1]), T(v[2]), T(v[3])) {}    37    : Vector <4,T> (s, v[0], v[1], v[2]) {}    40  Stokes (const  Stokes<U>& s)    41    : Vector <4,T> (s[0], s[1], s[2], s[3]) {}    43  template<typename  U, typename  Unary>    44  Stokes (const  Stokes<U>& s, Unary f)     45    : Vector <4,T>( f(s[0]), f(s[1]), f(s[2]), f(s[3]) ) {}    48  T get_scalar ()const { return  this->x[0]; }    51  void set_scalar (T s) { this->x[0] = s; }    55  { return Vector<3,T>  (this->x[1], this->x[2], this->x[3]); }    60  { this->x[1]=v[0]; this->x[2]=v[1]; this->x[3]=v[2]; }    62  T sqr_vect ()const { return  normsq (get_vector()); }    64  T abs_vect ()const { return  sqrt (sqr_vect()); }    66  T invariant ()const { return  this->x[0]*this->x[0] - sqr_vect(); }    71template <class  T, class  U>    72void random_value (Stokes<T>& val, U scale, float  max_polarization = 1.0)    79  random_value (fraction_polarized, 0.5);    80  fraction_polarized += 0.5;    81  fraction_polarized *= max_polarization;    86    random_value (val[i], scale);    88  T modp = val.abs_vect();    90  scale *= fraction_polarized / modp;    95  if (val.invariant() < -1e-10)    96    throw std::runtime_error ("random_value (Stokes) invariant less than zero" );    99template <class  T, class  U>   100void random_vector (Stokes<T>& val, U scale)   102  random_value (val, scale);   112  for (unsigned  i=1; i<4; i++)   113    bias -= stokes[i].get_variance();   123template<typename  T> struct DatumTraits < Stokes<T> >  T val Definition Estimate.h:43U var Definition Estimate.h:45 Generated using doxygen 1.14.0
 
 |