Skip to content

Commit

Permalink
Merge pull request #119 from JuliaOpt/ml/0.4
Browse files Browse the repository at this point in the history
drop support for julia 0.3
  • Loading branch information
mlubin committed Nov 27, 2015
2 parents 0a65b9b + e1fbf3b commit 5c34fc2
Show file tree
Hide file tree
Showing 45 changed files with 96 additions and 99 deletions.
1 change: 0 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ os:
- linux
- osx
julia:
- 0.3
- 0.4
- nightly
notifications:
Expand Down
3 changes: 1 addition & 2 deletions REQUIRE
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
julia 0.3
julia 0.4
MathProgBase 0.3.8
Compat 0.4.4
DataStructures
1 change: 0 additions & 1 deletion src/Convex.jl
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
module Convex
using Compat
import DataStructures

importall Base.Operators
Expand Down
4 changes: 2 additions & 2 deletions src/atoms/abs.jl
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ export sign, curvature, monotonicity, evaluate
type AbsAtom <: AbstractExpr
head::Symbol
id_hash::UInt64
children::@compat Tuple{AbstractExpr}
size::@compat Tuple{Int, Int}
children::Tuple{AbstractExpr}
size::Tuple{Int, Int}

function AbsAtom(x::AbstractExpr)
children = (x,)
Expand Down
6 changes: 3 additions & 3 deletions src/atoms/affine/add_subtract.jl
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ export sign, curvature, monotonicity, evaluate
type NegateAtom <: AbstractExpr
head::Symbol
id_hash::UInt64
children::@compat Tuple{AbstractExpr}
size::@compat Tuple{Int, Int}
children::Tuple{AbstractExpr}
size::Tuple{Int, Int}

function NegateAtom(x::AbstractExpr)
children = (x,)
Expand Down Expand Up @@ -57,7 +57,7 @@ type AdditionAtom <: AbstractExpr
head::Symbol
id_hash::UInt64
children::Array{AbstractExpr, 1}
size::@compat Tuple{Int, Int}
size::Tuple{Int, Int}

function AdditionAtom(x::AbstractExpr, y::AbstractExpr)
# find the size of the expression = max of size of x and size of y
Expand Down
4 changes: 2 additions & 2 deletions src/atoms/affine/diag.jl
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ export diag
type DiagAtom <: AbstractExpr
head::Symbol
id_hash::UInt64
children::@compat Tuple{AbstractExpr}
size::@compat Tuple{Int, Int}
children::Tuple{AbstractExpr}
size::Tuple{Int, Int}
k::Int

function DiagAtom(x::AbstractExpr, k::Int=0)
Expand Down
4 changes: 2 additions & 2 deletions src/atoms/affine/diagm.jl
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ export diagm
type DiagMatrixAtom <: AbstractExpr
head::Symbol
id_hash::UInt64
children::@compat Tuple{AbstractExpr}
size::@compat Tuple{Int, Int}
children::Tuple{AbstractExpr}
size::Tuple{Int, Int}

function DiagMatrixAtom(x::AbstractExpr)
(num_rows, num_cols) = x.size
Expand Down
6 changes: 3 additions & 3 deletions src/atoms/affine/index.jl
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import Base: getindex, to_index
export IndexAtom, getindex

@compat typealias ArrayOrNothing Union{AbstractArray, Void}
typealias ArrayOrNothing Union{AbstractArray, Void}

type IndexAtom <: AbstractExpr
head::Symbol
id_hash::UInt64
children::@compat Tuple{AbstractExpr}
size::@compat Tuple{Int, Int}
children::Tuple{AbstractExpr}
size::Tuple{Int, Int}
rows::ArrayOrNothing
cols::ArrayOrNothing
inds::ArrayOrNothing
Expand Down
10 changes: 5 additions & 5 deletions src/atoms/affine/multiply_divide.jl
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ export sign, monotonicity, curvature, evaluate, conic_form!
type MultiplyAtom <: AbstractExpr
head::Symbol
id_hash::UInt64
children::@compat Tuple{AbstractExpr, AbstractExpr}
size::@compat Tuple{Int, Int}
children::Tuple{AbstractExpr, AbstractExpr}
size::Tuple{Int, Int}

function MultiplyAtom(x::AbstractExpr, y::AbstractExpr)
if x.size == (1, 1)
Expand Down Expand Up @@ -109,8 +109,8 @@ end
type DotMultiplyAtom <: AbstractExpr
head::Symbol
id_hash::UInt64
children::@compat Tuple{Constant, AbstractExpr}
size::@compat Tuple{Int, Int}
children::Tuple{Constant, AbstractExpr}
size::Tuple{Int, Int}

function DotMultiplyAtom(x::Constant, y::AbstractExpr)
if x.size != y.size
Expand Down Expand Up @@ -157,4 +157,4 @@ end
.*(x::AbstractExpr, y::AbstractExpr) = .*(x, y)
.*(x::Value, y::AbstractExpr) = .*(Constant(x), y)
.*(x::AbstractExpr, y::Value) = .*(Constant(y), x)
./(x::AbstractExpr, y::Value) = .*(1./y, x)
./(x::AbstractExpr, y::Value) = .*(1./y, x)
4 changes: 2 additions & 2 deletions src/atoms/affine/reshape.jl
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ export sign, curvature, monotonicity, evaluate, conic_form!
type ReshapeAtom <: AbstractExpr
head::Symbol
id_hash::UInt64
children::@compat Tuple{AbstractExpr}
size::@compat Tuple{Int, Int}
children::Tuple{AbstractExpr}
size::Tuple{Int, Int}

function ReshapeAtom(x::AbstractExpr, m::Int, n::Int)
if m * n != get_vectorized_size(x)
Expand Down
2 changes: 1 addition & 1 deletion src/atoms/affine/stack.jl
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ type HcatAtom <: AbstractExpr
head::Symbol
id_hash::UInt64
children::Tuple
size::@compat Tuple{Int, Int}
size::Tuple{Int, Int}

function HcatAtom(args::AbstractExpr...)
num_rows = args[1].size[1]
Expand Down
4 changes: 2 additions & 2 deletions src/atoms/affine/sum.jl
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ export sum
type SumAtom <: AbstractExpr
head::Symbol
id_hash::UInt64
children::@compat Tuple{AbstractExpr}
size::@compat Tuple{Int, Int}
children::Tuple{AbstractExpr}
size::Tuple{Int, Int}

function SumAtom(x::AbstractExpr)
children = (x,)
Expand Down
4 changes: 2 additions & 2 deletions src/atoms/affine/transpose.jl
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ export sign, curvature, monotonicity, evaluate, conic_form!
type TransposeAtom <: AbstractExpr
head::Symbol
id_hash::UInt64
children::@compat Tuple{AbstractExpr}
size::@compat Tuple{Int, Int}
children::Tuple{AbstractExpr}
size::Tuple{Int, Int}

function TransposeAtom(x::AbstractExpr)
children = (x,)
Expand Down
4 changes: 2 additions & 2 deletions src/atoms/dotsort.jl
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ export sign, curvature, monotonicity, evaluate
type DotSortAtom <: AbstractExpr
head::Symbol
id_hash::UInt64
children::@compat Tuple{AbstractExpr}
size::@compat Tuple{Int, Int}
children::Tuple{AbstractExpr}
size::Tuple{Int, Int}
w::Value

function DotSortAtom(x::AbstractExpr, w::Value)
Expand Down
4 changes: 2 additions & 2 deletions src/atoms/exp_cone/entropy.jl
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ export sign, curvature, monotonicity, evaluate
type EntropyAtom <: AbstractExpr
head::Symbol
id_hash::UInt64
children::@compat Tuple{AbstractExpr}
size::@compat Tuple{Int, Int}
children::Tuple{AbstractExpr}
size::Tuple{Int, Int}

function EntropyAtom(x::AbstractExpr)
children = (x,)
Expand Down
4 changes: 2 additions & 2 deletions src/atoms/exp_cone/exp.jl
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ export sign, curvature, monotonicity, evaluate
type ExpAtom <: AbstractExpr
head::Symbol
id_hash::UInt64
children::@compat Tuple{AbstractExpr}
size::@compat Tuple{Int, Int}
children::Tuple{AbstractExpr}
size::Tuple{Int, Int}

function ExpAtom(x::AbstractExpr)
children = (x,)
Expand Down
4 changes: 2 additions & 2 deletions src/atoms/exp_cone/log.jl
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ export sign, curvature, monotonicity, evaluate
type LogAtom <: AbstractExpr
head::Symbol
id_hash::UInt64
children::@compat Tuple{AbstractExpr}
size::@compat Tuple{Int, Int}
children::Tuple{AbstractExpr}
size::Tuple{Int, Int}

function LogAtom(x::AbstractExpr)
children = (x,)
Expand Down
6 changes: 3 additions & 3 deletions src/atoms/exp_cone/logsumexp.jl
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ export sign, curvature, monotonicity, evaluate
type LogSumExpAtom <: AbstractExpr
head::Symbol
id_hash::UInt64
children::@compat Tuple{AbstractExpr}
size::@compat Tuple{Int, Int}
children::Tuple{AbstractExpr}
size::Tuple{Int, Int}

function LogSumExpAtom(x::AbstractExpr)
children = (x,)
Expand Down Expand Up @@ -63,4 +63,4 @@ function logisticloss(e::AbstractExpr)
s += logsumexp([e[i], 0])
end
return s
end
end
4 changes: 2 additions & 2 deletions src/atoms/exp_cone/relative_entropy.jl
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ export sign, curvature, monotonicity, evaluate
type RelativeEntropyAtom <: AbstractExpr
head::Symbol
id_hash::UInt64
children::@compat Tuple{AbstractExpr,AbstractExpr}
size::@compat Tuple{Int, Int}
children::Tuple{AbstractExpr,AbstractExpr}
size::Tuple{Int, Int}

function RelativeEntropyAtom(x::AbstractExpr, y::AbstractExpr)
children = (x, y)
Expand Down
4 changes: 2 additions & 2 deletions src/atoms/huber.jl
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ export huber
type HuberAtom <: AbstractExpr
head::Symbol
id_hash::UInt64
children::@compat Tuple{AbstractExpr}
size::@compat Tuple{Int, Int}
children::Tuple{AbstractExpr}
size::Tuple{Int, Int}
M::Real

function HuberAtom(x::AbstractExpr, M::Real)
Expand Down
4 changes: 2 additions & 2 deletions src/atoms/logdet.jl
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import Base.logdet
type LogDetAtom <: AbstractExpr
head::Symbol
id_hash::UInt64
children::@compat Tuple{AbstractExpr}
size::@compat Tuple{Int, Int}
children::Tuple{AbstractExpr}
size::Tuple{Int, Int}

function LogDetAtom(x::AbstractExpr)
children = (x,)
Expand Down
4 changes: 2 additions & 2 deletions src/atoms/max.jl
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ export max, pos, hinge_loss
type MaxAtom <: AbstractExpr
head::Symbol
id_hash::UInt64
children::@compat Tuple{AbstractExpr, AbstractExpr}
size::@compat Tuple{Int, Int}
children::Tuple{AbstractExpr, AbstractExpr}
size::Tuple{Int, Int}

function MaxAtom(x::AbstractExpr, y::AbstractExpr)
if x.size == y.size
Expand Down
4 changes: 2 additions & 2 deletions src/atoms/maximum.jl
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ export maximum
type MaximumAtom <: AbstractExpr
head::Symbol
id_hash::UInt64
children::@compat Tuple{AbstractExpr}
size::@compat Tuple{Int, Int}
children::Tuple{AbstractExpr}
size::Tuple{Int, Int}

function MaximumAtom(x::AbstractExpr)
children = (x,)
Expand Down
4 changes: 2 additions & 2 deletions src/atoms/min.jl
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ export min, neg
type MinAtom <: AbstractExpr
head::Symbol
id_hash::UInt64
children::@compat Tuple{AbstractExpr, AbstractExpr}
size::@compat Tuple{Int, Int}
children::Tuple{AbstractExpr, AbstractExpr}
size::Tuple{Int, Int}

function MinAtom(x::AbstractExpr, y::AbstractExpr)
if x.size == y.size
Expand Down
4 changes: 2 additions & 2 deletions src/atoms/minimum.jl
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ export minimum
type MinimumAtom <: AbstractExpr
head::Symbol
id_hash::UInt64
children::@compat Tuple{AbstractExpr}
size::@compat Tuple{Int, Int}
children::Tuple{AbstractExpr}
size::Tuple{Int, Int}

function MinimumAtom(x::AbstractExpr)
children = (x,)
Expand Down
8 changes: 4 additions & 4 deletions src/atoms/sdp_cone/lambda_min_max.jl
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ export lambdamax, lambdamin
type LambdaMaxAtom <: AbstractExpr
head::Symbol
id_hash::UInt64
children::@compat Tuple{AbstractExpr}
size::@compat Tuple{Int, Int}
children::Tuple{AbstractExpr}
size::Tuple{Int, Int}

function LambdaMaxAtom(x::AbstractExpr)
children = (x,)
Expand Down Expand Up @@ -65,8 +65,8 @@ end
type LambdaMinAtom <: AbstractExpr
head::Symbol
id_hash::UInt64
children::@compat Tuple{AbstractExpr}
size::@compat Tuple{Int, Int}
children::Tuple{AbstractExpr}
size::Tuple{Int, Int}

function LambdaMinAtom(x::AbstractExpr)
children = (x,)
Expand Down
4 changes: 2 additions & 2 deletions src/atoms/sdp_cone/matrixfrac.jl
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ export matrixfrac
type MatrixFracAtom <: AbstractExpr
head::Symbol
id_hash::UInt64
children::@compat Tuple{AbstractExpr, AbstractExpr}
size::@compat Tuple{Int, Int}
children::Tuple{AbstractExpr, AbstractExpr}
size::Tuple{Int, Int}

function MatrixFracAtom(x::AbstractExpr, P::AbstractExpr)
if x.size[2] != 1
Expand Down
6 changes: 3 additions & 3 deletions src/atoms/sdp_cone/nuclearnorm.jl
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ export nuclearnorm
type NuclearNormAtom <: AbstractExpr
head::Symbol
id_hash::UInt64
children::@compat Tuple{AbstractExpr}
size::@compat Tuple{Int, Int}
children::Tuple{AbstractExpr}
size::Tuple{Int, Int}

function NuclearNormAtom(x::AbstractExpr)
children = (x,)
Expand Down Expand Up @@ -55,4 +55,4 @@ function conic_form!(x::NuclearNormAtom, unique_conic_forms)
cache_conic_form!(unique_conic_forms, x, p)
end
return get_conic_form(unique_conic_forms, x)
end
end
4 changes: 2 additions & 2 deletions src/atoms/sdp_cone/operatornorm.jl
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ export operatornorm, sigmamax
type OperatorNormAtom <: AbstractExpr
head::Symbol
id_hash::UInt64
children::@compat Tuple{AbstractExpr}
size::@compat Tuple{Int, Int}
children::Tuple{AbstractExpr}
size::Tuple{Int, Int}

function OperatorNormAtom(x::AbstractExpr)
children = (x,)
Expand Down
4 changes: 2 additions & 2 deletions src/atoms/sdp_cone/sumlargesteigs.jl
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ export sumlargesteigs
type SumLargestEigs <: AbstractExpr
head::Symbol
id_hash::UInt64
children::@compat Tuple{AbstractExpr, AbstractExpr}
size::@compat Tuple{Int, Int}
children::Tuple{AbstractExpr, AbstractExpr}
size::Tuple{Int, Int}

function SumLargestEigs(x::AbstractExpr, k::AbstractExpr)
children = (x, k)
Expand Down
4 changes: 2 additions & 2 deletions src/atoms/second_order_cone/geomean.jl
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ export sign, monotonicity, curvature, conic_form!
type GeoMeanAtom <: AbstractExpr
head::Symbol
id_hash::UInt64
children::@compat Tuple{AbstractExpr, AbstractExpr}
size::@compat Tuple{Int, Int}
children::Tuple{AbstractExpr, AbstractExpr}
size::Tuple{Int, Int}

function GeoMeanAtom(x::AbstractExpr, y::AbstractExpr)
if x.size != y.size
Expand Down
4 changes: 2 additions & 2 deletions src/atoms/second_order_cone/norm2.jl
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ export sign, monotonicity, curvature, conic_form!
type EucNormAtom <: AbstractExpr
head::Symbol
id_hash::UInt64
children::@compat Tuple{AbstractExpr}
size::@compat Tuple{Int, Int}
children::Tuple{AbstractExpr}
size::Tuple{Int, Int}

function EucNormAtom(x::AbstractExpr)
children = (x,)
Expand Down
Loading

0 comments on commit 5c34fc2

Please sign in to comment.