pub fn exponents<A, TEO>(teo: TEO, x: Array1<A>, alpha: A::Real, duration: usize) -> Array1<A::Real>
where
    A: Scalar + Lapack,
    TEO: TimeEvolution<Scalar = A, Dim = Ix1> + TimeStep<Time = A::Real>,
{
    let n = teo.model_size();
    let dur = teo.get_dt() * TEO::Time::from_usize(duration).unwrap();
    Series::new(teo, x, alpha)
        .map(|(_x, _q, r)| r.diag().map(|x| x.abs().ln()))
        .skip(duration / 10)
        .take(duration)
        .fold(ArrayBase::zeros(n), |mut x, y| {
            azip!((x in &mut x, &y in &y) *x = *x + y/dur );
            x
        })
}
/// Calculate all Lyapunov exponents
///
/// This is an example usage of `Series` itertor, with which you can write more flexible procedure.
Calculate all Lyapunov exponents
This is an example usage of `Series` itertor, with which you can write more flexible procedure.
Calculate all Lyapunov exponents This is an example usage of ` Series ` itertor with which you can write more flexible procedure .
pub fn exponents<A, TEO>(teo: TEO, x: Array1<A>, alpha: A::Real, duration: usize) -> Array1<A::Real>
where
    A: Scalar + Lapack,
    TEO: TimeEvolution<Scalar = A, Dim = Ix1> + TimeStep<Time = A::Real>,
{
    let n = teo.model_size();
    let dur = teo.get_dt() * TEO::Time::from_usize(duration).unwrap();
    Series::new(teo, x, alpha)
        .map(|(_x, _q, r)| r.diag().map(|x| x.abs().ln()))
        .skip(duration / 10)
        .take(duration)
        .fold(ArrayBase::zeros(n), |mut x, y| {
            azip!((x in &mut x, &y in &y) *x = *x + y/dur );
            x
        })
}
pub fn exponents < A , TEO > ( teo : TEO , x : Array1 < A > , alpha : A :: Real , duration : usize ) -> Array1 < A :: Real > where A : Scalar + Lapack , TEO : TimeEvolution < Scalar = A , Dim = Ix1 > + TimeStep < Time = A :: Real > , { let n = teo . model_size ( ) ; let dur = teo . get_dt ( ) * TEO :: Time :: from_usize ( duration ) . unwrap ( ) ; Series :: new ( teo , x , alpha ) . map ( | ( _x , _q , r ) | r . diag ( ) . map ( | x | x . abs ( ) . ln ( ) ) ) . skip ( duration / 10 ) . take ( duration ) . fold ( ArrayBase :: zeros ( n ) , | mut x , y | { azip ! ( ( x in mut x y in y ) x x y dur ) ; x } ) }
Calculate all Lyapunov exponents
This is an example usage of `Series` itertor, with which you can write more flexible procedure.
Calculate all Lyapunov exponents This is an example usage of ` Series ` itertor with which you can write more flexible procedure .
teo
TEO
x
Array1<A>
alpha
A::Real
duration
usize
teo
TEO
x
Array1<A>
alpha
A::Real
duration
usize