<commit_before>#!python
#cython: embedsignature=True
#cython: profile=True

cimport cython
from libc.math cimport tanh, sqrt, exp, log, sin, cos, cosh, sinh, M_PI #from math import pi, tanh, sqrt, exp, log, sin, cos, cosh, sinh
cimport numpy as np
from libcpp cimport bool

cdef extern from "WaveTools.h" namespace "proteus":
    cdef const int nDim
    cdef double fastcosh(double * hype,double k, double Z, bool fast)
    cdef double fastcos(double phase,bool fast)
    cdef double __cpp_eta_mode(double* x, double t, double* kDir, double omega, double phi, double amplitude,bool fast)
    cdef double __cpp_etaFenton(double* x, double t, double* kDir, double kAbs, double omega, double phi0, double amplitude, int Nf, double* Ycoeff,bool fast)
    cdef void __cpp_uFenton(double * U,double* x, double t, double* kDir, double kAbs, double omega, double phi0, double amplitude, double mwl, double depth,double gAbs, int Nf, double* Bcoeff, double* mV, double* waveDir, double* vDir, double* tanhF,bool fast)
    cdef double __cpp_etaRandom(double* x, double t, double* kDir, double* omega, double* phi, double* amplitude, int N,bool fast)
    cdef void __cpp_uRandom(double * U, double* x,double t,double* kDir,double* kAbs, double* omega, double* phi, double* amplitude, double mwl, double depth, int N, double* waveDir, double* vDir, double* tanhKd, double gAbs ,bool fast)
    cdef void __cpp_uDir(double* U, double* x,double t,double* kDir,double* kAbs, double* omega, double* phi, double* amplitude, double mwl, double depth, int N, double* waveDir, double* vDir, double* tanhKd , double gAbs,bool fast)
    cdef int __cpp_findWindow(double t, double handover, double t0, double Twindow, int Nwindows, double* windows_handover)
    cdef double __cpp_etaDirect(double* x, double* x0, double t, double* kDir, double* omega, double* phi, double* amplitude, int N,bool fast)
    cdef void __cpp_uDirect(double* U, double* x,double* x0,double t,double* kDir,double* kAbs, double* omega, double* phi, double* amplitude, double mwl, double depth, int N, double* waveDir, double* vDir, double* tanhKd, double gAbs ,bool fast)
    cdef double __cpp_etaWindow(double* x, double* x0, double t, double* t0, double* kDir, double* omega, double* phi, double* amplitude, int N, int Nw,bool fast)
    cdef  void __cpp_uWindow(double* U,double* x, double* x0, double t, double* T0, double* kDir, double* kAbs, double* omega, double* phi, double* amplitude, double mwl, double depth, int N,int Nw, double* waveDir, double* vDir, double* tanhKd , double gAbs,bool fast)
    cdef double __cpp_eta2nd(double* x, double t, double* kDir, double* ki, double* omega, double* phi, double* amplitude, int N, double* sinhKd, double* tanhKd,bool fast)
    cdef double __cpp_eta_short(double* x, double t, double* kDir, double* ki, double* omega, double* phi, double* amplitude, int N, double* sinhKd, double* tanhKd, double gAbs,bool fast)
    cdef double __cpp_eta_long(double* x, double t, double* kDir, double* ki, double* omega, double* phi, double* amplitude, int N, double* sinhKd, double* tanhKd, double gAbs,bool fast)
    cdef void __cpp_vel_mode_p(double* U, double * x, double t, double *kDir,double kAbs, double omega, double phi, double amplitude,double mwl, double depth, double *waveDir, double *vDir, double tanhkd, double gAbs,bool fast)

# pointer to eta function
ctypedef double (*cfeta) (MonochromaticWaves, double* , double )  

# pointer to velocity function
ctypedef void (*cfvel) (MonochromaticWaves, double*, double* , double )


cdef class  SolitaryWave:
    cdef double H,gAbs,K,depth,d2,d3
    cdef public:
        double mwl,c
    cdef np.ndarray g,waveDir,vDir,trans
    cdef bool fast

cdef class  MonochromaticWaves:<commit_msg>Added public attribute for mwl<commit_after>#!python
#cython: embedsignature=True
#cython: profile=True

cimport cython
from libc.math cimport tanh, sqrt, exp, log, sin, cos, cosh, sinh, M_PI #from math import pi, tanh, sqrt, exp, log, sin, cos, cosh, sinh
cimport numpy as np
from libcpp cimport bool

cdef extern from "WaveTools.h" namespace "proteus":
    cdef const int nDim
    cdef double fastcosh(double * hype,double k, double Z, bool fast)
    cdef double fastcos(double phase,bool fast)
    cdef double __cpp_eta_mode(double* x, double t, double* kDir, double omega, double phi, double amplitude,bool fast)
    cdef double __cpp_etaFenton(double* x, double t, double* kDir, double kAbs, double omega, double phi0, double amplitude, int Nf, double* Ycoeff,bool fast)
    cdef void __cpp_uFenton(double * U,double* x, double t, double* kDir, double kAbs, double omega, double phi0, double amplitude, double mwl, double depth,double gAbs, int Nf, double* Bcoeff, double* mV, double* waveDir, double* vDir, double* tanhF,bool fast)
    cdef double __cpp_etaRandom(double* x, double t, double* kDir, double* omega, double* phi, double* amplitude, int N,bool fast)
    cdef void __cpp_uRandom(double * U, double* x,double t,double* kDir,double* kAbs, double* omega, double* phi, double* amplitude, double mwl, double depth, int N, double* waveDir, double* vDir, double* tanhKd, double gAbs ,bool fast)
    cdef void __cpp_uDir(double* U, double* x,double t,double* kDir,double* kAbs, double* omega, double* phi, double* amplitude, double mwl, double depth, int N, double* waveDir, double* vDir, double* tanhKd , double gAbs,bool fast)
    cdef int __cpp_findWindow(double t, double handover, double t0, double Twindow, int Nwindows, double* windows_handover)
    cdef double __cpp_etaDirect(double* x, double* x0, double t, double* kDir, double* omega, double* phi, double* amplitude, int N,bool fast)
    cdef void __cpp_uDirect(double* U, double* x,double* x0,double t,double* kDir,double* kAbs, double* omega, double* phi, double* amplitude, double mwl, double depth, int N, double* waveDir, double* vDir, double* tanhKd, double gAbs ,bool fast)
    cdef double __cpp_etaWindow(double* x, double* x0, double t, double* t0, double* kDir, double* omega, double* phi, double* amplitude, int N, int Nw,bool fast)
    cdef  void __cpp_uWindow(double* U,double* x, double* x0, double t, double* T0, double* kDir, double* kAbs, double* omega, double* phi, double* amplitude, double mwl, double depth, int N,int Nw, double* waveDir, double* vDir, double* tanhKd , double gAbs,bool fast)
    cdef double __cpp_eta2nd(double* x, double t, double* kDir, double* ki, double* omega, double* phi, double* amplitude, int N, double* sinhKd, double* tanhKd,bool fast)
    cdef double __cpp_eta_short(double* x, double t, double* kDir, double* ki, double* omega, double* phi, double* amplitude, int N, double* sinhKd, double* tanhKd, double gAbs,bool fast)
    cdef double __cpp_eta_long(double* x, double t, double* kDir, double* ki, double* omega, double* phi, double* amplitude, int N, double* sinhKd, double* tanhKd, double gAbs,bool fast)
    cdef void __cpp_vel_mode_p(double* U, double * x, double t, double *kDir,double kAbs, double omega, double phi, double amplitude,double mwl, double depth, double *waveDir, double *vDir, double tanhkd, double gAbs,bool fast)

# pointer to eta function
ctypedef double (*cfeta) (MonochromaticWaves, double* , double )  

# pointer to velocity function
ctypedef void (*cfvel) (MonochromaticWaves, double*, double* , double )


cdef class  SolitaryWave:
    cdef double U,ramp
    cdef public:
        double mwl
cdef class  SolitaryWave:
    cdef double H,gAbs,K,depth,d2,d3
    cdef public:
        double mwl,c
    cdef np.ndarray g,waveDir,vDir,trans
    cdef bool fast

cdef class  MonochromaticWaves:
{'fraction_non_alphanumeric': 0.10150475184794086, 'fraction_numerical': 0.0031678986272439284, 'mean_word_length': 5.140194489465154, 'pattern_counts': {'":': 2, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1318861', 'n_tokens_mistral': 2608, 'n_tokens_neox': 2544, 'n_words': 971}