Skip to content

Commit

Permalink
Merge pull request #126 from yvesx/patch-1
Browse files Browse the repository at this point in the history
got TypeError running n_queens example with 0.4.2
  • Loading branch information
madeleineudell committed Mar 5, 2016
2 parents 97c746b + 42de26d commit b081e57
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions examples/antidiag.jl
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ export antidiag, sign, monotonicity, curvature, evaluate, conic_form!
### Represents the kth diagonal of an mxn matrix as a (min(m, n) - k) x 1 vector
type AntidiagAtom <: AbstractExpr
head::Symbol
id_hash::Uint64
children::(AbstractExpr,)
size::(Int, Int)
id_hash::UInt64
children::Tuple{AbstractExpr}
size::Tuple{Int, Int}
k::Int

function AntidiagAtom(x::AbstractExpr, k::Int=0)
Expand Down Expand Up @@ -49,7 +49,7 @@ function curvature(x::AntidiagAtom)
end

function evaluate(x::AntidiagAtom)
return diag(flipud(evaluate(x.children[1])), x.k)
return diag(flipdim(evaluate(x.children[1]),1), x.k)
end

antidiag(x::AbstractExpr, k::Int=0) = AntidiagAtom(x, k)
Expand Down

0 comments on commit b081e57

Please sign in to comment.