Skip to content

Commit

Permalink
Merge branch 'release-0.7.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
martinholters committed May 8, 2018
2 parents a1d3618 + d269fdb commit 79baa1c
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 8 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# ACME.jl - Analog Circuit Modeling and Emulation for Julia

[![Join the chat at https://gitter.im/HSU-ANT/ACME.jl](https://badges.gitter.im/HSU-ANT/ACME.jl.svg)](https://gitter.im/HSU-ANT/ACME.jl?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
[![Documentation](https://img.shields.io/badge/docs-v0.7.0-blue.svg)](https://hsu-ant.github.io/ACME.jl/v0.7.0)
[![Documentation](https://img.shields.io/badge/docs-v0.7.1-blue.svg)](https://hsu-ant.github.io/ACME.jl/v0.7.1)

ACME is a [Julia](http://julialang.org/) package for the simulation of
electrical circuits, focusing on audio effect circuits. It allows to
Expand Down Expand Up @@ -122,7 +122,7 @@ fail to run altogether.

## Moving on

There is some [documentation](https://hsu-ant.github.io/ACME.jl/v0.7.0)
There is some [documentation](https://hsu-ant.github.io/ACME.jl/v0.7.1)
available for how
to use ACME. Additionally, you can take a look at the examples that can be found
in the `examples` directory below `Pkg.dir("ACME")`.
Expand Down
2 changes: 1 addition & 1 deletion REQUIRE
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
julia 0.6
Compat 0.61.0
Compat 0.64.0
DataStructures 0.2.9
IterTools 0.1.0
ProgressMeter 0.2.1
4 changes: 2 additions & 2 deletions src/ACME.jl
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ function model_matrices(circ::Circuit, t::Rational{BigInt})
merge!(res, Dict(zip([:v0 :ev :dv; :i0 :ei :di; :x0 :b :a; :q0 :eq_full :dq_full],
matsplit(x, rowsizes, [1; nu(circ); nx(circ)]))))
for v in (:v0, :i0, :x0, :q0)
res[v] = squeeze(res[v], 2)
res[v] = squeeze(res[v], dims=2)
end

p = [pv(circ) pi(circ) px(circ)//2+pxd(circ)//t pq(circ)]
Expand Down Expand Up @@ -741,7 +741,7 @@ gensolve(a, b, thresh=0.1) =

function rank_factorize(a::SparseMatrixCSC)
f = a
nullspace = gensolve(a', spzeros(size(a, 2), 0))[2]
nullspace = gensolve(a', spzeros(eltype(a), size(a, 2), 0))[2]
c = Matrix{eltype(a)}(I, size(a, 1), size(a, 1))
while size(nullspace, 2) > 0
i, j = argmax(abs.(nullspace)).I
Expand Down
5 changes: 3 additions & 2 deletions src/circuit.jl
Original file line number Diff line number Diff line change
Expand Up @@ -286,8 +286,9 @@ function topomat!(incidence::SparseMatrixCSC{T}) where {T<:Integer}

dl = ti[:, (!).(t)]
tv = spzeros(T, size(dl, 2), size(incidence, 2))
tv[:, t] = -dl'
tv[:, (!).(t)] = SparseMatrixCSC{T}(I, size(dl, 2), size(dl, 2))
# findall here works around JuliaLang/julia#27013 (introdcued in 0.7.0-DEV.4983)
tv[:, findall(t)] = -dl'
tv[:, findall((!).(t))] = SparseMatrixCSC{T}(I, size(dl, 2), size(dl, 2))

tv, ti
end
Expand Down
2 changes: 1 addition & 1 deletion test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ end
@testset "gensolve/rank_factorize" begin
a = Rational{BigInt}[1 1 1; 1 1 2; 1 2 1; 1 2 2; 2 1 1; 2 1 2]
b = Rational{BigInt}[1 2 3 4 5 6; 6 5 4 3 2 1; 1 0 1 0 1 0]
nullspace = ACME.gensolve(sparse(a'), spzeros(size(a, 2), 0))[2]
nullspace = ACME.gensolve(sparse(a'), spzeros(Rational{BigInt}, size(a, 2), 0))[2]
@test nullspace'*a == spzeros(3, 3)
c, f = ACME.rank_factorize(sparse(a * b))
@test c*f == a*b
Expand Down

0 comments on commit 79baa1c

Please sign in to comment.