Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions hTensor.cabal
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Name: hTensor
Version: 0.9.1
Version: 0.9.2
License: BSD3
License-file: LICENSE
Author: Alberto Ruiz
Expand Down Expand Up @@ -59,4 +59,3 @@ library
source-repository head
type: git
location: https://github.com/AlbertoRuiz/hTensor

2 changes: 1 addition & 1 deletion lib/Numeric/LinearAlgebra/Array.hs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{-# LANGUAGE UndecidableInstances #-}
{-# LANGUAGE UndecidableInstances, FlexibleContexts #-}
-----------------------------------------------------------------------------
-- |
-- Module : Numeric.LinearAlgebra.Array
Expand Down
1 change: 1 addition & 0 deletions lib/Numeric/LinearAlgebra/Array/Decomposition.hs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ module Numeric.LinearAlgebra.Array.Decomposition (
ALSParam(..), defaultParameters
) where

import Prelude hiding ((<>))
import Numeric.LinearAlgebra.Array
import Numeric.LinearAlgebra.Array.Internal(seqIdx,namesR,sizesR,renameRaw)
import Numeric.LinearAlgebra.Array.Util
Expand Down
12 changes: 6 additions & 6 deletions lib/Numeric/LinearAlgebra/Array/Internal.hs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
--
-- The arrays provided by this library are immutable, built on top of hmatrix
-- structures.
-- Operations work on complete structures (indexless), and dimensions have \"names\",
-- Operations work on complete structures (indexless), and dimensions have \"names\",
-- in order to select the desired contractions in tensor computations.
--
-- This module contains auxiliary functions not required by the end user.
Expand Down Expand Up @@ -58,6 +58,7 @@ module Numeric.LinearAlgebra.Array.Internal (
debug
) where

import Prelude hiding((<>))
import qualified Numeric.LinearAlgebra.Devel as LA
import qualified Numeric.LinearAlgebra as LA
import Numeric.LinearAlgebra hiding (size,scalar,ident)
Expand Down Expand Up @@ -245,7 +246,7 @@ matrixatorFree t nr = (reshape s (coords q), nc) where
s = product (map (flip size t) nc)

-- | Create a list of the substructures at the given level.
parts :: (Coord t)
parts :: (Coord t)
=> NArray i t
-> Name -- ^ index to expand
-> [NArray i t]
Expand Down Expand Up @@ -366,13 +367,13 @@ basisOf t = map (dims t `mkNArray`) $ toRows (ident . dim . coords $ t)
-- -- cmap f (A d v) = A d (cmap f v)
-- conj (A d v) = A d (conj v)
-- complex' (A d v) = A d (complex' v) -- mapArray without constraints
--
--
-- toComplex (A d1 r, A d2 c) -- zipArray without constraints
-- | d1==d2 = A d1 (toComplex (r,c))
-- | otherwise = error "toComplex on arrays with different structure"
--
--
-- fromComplex (A d v) = (A d *** A d) (fromComplex v)
--
--
-- single' (A d v) = A d (single' v)
-- double' (A d v) = A d (double' v)

Expand Down Expand Up @@ -559,4 +560,3 @@ smartProduct = contractTensors . foldl' (flip addTensor) dat0 where
-- | sequence of n indices with given prefix
seqIdx :: Int -> String -> [Name]
seqIdx n prefix = [prefix ++ show k | k <- [1 .. n] ]

4 changes: 1 addition & 3 deletions lib/Numeric/LinearAlgebra/Array/Simple.hs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ instance Compat None where
type Array t = NArray None t

instance (Coord t) => Show (Array t) where
show t | null (dims t) = "scalar "++ show (coords t !0)
show t | null (dims t) = "scalar "++ show (coords t ! 0)
| order t == 1 = "index " ++ show n ++" " ++ (show . toList . coords $ t)
| otherwise = "index "++ show n ++ " [" ++ ps ++ "]"
where n = head (namesR t)
Expand All @@ -56,5 +56,3 @@ listArray :: (Coord t)
-> Array t
listArray ds cs = mkNArray dms (product ds |> (cs ++ repeat 0))
where dms = zipWith3 Idx (repeat None) ds (map show [1::Int ..])