Skip to content
Snippets Groups Projects
Select Git revision
  • c145a143b16f6fae410364841cc4c44e08b0704b
  • master default protected
  • fix_Makefile.mingw#2
  • update_Makefile.mingw
  • fix_Makefile.mingw
  • fix_API_for_C_apps
  • fix_procinfo_mac
  • boinccmd_gpu_mode_always_until_sigterm
  • fgrp_osx_hotfix
  • fix_boinc_master@f8250782
  • eah_wrapper_improvements
  • diagnostics_win-hotfix
  • diagnostics_win-hotfix-old
  • current_fgrp_apps
  • testing_gw_apps
  • gw_app_darwin_15
  • current_brp_apps
  • current_brp_apps_android10
  • current_gfx_apps
  • current_server
  • current_gw_apps
  • previous_fgrp_apps
  • previous_gw_apps
  • testing_brp_apps
  • apps_FGRP3_1.07
  • apps_FGRP3_1.08
26 results

boinc_api.cpp

Blame
  • jacobi.py 843 B
    from __future__ import absolute_import
    from __future__ import division
    from __future__ import print_function
    from __future__ import unicode_literals
    
    import numpy as np
    import scipy.special
    
    def jacobi(n,a,b,x):
      """
      Jacobi Polynomial P_n^{a,b} (x)for real x.
    
                      n    / n+a \ / n+b \ / x-1 \^(n-s) / x+1 \^s
      P_n^{a,b}(x)= Sum    |     | |     | | --- |       | --- |
                      s=0   \ s  / \ n-s / \  2  /       \  2  /
      
      n,a,b (int)
      x (real)
      P (real)
    
      Implementation of Jacobi fucntion using binominal coefficients.
      This can handle values of alpha, beta < -1 which the special.eval_jacobi
      function does not.
      Andreas Freise 15.05.2016
      """
    
      P=0.0
      for s in np.arange(0,n+1):
        P=P+scipy.special.binom(n+a,s) * scipy.special.binom(n+b,n-s) * (x-1.0)**(n-s) * (x+1.0)**s
      P=P*0.5**n
      return P