resistor-cube 0.0.0.3 → 0.0.0.4
raw patch · 2 files changed
+3/−5 lines, 2 filesdep −transformers
Dependencies removed: transformers
Files
- resistor-cube.cabal +2/−3
- src/Main.hs +1/−2
resistor-cube.cabal view
@@ -1,5 +1,5 @@ Name: resistor-cube-Version: 0.0.0.3+Version: 0.0.0.4 Synopsis: Compute total resistance of a cube of resistors Description: This is an example of how to compute the total resistance@@ -19,7 +19,7 @@ Cabal-Version: >=1.10 Source-Repository this- Tag: 0.0.0.3+ Tag: 0.0.0.4 Type: darcs Location: http://hub.darcs.net/thielema/resistor-cube @@ -31,7 +31,6 @@ Main-is: Main.hs Build-Depends: hmatrix >=0.16 && <0.17,- transformers >=0.3 && <0.5, utility-ht >=0.0.11 && <0.1, base >=4.5 && <5 Hs-Source-Dirs: src
src/Main.hs view
@@ -54,7 +54,6 @@ (liftA3 Corner allCoords allCoords allCoords) --- ToDo: How about cyclic arrangement of dimensions? selectCornerCoords :: Dim -> Corner -> ((Coord, Coord), Coord) selectCornerCoords ed (Corner cx cy cz) = case ed of@@ -101,7 +100,7 @@ sum $ map (\d -> NC.atIndex currentVec $ flattenEdgeIndex $ Edge d C0 C0)- [minBound .. maxBound]+ allDims let cornerPot c = NC.atIndex potentialVec (flattenCornerIndex c) let totalVoltage = cornerPot destCorner - cornerPot sourceCorner print $ totalVoltage / totalCurrent