linear-circuit 0.1.0.2 → 0.1.0.3
raw patch · 2 files changed
+11/−11 lines, 2 filesdep ~comfort-arraydep ~lapackPVP ok
version bump matches the API change (PVP)
Dependency ranges changed: comfort-array, lapack
API changes (from Hackage documentation)
Files
- linear-circuit.cabal +7/−7
- src/Math/LinearCircuit.hs +4/−4
linear-circuit.cabal view
@@ -1,11 +1,11 @@ Name: linear-circuit-Version: 0.1.0.2+Version: 0.1.0.3 Synopsis: Compute resistance of linear electrical circuits Description: Compute resistance of linear electrical circuits. . For examples see test directory.-Homepage: http://hub.darcs.net/thielema/linear-circuit+Homepage: https://hub.darcs.net/thielema/linear-circuit License: BSD3 License-File: LICENSE Author: Henning Thielemann@@ -15,21 +15,21 @@ Cabal-Version: >=1.10 Source-Repository this- Tag: 0.1.0.2+ Tag: 0.1.0.3 Type: darcs- Location: http://hub.darcs.net/thielema/linear-circuit+ Location: https://hub.darcs.net/thielema/linear-circuit Source-Repository head Type: darcs- Location: http://hub.darcs.net/thielema/linear-circuit+ Location: https://hub.darcs.net/thielema/linear-circuit Library Exposed-Modules: Math.LinearCircuit Build-Depends:- lapack >=0.3.1 && <0.4,+ lapack >=0.3.1 && <0.5, netlib-ffi >=0.1.1 && <0.2,- comfort-array >=0.4 && <0.5,+ comfort-array >=0.5 && <0.6, comfort-graph >=0.0 && <0.1, containers >=0.4 && <0.7, transformers >=0.4 && <0.6,
src/Math/LinearCircuit.hs view
@@ -15,7 +15,7 @@ import qualified Data.Array.Comfort.Boxed as BoxedArray import qualified Data.Array.Comfort.Storable as Array import Data.Array.Comfort.Storable ((!))-import Data.Array.Comfort.Shape ((:+:)((:+:)))+import Data.Array.Comfort.Shape ((::+)((::+))) import Control.Monad.Trans.Identity (IdentityT(IdentityT)) @@ -40,13 +40,13 @@ fullMatrix :: (Graph.Edge edge, Ord node, Class.Floating a) => Graph edge node a nodeLabel -> node ->- Matrix.Symmetric (():+:(Set (Wrap edge node):+:Set node)) a+ Matrix.Symmetric (() ::+ Set (Wrap edge node) ::+ Set node) a fullMatrix gr src = let edges = Map.mapKeysMonotonic IdentityT $ Graph.edgeLabels gr nodes = Graph.nodeSet gr order = MatrixShape.RowMajor symmetricZero sh = Matrix.zero $ MatrixShape.symmetric order sh- unit = Vector.unit (Map.keysSet edges :+: nodes) (Right src)+ unit = Vector.unit (Map.keysSet edges ::+ nodes) (Right src) in (symmetricZero (), Matrix.singleRow order unit) #%%%# (Symmetric.diagonal order $ Array.fromMap edges,@@ -80,4 +80,4 @@ (Vector.recip $ Array.fromMap edges) (voltageMatrix nodes $ Map.keysSet edges) ix = Right dst- in (schurComplement #\| Vector.unit (() :+: nodes) ix) ! ix+ in (schurComplement #\| Vector.unit (() ::+ nodes) ix) ! ix