Changeset 7642 for trunk/projects


Ignore:
Timestamp:
03/15/11 20:09:24 (9 years ago)
Author:
aivar
Message:

Added RLD+LMA option.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/projects/curve-fitter/src/main/java/loci/curvefitter/SLIMCurveFitter.java

    r7639 r7642  
    5252public class SLIMCurveFitter extends AbstractCurveFitter { 
    5353    static CLibrary s_library; 
    54     public enum AlgorithmType { RLD, LMA } 
     54    public enum AlgorithmType { RLD, LMA, RLD_LMA }; 
    5555    private AlgorithmType m_algorithmType; 
    5656 
     
    165165        double chiSquareTarget = 1.0; //TODO s/b specified incoming 
    166166 
    167         if (AlgorithmType.RLD.equals(m_algorithmType)) { 
     167        if (AlgorithmType.RLD.equals(m_algorithmType) || AlgorithmType.RLD_LMA.equals(m_algorithmType)) { 
    168168            // RLD or triple integral fit 
    169169            DoubleByReference z = new DoubleByReference(); 
     
    204204            } 
    205205        } 
    206         else { 
     206 
     207        if (AlgorithmType.LMA.equals(m_algorithmType) || AlgorithmType.RLD_LMA.equals(m_algorithmType)) { 
    207208            // LMA fit 
    208209            for (ICurveFitData data: dataArray) { 
     
    211212                    nInstrumentResponse = m_instrumentResponse.length; 
    212213                } 
     214                double[] params = new double[data.getParams().length]; 
    213215                returnValue = s_library.LMA_fit( 
    214216                        m_xInc, 
     
    228230            } 
    229231        } 
    230         //TODO error return deserves more thought 
     232        //TODO error return deserves much more thought!!  Just returning the last value here!! 
    231233        return returnValue; 
    232234    } 
Note: See TracChangeset for help on using the changeset viewer.