Skip to content

Commit

Permalink
Restructure src directory
Browse files Browse the repository at this point in the history
  • Loading branch information
nh2 committed Jul 11, 2013
1 parent 71dee73 commit ff044e9
Show file tree
Hide file tree
Showing 17 changed files with 36 additions and 36 deletions.
16 changes: 8 additions & 8 deletions apps/ExperimentMain.hs
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ module Main where

import Options.Applicative

import qualified Hopfield.Experiment
import qualified Hopfield.SmallExperiments
import qualified Hopfield.ClusterExperiments
import qualified Hopfield.Experiment2SuperAttractors
import qualified Hopfield.Experiments.Experiment
import qualified Hopfield.Experiments.SmallExperiments
import qualified Hopfield.Experiments.ClusterExperiments
import qualified Hopfield.Experiments.Experiment2SuperAttractors


data ExperimentArgs = ExperimentArgs { experimentName :: String
Expand All @@ -27,8 +27,8 @@ main = do
ExperimentArgs expName args <- execParser argParser

case expName of
"experiment" -> Hopfield.Experiment.main
"small" -> Hopfield.SmallExperiments.main
"cluster" -> Hopfield.ClusterExperiments.run args
"super" -> Hopfield.Experiment2SuperAttractors.main
"experiment" -> Hopfield.Experiments.Experiment.main
"small" -> Hopfield.Experiments.SmallExperiments.main
"cluster" -> Hopfield.Experiments.ClusterExperiments.run args
"super" -> Hopfield.Experiments.Experiment2SuperAttractors.main
_ -> error "unknown experiment"
6 changes: 3 additions & 3 deletions apps/Recognize.hs
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ import System.Directory

import Hopfield.Common
import Hopfield.Hopfield
import Hopfield.ConvertImage
import Hopfield.RestrictedBoltzmannMachine
import Hopfield.ClassificationBoltzmannMachine
import Hopfield.Images.ConvertImage
import Hopfield.Boltzmann.RestrictedBoltzmannMachine
import Hopfield.Boltzmann.ClassificationBoltzmannMachine
import Hopfield.Benchmark
import Hopfield.Util

Expand Down
24 changes: 12 additions & 12 deletions hopfield.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -15,21 +15,21 @@ library
exposed-modules:
Hopfield.Hopfield
, Hopfield.Analysis
, Hopfield.Measurement
, Hopfield.ClassificationBoltzmannMachine
, Hopfield.Benchmark
, Hopfield.Boltzmann.ClassificationBoltzmannMachine
, Hopfield.Boltzmann.RestrictedBoltzmannMachine
, Hopfield.Clusters
, Hopfield.Common
, Hopfield.ConvertImage
, Hopfield.RestrictedBoltzmannMachine
, Hopfield.Experiments.ClusterExperiments
, Hopfield.Experiments.Experiment
, Hopfield.Experiments.Experiment2SuperAttractors
, Hopfield.Experiments.ExperimentUtil
, Hopfield.Experiments.SmallExperiments
, Hopfield.Images.ConvertImage
, Hopfield.Measurement
, Hopfield.SuperAttractors
, Hopfield.Util
, Hopfield.Experiment
, Hopfield.TestUtil
, Hopfield.ExperimentUtil
, Hopfield.Benchmark
, Hopfield.SmallExperiments
, Hopfield.ClusterExperiments
, Hopfield.Experiment2SuperAttractors
, Hopfield.Util
other-modules:
hs-source-dirs:
src
Expand All @@ -52,7 +52,7 @@ library
, monad-loops >= 0.3.3.0
, split >= 0.2.1.1
c-sources:
src/Hopfield/convertImage.c
src/Hopfield/Images/convertImage.c
include-dirs:
src/Hopfield
, /usr/include/ImageMagick
Expand Down
2 changes: 1 addition & 1 deletion src/Hopfield/Benchmark.hs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module Hopfield.Benchmark where

import Hopfield.Hopfield
import Hopfield.Clusters
import Hopfield.ClusterExperiments
import Hopfield.Experiments.ClusterExperiments

bench1 :: IO ()
bench1 = print =<< experimentUsingT1NoAvg Hebbian 10 10
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{-# LANGUAGE PatternGuards, ScopedTypeVariables #-}

module Hopfield.ClassificationBoltzmannMachine where
module Hopfield.Boltzmann.ClassificationBoltzmannMachine where
-- | Base Restricted Boltzmann machine.

-- http://en.wikipedia.org/wiki/Restricted_Boltzmann_machine
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

-- | Base Restricted Boltzmann machine.
-- http://en.wikipedia.org/wiki/Restricted_Boltzmann_machine
module Hopfield.RestrictedBoltzmannMachine where
module Hopfield.Boltzmann.RestrictedBoltzmannMachine where


import Data.Maybe
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{-# LANGUAGE ParallelListComp #-}

module Hopfield.ClusterExperiments where
module Hopfield.Experiments.ClusterExperiments where
-- Cluster Experiments which were performed by Federico

import Control.Monad
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{-# LANGUAGE ParallelListComp #-}

module Hopfield.Experiment where
module Hopfield.Experiments.Experiment where

import Control.Monad (replicateM)
import Control.Monad.Random
Expand All @@ -9,7 +9,7 @@ import Test.QuickCheck.Gen (unGen)

import Hopfield.Clusters
import Hopfield.Common
import Hopfield.ExperimentUtil
import Hopfield.Experiments.ExperimentUtil
import Hopfield.Hopfield
import Hopfield.Measurement
import Hopfield.SuperAttractors
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
{-# LANGUAGE ParallelListComp #-}

-- | Performs experiments with two super attractors.
module Hopfield.Experiment2SuperAttractors where
module Hopfield.Experiments.Experiment2SuperAttractors where

import Control.Monad (replicateM)
import Control.Monad.Random
import Test.QuickCheck
import Test.QuickCheck.Gen (unGen)

import Hopfield.Common
import Hopfield.ExperimentUtil
import Hopfield.Experiments.ExperimentUtil
import Hopfield.Hopfield (LearningType (..))
import Hopfield.Measurement
import Hopfield.SuperAttractors
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{-# LANGUAGE ParallelListComp #-}

module Hopfield.ExperimentUtil where
module Hopfield.Experiments.ExperimentUtil where

import qualified Data.Vector as V

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{-# LANGUAGE ParallelListComp #-}

module Hopfield.SmallExperiments where
module Hopfield.Experiments.SmallExperiments where

-- Module use to perform small experiments that prove that Storkey learning
-- has a bigger basin size than Hebbian learning
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{-# LANGUAGE CPP, ForeignFunctionInterface #-}

module Hopfield.ConvertImage (
module Hopfield.Images.ConvertImage (
loadPicture
, CBinaryPattern (..)
) where
Expand All @@ -11,7 +11,7 @@ import Foreign.Ptr
import Foreign.Storable
import Foreign.Marshal.Array

#include "convertImage.h"
#include "Images/convertImage.h"

-- From: http://www.haskell.org/haskellwiki/FFI_cook_book
#let alignment t = "%lu", (unsigned long) offsetof(struct { char x__; t (y__); }, y__)
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion src/Hopfield/TestUtil.hs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import Test.QuickCheck

import Hopfield.Hopfield
import Hopfield.Measurement
import Hopfield.RestrictedBoltzmannMachine
import Hopfield.Boltzmann.RestrictedBoltzmannMachine
import Hopfield.Util


Expand Down

0 comments on commit ff044e9

Please sign in to comment.