nonlinear-optimization-ad 0.2.1 → 0.2.2
raw patch · 4 files changed
+76/−42 lines, 4 filesdep ~addep ~vectorPVP: major bump suggested
API removals or changes: PVP suggests a major version bump
Dependency ranges changed: ad, vector
API changes (from Hackage documentation)
- Numeric.Optimization.Algorithms.HagerZhang05.AD: debugTol :: Parameters -> Maybe Double
- Numeric.Optimization.Algorithms.HagerZhang05.AD: estimateError :: Parameters -> EstimateError
- Numeric.Optimization.Algorithms.HagerZhang05.AD: finalValue :: Statistics -> Double
- Numeric.Optimization.Algorithms.HagerZhang05.AD: funcEpsilon :: Parameters -> Double
- Numeric.Optimization.Algorithms.HagerZhang05.AD: funcEvals :: Statistics -> CInt
- Numeric.Optimization.Algorithms.HagerZhang05.AD: gradEvals :: Statistics -> CInt
- Numeric.Optimization.Algorithms.HagerZhang05.AD: gradNorm :: Statistics -> Double
- Numeric.Optimization.Algorithms.HagerZhang05.AD: initialStep :: Parameters -> Maybe Double
- Numeric.Optimization.Algorithms.HagerZhang05.AD: lineSearch :: Parameters -> LineSearch
- Numeric.Optimization.Algorithms.HagerZhang05.AD: maxItersFac :: Parameters -> Double
- Numeric.Optimization.Algorithms.HagerZhang05.AD: nanRho :: Parameters -> Double
- Numeric.Optimization.Algorithms.HagerZhang05.AD: nexpand :: Parameters -> CInt
- Numeric.Optimization.Algorithms.HagerZhang05.AD: nsecant :: Parameters -> CInt
- Numeric.Optimization.Algorithms.HagerZhang05.AD: printFinal :: Parameters -> Bool
- Numeric.Optimization.Algorithms.HagerZhang05.AD: printParams :: Parameters -> Bool
- Numeric.Optimization.Algorithms.HagerZhang05.AD: qdecay :: Parameters -> Double
- Numeric.Optimization.Algorithms.HagerZhang05.AD: quadraticStep :: Parameters -> Maybe Double
- Numeric.Optimization.Algorithms.HagerZhang05.AD: restartFac :: Parameters -> Double
- Numeric.Optimization.Algorithms.HagerZhang05.AD: stopRules :: Parameters -> StopRules
- Numeric.Optimization.Algorithms.HagerZhang05.AD: techDelta :: TechParameters -> Double
- Numeric.Optimization.Algorithms.HagerZhang05.AD: techEta :: TechParameters -> Double
- Numeric.Optimization.Algorithms.HagerZhang05.AD: techGamma :: TechParameters -> Double
- Numeric.Optimization.Algorithms.HagerZhang05.AD: techParameters :: Parameters -> TechParameters
- Numeric.Optimization.Algorithms.HagerZhang05.AD: techPsi0 :: TechParameters -> Double
- Numeric.Optimization.Algorithms.HagerZhang05.AD: techPsi1 :: TechParameters -> Double
- Numeric.Optimization.Algorithms.HagerZhang05.AD: techPsi2 :: TechParameters -> Double
- Numeric.Optimization.Algorithms.HagerZhang05.AD: techRho :: TechParameters -> Double
- Numeric.Optimization.Algorithms.HagerZhang05.AD: techSigma :: TechParameters -> Double
- Numeric.Optimization.Algorithms.HagerZhang05.AD: totalIters :: Statistics -> CInt
- Numeric.Optimization.Algorithms.HagerZhang05.AD: verbose :: Parameters -> Verbose
+ Numeric.Optimization.Algorithms.HagerZhang05.AD: [debugTol] :: Parameters -> Maybe Double
+ Numeric.Optimization.Algorithms.HagerZhang05.AD: [estimateError] :: Parameters -> EstimateError
+ Numeric.Optimization.Algorithms.HagerZhang05.AD: [finalValue] :: Statistics -> Double
+ Numeric.Optimization.Algorithms.HagerZhang05.AD: [funcEpsilon] :: Parameters -> Double
+ Numeric.Optimization.Algorithms.HagerZhang05.AD: [funcEvals] :: Statistics -> CInt
+ Numeric.Optimization.Algorithms.HagerZhang05.AD: [gradEvals] :: Statistics -> CInt
+ Numeric.Optimization.Algorithms.HagerZhang05.AD: [gradNorm] :: Statistics -> Double
+ Numeric.Optimization.Algorithms.HagerZhang05.AD: [initialStep] :: Parameters -> Maybe Double
+ Numeric.Optimization.Algorithms.HagerZhang05.AD: [lineSearch] :: Parameters -> LineSearch
+ Numeric.Optimization.Algorithms.HagerZhang05.AD: [maxItersFac] :: Parameters -> Double
+ Numeric.Optimization.Algorithms.HagerZhang05.AD: [nanRho] :: Parameters -> Double
+ Numeric.Optimization.Algorithms.HagerZhang05.AD: [nexpand] :: Parameters -> CInt
+ Numeric.Optimization.Algorithms.HagerZhang05.AD: [nsecant] :: Parameters -> CInt
+ Numeric.Optimization.Algorithms.HagerZhang05.AD: [printFinal] :: Parameters -> Bool
+ Numeric.Optimization.Algorithms.HagerZhang05.AD: [printParams] :: Parameters -> Bool
+ Numeric.Optimization.Algorithms.HagerZhang05.AD: [qdecay] :: Parameters -> Double
+ Numeric.Optimization.Algorithms.HagerZhang05.AD: [quadraticStep] :: Parameters -> Maybe Double
+ Numeric.Optimization.Algorithms.HagerZhang05.AD: [restartFac] :: Parameters -> Double
+ Numeric.Optimization.Algorithms.HagerZhang05.AD: [stopRules] :: Parameters -> StopRules
+ Numeric.Optimization.Algorithms.HagerZhang05.AD: [techDelta] :: TechParameters -> Double
+ Numeric.Optimization.Algorithms.HagerZhang05.AD: [techEta] :: TechParameters -> Double
+ Numeric.Optimization.Algorithms.HagerZhang05.AD: [techGamma] :: TechParameters -> Double
+ Numeric.Optimization.Algorithms.HagerZhang05.AD: [techParameters] :: Parameters -> TechParameters
+ Numeric.Optimization.Algorithms.HagerZhang05.AD: [techPsi0] :: TechParameters -> Double
+ Numeric.Optimization.Algorithms.HagerZhang05.AD: [techPsi1] :: TechParameters -> Double
+ Numeric.Optimization.Algorithms.HagerZhang05.AD: [techPsi2] :: TechParameters -> Double
+ Numeric.Optimization.Algorithms.HagerZhang05.AD: [techRho] :: TechParameters -> Double
+ Numeric.Optimization.Algorithms.HagerZhang05.AD: [techSigma] :: TechParameters -> Double
+ Numeric.Optimization.Algorithms.HagerZhang05.AD: [totalIters] :: Statistics -> CInt
+ Numeric.Optimization.Algorithms.HagerZhang05.AD: [verbose] :: Parameters -> Verbose
Files
- .travis.yml +67/−38
- CHANGELOG.markdown +4/−0
- nonlinear-optimization-ad.cabal +4/−3
- src/Numeric/Optimization/Algorithms/HagerZhang05/AD.hs +1/−1
.travis.yml view
@@ -1,53 +1,82 @@-# NB: don't set `language: haskell` here+language: c+sudo: false -# The following enables several GHC versions to be tested; often it's enough to test only against the last release in a major GHC version. Feel free to omit lines listings versions you don't need/want testing for.-env:-# - CABALVER=1.16 GHCVER=6.12.3-# - CABALVER=1.16 GHCVER=7.0.1-# - CABALVER=1.16 GHCVER=7.0.2-# - CABALVER=1.16 GHCVER=7.0.3-# - CABALVER=1.16 GHCVER=7.0.4-# - CABALVER=1.16 GHCVER=7.2.1-# - CABALVER=1.16 GHCVER=7.2.2-# - CABALVER=1.16 GHCVER=7.4.1- - CABALVER=1.16 GHCVER=7.4.2-# - CABALVER=1.16 GHCVER=7.6.1-# - CABALVER=1.16 GHCVER=7.6.2- - CABALVER=1.18 GHCVER=7.6.3-# - CABALVER=1.18 GHCVER=7.8.1 # see note about Alex/Happy for GHC >= 7.8-# - CABALVER=1.18 GHCVER=7.8.2- - CABALVER=1.18 GHCVER=7.8.3- - CABALVER=1.22 GHCVER=7.10.2-# - CABALVER=head GHCVER=head # see section about GHC HEAD snapshots+cache:+ directories:+ - $HOME/.cabsnap+ - $HOME/.cabal/packages -# Note: the distinction between `before_install` and `install` is not important.+before_cache:+ - rm -fv $HOME/.cabal/packages/hackage.haskell.org/build-reports.log+ - rm -fv $HOME/.cabal/packages/hackage.haskell.org/00-index.tar++matrix:+ include:+ - env: CABALVER=1.18 GHCVER=7.6.3+ compiler: ": #GHC 7.6.3"+ addons: {apt: {packages: [cabal-install-1.18,ghc-7.6.3], sources: [hvr-ghc]}}+ - env: CABALVER=1.18 GHCVER=7.8.3 COVERAGE=1+ compiler: ": #GHC 7.8.3"+ addons: {apt: {packages: [cabal-install-1.18,ghc-7.8.3], sources: [hvr-ghc]}}+ - env: CABALVER=1.22 GHCVER=7.10.3+ compiler: ": #GHC 7.10.3"+ addons: {apt: {packages: [cabal-install-1.22,ghc-7.10.3], sources: [hvr-ghc]}}+ - env: CABALVER=1.24 GHCVER=8.0.1+ compiler: ": #GHC 8.0.1"+ addons: {apt: {packages: [cabal-install-1.24,ghc-8.0.1], sources: [hvr-ghc]}}+ before_install:- - travis_retry sudo add-apt-repository -y ppa:hvr/ghc- - travis_retry sudo apt-get update- - travis_retry sudo apt-get install cabal-install-$CABALVER ghc-$GHCVER # see note about happy/alex- - export PATH=/opt/ghc/$GHCVER/bin:/opt/cabal/$CABALVER/bin:$PATH+ - unset CC+ - export PATH=/opt/ghc/$GHCVER/bin:/opt/cabal/$CABALVER/bin:~/.cabal/bin:$PATH install: - cabal --version - echo "$(ghc --version) [$(ghc --print-project-git-commit-id 2> /dev/null || echo '?')]"- - travis_retry cabal update- - cabal install --only-dependencies --enable-tests --enable-benchmarks -fBuildSamplePrograms+ - if [ -f $HOME/.cabal/packages/hackage.haskell.org/00-index.tar.gz ];+ then+ zcat $HOME/.cabal/packages/hackage.haskell.org/00-index.tar.gz >+ $HOME/.cabal/packages/hackage.haskell.org/00-index.tar;+ fi+ - travis_retry cabal update -v+ - sed -i 's/^jobs:/-- jobs:/' ${HOME}/.cabal/config+ - cabal install --only-dependencies --enable-tests --enable-benchmarks --dry -v > installplan.txt+ - sed -i -e '1,/^Resolving /d' installplan.txt; cat installplan.txt -# Here starts the actual work to be performed for the package under test; any command which exits with a non-zero exit code causes the build to fail.+# check whether current requested install-plan matches cached package-db snapshot+ - if diff -u installplan.txt $HOME/.cabsnap/installplan.txt;+ then+ echo "cabal build-cache HIT";+ rm -rfv .ghc;+ cp -a $HOME/.cabsnap/ghc $HOME/.ghc;+ cp -a $HOME/.cabsnap/lib $HOME/.cabsnap/share $HOME/.cabsnap/bin $HOME/.cabal/;+ else+ echo "cabal build-cache MISS";+ rm -rf $HOME/.cabsnap;+ mkdir -p $HOME/.ghc $HOME/.cabal/lib $HOME/.cabal/share $HOME/.cabal/bin;+ cabal install --only-dependencies --enable-tests --enable-benchmarks;+ fi++# snapshot package-db on cache miss+ - if [ ! -d $HOME/.cabsnap ];+ then+ echo "snapshotting package-db to build-cache";+ mkdir $HOME/.cabsnap;+ cp -a $HOME/.ghc $HOME/.cabsnap/ghc;+ cp -a $HOME/.cabal/lib $HOME/.cabal/share $HOME/.cabal/bin installplan.txt $HOME/.cabsnap/;+ fi++# Here starts the actual work to be performed for the package under test;+# any command which exits with a non-zero exit code causes the build to fail. script: - if [ -f configure.ac ]; then autoreconf -i; fi- - cabal configure --enable-tests --enable-benchmarks -fBuildSamplePrograms -v2 # -v2 provides useful information for debugging+ - cabal configure --enable-tests --enable-benchmarks -v2 $([ "$COVERAGE" = "1" ] && echo "--enable-library-coverage") # -v2 provides useful information for debugging - cabal build # this builds all libraries and executables (including tests/benchmarks) - cabal test - cabal check - cabal sdist # tests that a source-distribution can be generated -# The following scriptlet checks that the resulting source distribution can be built & installed- - export SRC_TGZ=$(cabal info . | awk '{print $2 ".tar.gz";exit}') ;- cd dist/;- if [ -f "$SRC_TGZ" ]; then- cabal install --force-reinstalls "$SRC_TGZ";- else- echo "expected '$SRC_TGZ' not found";- exit 1;- fi+# Check that the resulting source distribution can be built & installed.+# If there are no other `.tar.gz` files in `dist`, this can be even simpler:+# `cabal install --force-reinstalls dist/*-*.tar.gz`+ - SRC_TGZ=$(cabal info . | awk '{print $2;exit}').tar.gz &&+ (cd dist && cabal install --force-reinstalls "$SRC_TGZ")
+ CHANGELOG.markdown view
@@ -0,0 +1,4 @@+0.2.2+-----+* compatibility with ad-4.3.* and vector-0.11.*+* fix compilation error with ad-3.4
nonlinear-optimization-ad.cabal view
@@ -2,7 +2,7 @@ -- further documentation, see http://haskell.org/cabal/users-guide/ name: nonlinear-optimization-ad-version: 0.2.1+version: 0.2.2 synopsis: Wrapper of nonlinear-optimization package for using with AD package description: Wrapper of nonlinear-optimization package for using with AD package homepage: https://github.com/msakai/nonlinear-optimization-ad@@ -17,6 +17,7 @@ cabal-version: >=1.10 extra-source-files: README.md+ CHANGELOG.markdown .travis.yml samples/LinearRegression.hs samples/galton.csv@@ -35,8 +36,8 @@ build-depends: base >=4 && <5 , nonlinear-optimization >=0.3.7 && <0.4- , ad >=3.4 && <4.3- , vector >= 0.5 && < 0.11+ , ad >=3.4 && <4.4+ , vector >= 0.5 && < 0.12 , primitive , reflection hs-source-dirs: src
src/Numeric/Optimization/Algorithms/HagerZhang05/AD.hs view
@@ -31,7 +31,7 @@ import Numeric.AD.Mode.Reverse import Numeric.AD.Internal.Reverse (Tape) #else-import Numeric.AD.Type+import Numeric.AD.Types #endif import Numeric.Optimization.Algorithms.HagerZhang05 hiding (optimize) import qualified Numeric.Optimization.Algorithms.HagerZhang05 as HagerZhang05