Changeset 7132


Ignore:
Timestamp:
10/25/10 22:23:44 (9 years ago)
Author:
aivar
Message:

Add multiple exponential support (doesn't seem to actually work though).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/maven/projects/curve-fitter/src/main/java/loci/curvefitter/JaolhoCurveFitter.java

    r7119 r7132  
    6767            x_value += m_xInc; 
    6868        } 
     69 
     70        int numberExponentials = 0; 
     71        int numberParams = dataArray[0].getParams().length; 
     72        if (3 == numberParams) { 
     73            numberExponentials = 1; 
     74        } 
     75        else if (5 == numberParams) { 
     76            numberExponentials = 2; 
     77        } 
     78        else if (7 == numberParams) { 
     79            numberExponentials = 3; 
     80        } 
     81        if (0 == numberExponentials) { 
     82            System.out.println("invalid number of parameters: " + numberParams); 
     83            return 0; 
     84        } 
    6985         
    70         function = new ExpFunction(1); 
     86        function = new ExpFunction(numberExponentials); 
    7187        //lma = new LMA(function, lmaWeights, lmaData); 
    7288 
Note: See TracChangeset for help on using the changeset viewer.