Namespaces | Functions | Variables
OscCalcAnalytic.cxx File Reference
#include "OscLib/OscCalcAnalytic.h"
#include <cassert>

Go to the source code of this file.

Namespaces

 osc::analytic
 

Functions

template<class T , class U >
void sincos (T &x, Eigen::ArrayX< U > *sx, Eigen::ArrayX< U > *cx)
 
template<class T , class U >
cmplx< T, U > osc::analytic::make_cmplx (const T &re, const U &im)
 
template<class A , class B , class C , class D >
 osc::analytic::__attribute__ ((always_inline)) auto operator*(const cmplx<A
 
template<class A , class B , class C >
 osc::analytic::__attribute__ ((always_inline)) auto operator*(const A &x
 
template<class T , class U >
 osc::analytic::__attribute__ ((always_inline)) auto operator/(const cmplx< T > &x
 
template<class T >
 osc::analytic::__attribute__ ((always_inline)) cmplx< T > operator-(const cmplx< T > &x)
 
template<class T >
T osc::analytic::sqr (T x)
 
template<class T >
T osc::analytic::cube (T x)
 
template<class T >
std::array< T, 3 > osc::analytic::SolveCubic (T b, T c, T d)
 Solve x^3 + b*x^2 + c*x + d = 0. More...
 

Variables

B & osc::analytic::x
 
B const cmplx< C, D > & osc::analytic::y
 
const double osc::analytic::sqrt3 = sqrt(3)
 

Function Documentation

template<class T , class U >
void sincos ( T x,
Eigen::ArrayX< U > *  sx,
Eigen::ArrayX< U > *  cx 
)

Definition at line 16 of file OscCalcAnalytic.cxx.

References MECModelEnuComparisons::i.

Referenced by osc::analytic::_OscCalc< T >::_P(), osc::_sincos(), osc::OscCalcPMNSOptEigen::SaveLastParams(), and osc::analytic::SolveCubic().

19 {
20  // Presumably this is faster than the commented out version below
21  sx->resize(x.size());
22  cx->resize(x.size());
23  for(int i = 0; i < x.size(); ++i) sincos(x[i], &(*sx)[i], &(*cx)[i]);
24 
25  // *sx = sin(x);
26  // *cx = cos(x);
27 }
void sincos(T &x, Eigen::ArrayX< U > *sx, Eigen::ArrayX< U > *cx)