Skip to content

Commit

Permalink
Merge pull request #3 from jdh8/master
Browse files Browse the repository at this point in the history
Make it compatible with Julia 1.0
  • Loading branch information
simonbyrne authored Jan 3, 2019
2 parents d165997 + c969e64 commit 4ddc1ae
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 12 deletions.
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ os:
- linux
- osx
julia:
- 0.4
- 0.5
- 0.7
- 1.0
- nightly
notifications:
email: false
Expand Down
2 changes: 1 addition & 1 deletion REQUIRE
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
julia 0.4
julia 0.7
Compat 0.8.8
12 changes: 6 additions & 6 deletions src/Remez.jl
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,8 @@ function ratfn_leastsquares(f::Function, xvals::Array{BigFloat}, n, d,
# Build the matrix. We're solving n+d+1 equations in n+d+1
# unknowns. (We actually have to return n+d+2 coefficients, but
# one of them is hardwired to 1.)
matrix = Array(BigFloat, n+d+1, n+d+1)
vector = Array(BigFloat, n+d+1)
matrix = Array{BigFloat}(undef, n+d+1, n+d+1)
vector = Array{BigFloat}(undef, n+d+1)
for i = 0:1:n
# Equation obtained by differentiating with respect to p_i,
# i.e. the numerator coefficient of x^i.
Expand Down Expand Up @@ -392,8 +392,8 @@ function ratfn_equal_deviation(f::Function, coords::Array{BigFloat},
# in which the p_i and e are the variables, and the powers of
# x and calls to w and f are the coefficients.

matrix = Array(BigFloat, n+2, n+2)
vector = Array(BigFloat, n+2)
matrix = Array{BigFloat}(undef, n+2, n+2)
vector = Array{BigFloat}(undef, n+2)
currsign = +1
for i = 1:1:n+2
x = coords[i]
Expand Down Expand Up @@ -441,8 +441,8 @@ function ratfn_equal_deviation(f::Function, coords::Array{BigFloat},
# based on the first n+d+1 of the n+d+2 coordinates, and
# see what the error turns out to be at the final
# coordinate.
matrix = Array(BigFloat, n+d+1, n+d+1)
vector = Array(BigFloat, n+d+1)
matrix = Array{BigFloat}(undef, n+d+1, n+d+1)
vector = Array{BigFloat}(undef, n+d+1)
currsign = +1
for i = 1:1:n+d+1
x = coords[i]
Expand Down
1 change: 0 additions & 1 deletion test/REQUIRE

This file was deleted.

4 changes: 2 additions & 2 deletions test/runtests.jl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
using Remez
using BaseTestNext
using Test

import Remez: ratfn_leastsquares, ratfn_eval, ratfn_minimax, goldensection, winnow_extrema

Expand All @@ -18,7 +18,7 @@ end
# Test leastsquares rational functions.
@testset "Leastsquares test 1" begin
n = 10000
a = Array(BigFloat, n+1)
a = Array{BigFloat}(undef, n+1)
for i = 0:1:n
a[1+i] = i/BigFloat(n)
end
Expand Down

0 comments on commit 4ddc1ae

Please sign in to comment.