packages feed

resistor-cube 0.0.1.2 → 0.0.1.3

raw patch · 2 files changed

+10/−10 lines, 2 filesdep ~comfort-arraydep ~lapack

Dependency ranges changed: comfort-array, lapack

Files

resistor-cube.cabal view
@@ -1,5 +1,5 @@ Name:                resistor-cube-Version:             0.0.1.2+Version:             0.0.1.3 Synopsis:            Compute total resistance of a cube of resistors Description:   This is an example of how to compute the total resistance@@ -11,7 +11,7 @@   * For an explanation see <http://code.henning-thielemann.de/bob2019/main.pdf>.   .   * For a generalized version see the tests of the @linear-circuit@ package.-Homepage:            http://hub.darcs.net/thielema/resistor-cube+Homepage:            https://hub.darcs.net/thielema/resistor-cube License:             BSD3 License-File:        LICENSE Author:              Henning Thielemann@@ -21,19 +21,19 @@ Cabal-Version:       >=1.10  Source-Repository this-  Tag:         0.0.1.2+  Tag:         0.0.1.3   Type:        darcs-  Location:    http://hub.darcs.net/thielema/resistor-cube+  Location:    https://hub.darcs.net/thielema/resistor-cube  Source-Repository head   Type:        darcs-  Location:    http://hub.darcs.net/thielema/resistor-cube+  Location:    https://hub.darcs.net/thielema/resistor-cube  Executable resistor-cube   Main-is:             Main.hs   Build-Depends:-    lapack >=0.3.1 && <0.4,-    comfort-array >=0.4 && <0.5,+    lapack >=0.4 && <0.5,+    comfort-array >=0.5 && <0.6,     base >=4.5 && <5   Hs-Source-Dirs:      src   Default-Language:    Haskell2010
src/Main.hs view
@@ -17,7 +17,7 @@ import qualified Data.Array.Comfort.Storable as Array import qualified Data.Array.Comfort.Shape as Shape import Data.Array.Comfort.Storable ((!))-import Data.Array.Comfort.Shape ((:+:)((:+:)))+import Data.Array.Comfort.Shape ((::+)((::+)))   data Coord = C0 | C1 deriving (Eq, Ord, Show, Enum, Bounded)@@ -68,11 +68,11 @@ resistances = Vector.one edgeShape  -fullMatrix :: Matrix.Symmetric (():+:(EdgeShape:+:CornerShape)) Double+fullMatrix :: Matrix.Symmetric (()::+EdgeShape::+CornerShape) Double fullMatrix =    let order = MatrixShape.RowMajor        symmetricZero sh = Matrix.zero $ MatrixShape.symmetric order sh-       unit = Vector.unit (edgeShape:+:cornerShape) (Right sourceCorner)+       unit = Vector.unit (edgeShape::+cornerShape) (Right sourceCorner)    in (symmetricZero (), Matrix.singleRow order unit)       #%%%#       (Symmetric.diagonal order resistances, voltageMatrix)