hmatrix-gsl-stats 0.1.3.3 → 0.2
raw patch · 5 files changed
+21/−10 lines, 5 files
Files
- CHANGES +3/−0
- LICENSE +10/−2
- hmatrix-gsl-stats.cabal +3/−3
- lib/Numeric/GSL/Fitting/Linear.hs +3/−3
- lib/Numeric/GSL/Histogram2D.hs +2/−2
CHANGES view
@@ -67,3 +67,6 @@ 0.1.3.3: removed reference to '-fvector' from the .cabal file++0.2:+ add `cmat` to `app` FFI calls for matrices
LICENSE view
@@ -1,2 +1,10 @@-Copyright A.V.H. McPhail 2010-GPL license+Copyright (c) 2010, A.V.H. McPhail+All rights reserved.++Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:++ * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.+ * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.+ * Neither the name of the author nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.++THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
hmatrix-gsl-stats.cabal view
@@ -1,8 +1,8 @@ Name: hmatrix-gsl-stats-Version: 0.1.3.3-License: GPL+Version: 0.2+License: BSD3 License-file: LICENSE-Copyright: (c) A.V.H. McPhail 2010, 2011+Copyright: (c) A.V.H. McPhail 2010, 2011, 2013 Author: Vivian McPhail Maintainer: haskell.vivian.mcphail <at> gmail <dot> com Stability: provisional
lib/Numeric/GSL/Fitting/Linear.hs view
@@ -134,7 +134,7 @@ cov <- createMatrix RowMajor p p c <- createVector p alloca$ \chi_sq -> do- app4 (fitting_multifit chi_sq) mat x vec y vec c mat cov "multifit"+ app4 (fitting_multifit chi_sq) mat (cmat x) vec y vec c mat cov "multifit" chi_sq' <- peek chi_sq return (c,cov,chi_sq') @@ -154,7 +154,7 @@ cov <- createMatrix RowMajor p p c <- createVector p alloca$ \chi_sq -> do- app5 (fitting_multifit_w chi_sq) mat x vec w vec y vec c mat cov "multifit"+ app5 (fitting_multifit_w chi_sq) mat (cmat x) vec w vec y vec c mat cov "multifit" chi_sq' <- peek chi_sq return (c,cov,chi_sq') @@ -168,7 +168,7 @@ multifit_est :: Vector Double -- ^ input point -> Vector Double -- ^ the coefficients -> Matrix Double -- ^ the covariance matrix- -> (Double,Double) -- ^ (y,y_error_+ -> (Double,Double) -- ^ (y,y_error) multifit_est x c cov = unsafePerformIO $ do alloca $ \y -> alloca $ \e -> do
lib/Numeric/GSL/Histogram2D.hs view
@@ -233,11 +233,11 @@ -- | create from ranges and bins fromMatrix :: Vector Double -- ^ x ranges -> Vector Double -- ^ y ranges- -> Matrix Double -- ^ bins+ -> Matrix Double -- ^ bins (row major) -> Histogram2D -- ^result fromMatrix x y w = unsafePerformIO $ do h@(H _ _ h') <- fromRangesIO x y- app3 (\xs x' ys y' rs cs b -> withForeignPtr h' $ \h'' -> histogram_from_matrix h'' xs x' ys y' rs cs b) vec x vec y mat w "fromMatrix"+ app3 (\xs x' ys y' rs cs b -> withForeignPtr h' $ \h'' -> histogram_from_matrix h'' xs x' ys y' rs cs b) vec x vec y mat (cmat w) "fromMatrix" return h foreign import ccall "histogram-aux.h from_matrix" histogram_from_matrix :: Hist2DHandle -> CInt -> Ptr Double -> CInt -> Ptr Double -> CInt -> CInt -> Ptr Double -> IO CInt