From 4ecf055cb0916ff3f460184955839845ef38f8a4 Mon Sep 17 00:00:00 2001 From: Raphael Javaux Date: Thu, 5 Feb 2015 12:36:04 +0100 Subject: [PATCH] Minor documentation improvements --- changelog | 3 +++ friday.cabal | 2 +- src/Vision/Image/Class.hs | 8 ++++++++ 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/changelog b/changelog index 44b195b..775691a 100644 --- a/changelog +++ b/changelog @@ -1,5 +1,8 @@ -*-change-log-*- +v0.2.0.2 February 2014 + * Minor documentation improvements. + v0.2.0.1 January 2014 * Setup.hs script. diff --git a/friday.cabal b/friday.cabal index 3b5d625..901330c 100644 --- a/friday.cabal +++ b/friday.cabal @@ -2,7 +2,7 @@ name: friday -- +-+------- breaking API changes -- | | +----- non-breaking API additions -- | | | +--- code changes with no API change -version: 0.2.0.1 +version: 0.2.0.2 synopsis: A functional image processing library for Haskell. homepage: https://github.com/RaphaelJ/friday license: LGPL-3 diff --git a/src/Vision/Image/Class.hs b/src/Vision/Image/Class.hs index c85e89f..cd5a64d 100644 --- a/src/Vision/Image/Class.hs +++ b/src/Vision/Image/Class.hs @@ -31,6 +31,7 @@ class Pixel p where type PixelChannel p -- | Returns the number of channels of the pixel. + -- -- Must not consume 'p' (could be 'undefined'). pixNChannels :: p -> Int @@ -124,6 +125,7 @@ class Storable (ImagePixel i) => MaskedImage i where type ImageChannel i = PixelChannel (ImagePixel i) -- | Provides an abstraction over the internal representation of an image. +-- -- Image origin is located in the lower left corner. class MaskedImage i => Image i where -- | Returns the pixel value at 'Z :. y :. x'. @@ -155,8 +157,10 @@ class FromFunction i where -- | Generates an image by calling the last function for each pixel of the -- constructed image. + -- -- The first function is called for each line, generating a line invariant -- value. + -- -- This function is faster for some image representations as some recurring -- computation can be cached. fromFunctionLine :: Size -> (Int -> a) @@ -167,8 +171,10 @@ class FromFunction i where -- | Generates an image by calling the last function for each pixel of the -- constructed image. + -- -- The first function is called for each column, generating a column -- invariant value. + -- -- This function *can* be faster for some image representations as some -- recurring computations can be cached. However, it may requires a vector -- allocation for these values. If the column invariant is cheap to @@ -181,8 +187,10 @@ class FromFunction i where -- | Generates an image by calling the last function for each pixel of the -- constructed image. + -- -- The two first functions are called for each line and for each column, -- respectively, generating common line and column invariant values. + -- -- This function is faster for some image representations as some recurring -- computation can be cached. However, it may requires a vector -- allocation for column values. If the column invariant is cheap to