Skip to content

Commit a25424a

Browse files
committed
Update for Julia 0.6
1 parent 4ec1a7a commit a25424a

10 files changed

+127
-114
lines changed

Diff for: .travis.yml

+1-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@ os:
33
- linux
44
- osx
55
julia:
6-
#- 0.4
7-
- 0.5
6+
- 0.6
87
#- nightly
98
notifications:
109
email: false

Diff for: LICENSE.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
The PairedListMatrices.jl package is licensed under the MIT "Expat" License:
22

3-
> Copyright (c) 2016: Diego Javier Zea.
3+
> Copyright (c) 2017: Diego Javier Zea.
44
>
55
> Permission is hereby granted, free of charge, to any person obtaining
66
> a copy of this software and associated documentation files (the

Diff for: NEWS.md

+5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
## PairwiseListMatrices.jl Release Notes
22

3+
### Changes from v0.4 to v0.6
4+
5+
PairwiseListMatrices v0.6 requires Julia v0.6.
6+
PairwiseListMatrices v0.5 was the last version with Julia 0.5 support.
7+
38
### Changes from v0.4 to v0.5
49

510
* It has better support for Julia 0.5, e.g. faster `map` and `broadcast`.

Diff for: README.md

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
Julia 0.4: [![PairwiseListMatrices](http://pkg.julialang.org/badges/PairwiseListMatrices_0.4.svg)](http://pkg.julialang.org/?pkg=PairwiseListMatrices)
44
Julia 0.5: [![PairwiseListMatrices](http://pkg.julialang.org/badges/PairwiseListMatrices_0.5.svg)](http://pkg.julialang.org/?pkg=PairwiseListMatrices)
5+
Julia 0.6: [![PairwiseListMatrices](http://pkg.julialang.org/badges/PairwiseListMatrices_0.6.svg)](http://pkg.julialang.org/?pkg=PairwiseListMatrices)
56

67
Linux, OSX: [![Build Status](https://travis-ci.org/diegozea/PairwiseListMatrices.jl.svg?branch=master)](https://travis-ci.org/diegozea/PairwiseListMatrices.jl)
78
Windows: [![Build status](https://ci.appveyor.com/api/projects/status/p96sso5b23gi85mg/branch/master?svg=true)](https://ci.appveyor.com/project/diegozea/pairwiselistmatrices-jl/branch/master)

Diff for: appveyor.yml

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
environment:
22
matrix:
3-
- JULIA_URL: "https://julialang-s3.julialang.org/bin/winnt/x86/0.5/julia-0.5-latest-win32.exe"
4-
- JULIA_URL: "https://julialang-s3.julialang.org/bin/winnt/x64/0.5/julia-0.5-latest-win64.exe"
3+
- JULIA_URL: "https://julialang-s3.julialang.org/bin/winnt/x86/0.6/julia-0.6-latest-win32.exe"
4+
- JULIA_URL: "https://julialang-s3.julialang.org/bin/winnt/x64/0.6/julia-0.6-latest-win64.exe"
55

66
install:
77
- ps: "[System.Net.ServicePointManager]::SecurityProtocol = [System.Net.SecurityProtocolType]::Tls12"
@@ -19,4 +19,3 @@ build_script:
1919

2020
test_script:
2121
- C:\projects\julia\bin\julia -e "Pkg.test(\"PairwiseListMatrices\")"
22-

Diff for: docs/make.jl

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ makedocs(
1313
deploydocs(
1414
repo = "github.com/diegozea/PairwiseListMatrices.jl.git",
1515
target = "build",
16-
julia = "0.5",
16+
julia = "0.6",
1717
deps = nothing,
1818
make = nothing
1919
)

Diff for: src/PairwiseListMatrices.jl

+2-2
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,11 @@ include("pairwiselistmatrix.jl")
2828
include("plotrecipes.jl")
2929

3030
function to_dataframe(args...)
31-
throw(ErrorException("Deprecated function, use DataFrame(to_dict(args...)) instead."))
31+
throw(ErrorException("Deprecated function, use DataFrame(to_dict(args...)) instead."))
3232
end
3333

3434
function from_dataframe(args...)
35-
throw(ErrorException("Deprecated function, use from_table(args...) instead."))
35+
throw(ErrorException("Deprecated function, use from_table(args...) instead."))
3636
end
3737

3838
end

Diff for: src/macros.jl

+27-20
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
"""
2-
The macro `@iteratelist` writes a `for` loop over the `list` but avoiding `getfield` calls inside the loop.
3-
The first argument of the macro is the `PairwiseListMatrix` that is going to be iterated and the second is the body of the loop.
4-
In the body `list` will be the list field of the `PairwiseListMatrix` and `k` the index over that list.
5-
Other variables should be interpolated in a quote. You must not modify the value of `k`.
2+
The macro `@iteratelist` writes a `for` loop over the `list` but avoiding `getfield` calls
3+
inside the loop. The first argument of the macro is the `PairwiseListMatrix` that is going
4+
to be iterated and the second is the body of the loop.
5+
In the body `list` will be the list field of the `PairwiseListMatrix` and `k` the index
6+
over that list. Other variables should be interpolated in a quote. You must not modify the
7+
value of `k`.
68
7-
```
9+
```julia
810
julia> PLM = PairwiseListMatrix([1,2,3], false)
9-
3x3 PairwiseListMatrices.PairwiseListMatrix{Int64,false}:
11+
3×3 PairwiseListMatrices.PairwiseListMatrix{Int64,false,Array{Int64,1}}:
1012
0 1 2
1113
1 0 3
1214
2 3 0
@@ -28,22 +30,24 @@ macro iteratelist(plm, exp)
2830
end
2931

3032
"""
31-
The macro `@iteratediag` writes a `for` loop over the `diag` field of a `PairwiseListMatrix{T,false}` but avoiding calls to `getfield` inside the loop.
32-
The first argument of the macro is the `PairwiseListMatrix` that is going to be iterated and the second is the body of the loop.
33-
In the body `diag` will be the diag field of the `PairwiseListMatrix` and `k` the index over that vector.
33+
The macro `@iteratediag` writes a `for` loop over the `diag` field of a
34+
`PairwiseListMatrix{T,false,VT}` but avoiding calls to `getfield` inside the loop. The first
35+
argument of the macro is the `PairwiseListMatrix` that is going to be iterated and the
36+
second is the body of the loop. In the body `diag` will be the diag field of the
37+
`PairwiseListMatrix` and `k` the index over that vector.
3438
Other variables should be interpolated in a quote. You must not modify the value of `k`.
3539
36-
```
40+
```julia
3741
julia> PLM = PairwiseListMatrix([1,2,3], false)
38-
3x3 PairwiseListMatrices.PairwiseListMatrix{Int64,false}:
42+
3×3 PairwiseListMatrices.PairwiseListMatrix{Int64,false,Array{Int64,1}}:
3943
0 1 2
4044
1 0 3
4145
2 3 0
4246
4347
julia> @iteratediag PLM diag[k] += 10k
4448
4549
julia> PLM
46-
3x3 PairwiseListMatrices.PairwiseListMatrix{Int64,false}:
50+
3×3 PairwiseListMatrices.PairwiseListMatrix{Int64,false,Array{Int64,1}}:
4751
10 1 2
4852
1 20 3
4953
2 3 30
@@ -62,27 +66,30 @@ macro iteratediag(plm, exp)
6266
end
6367

6468
"""
65-
The macro `@iterateupper` iterates over the upper triangular part of the `PairwiseListMatrix` that is given as first argument.
66-
The second argument should be `true` if the diagonal need to be included in the iteration or `false` otherwise.
67-
The last argument is the body of the loop, where `list` is the list and diag fields of the `PairwiseListMatrix` and `k` is the index over that `list`.
68-
You can also use the respective `i` and `j` indexes for that position `k` in the upper triangular part of the matrix. Other variables should be interpolated in a quote.
69+
The macro `@iterateupper` iterates over the upper triangular part of the
70+
`PairwiseListMatrix` that is given as first argument. The second argument should be
71+
`true` if the diagonal need to be included in the iteration or `false` otherwise.
72+
The last argument is the body of the loop, where `list` is the list and diag fields of
73+
the `PairwiseListMatrix` and `k` is the index over that `list`.
74+
You can also use the respective `i` and `j` indexes for that position `k` in the upper
75+
triangular part of the matrix. Other variables should be interpolated in a quote.
6976
You must not modify the values of `i`, `j` or `k`.
7077
71-
```
78+
```julia
7279
julia> PLM = PairwiseListMatrix([1,2,3], true)
73-
2x2 PairwiseListMatrices.PairwiseListMatrix{Int64,true}:
80+
2×2 PairwiseListMatrices.PairwiseListMatrix{Int64,true,Array{Int64,1}}:
7481
1 2
7582
2 3
7683
7784
julia> mat = zeros(Int, 2, 2)
78-
2x2 Array{Int64,2}:
85+
2×2 Array{Int64,2}:
7986
0 0
8087
0 0
8188
8289
julia> @iterateupper PLM true :(\$mat)[i,j] = list[k]
8390
8491
julia> mat
85-
2x2 Array{Int64,2}:
92+
2×2 Array{Int64,2}:
8693
1 2
8794
0 3
8895

0 commit comments

Comments
 (0)