Changeset 08648c0 in sasview for sansmodels/src/c_models


Ignore:
Timestamp:
Feb 8, 2012 1:08:49 PM (13 years ago)
Author:
Jae Cho <jhjcho@…>
Branches:
master, ESS_GUI, ESS_GUI_Docs, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_iss879, ESS_GUI_iss959, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc, costrafo411, magnetic_scatt, release-4.1.1, release-4.1.2, release-4.2.2, release_4.0.1, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
Children:
1b023334
Parents:
9cd0baa
Message:

more s king's fractal models: todo: doc, test

Location:
sansmodels/src/c_models
Files:
3 added
2 edited

Legend:

Unmodified
Added
Removed
  • sansmodels/src/c_models/c_models.cpp

    r7289627 r08648c0  
    5858void addCRPAModel(PyObject *module); 
    5959void addCFractalModel(PyObject *module); 
     60void addCMassSurfaceFractal(PyObject *module); 
     61void addCSurfaceFractalModel(PyObject *module); 
     62void addCMassFractalModel(PyObject *module); 
    6063void addCPoly_GaussCoil(PyObject *module); 
    6164 
     
    296299  addCRPAModel(m); 
    297300  addCFractalModel(m); 
    298 } 
     301  addCMassSurfaceFractal(m); 
     302  addCMassFractalModel(m); 
     303  addCSurfaceFractalModel(m); 
     304} 
  • sansmodels/src/c_models/libfunc.c

    r101065a r08648c0  
    6363        return sin(x)/x; 
    6464} 
     65 
     66double gamln(double xx) { 
     67 
     68    double x,y,tmp,ser; 
     69    static double cof[6]={76.18009172947146,-86.50532032941677, 
     70    24.01409824083091,-1.231739572450155, 
     71    0.1208650973866179e-2,-0.5395239384953e-5}; 
     72    int j; 
     73 
     74    y=x=xx; 
     75    tmp=x+5.5; 
     76    tmp -= (x+0.5)*log(tmp); 
     77    ser=1.000000000190015; 
     78    for (j=0;j<=5;j++) ser += cof[j]/++y; 
     79    return -tmp+log(2.5066282746310005*ser/x); 
     80} 
Note: See TracChangeset for help on using the changeset viewer.