Woolz Image Processing  Version 1.7.5
AlgType.h File Reference

Type definitions for the Woolz numerical algorithm library. More...

Go to the source code of this file.

Data Structures

struct  _AlgMatrix
 A union of all valid matrix types. Typedef: AlgMatrix.. More...
 
struct  _AlgMatrixCore
 A core matrix type with members common to all matrix types. Typedef: AlgMatrixCore. More...
 
struct  _AlgMatrixRect
 Rectangular matrix. Typedef: AlgMatrixRect. More...
 
struct  _AlgMatrixSym
 Symmetric matrix. Typedef: AlgMatrixRect. More...
 
struct  _AlgMatrixLLRE
 Entry in the linked list row matrix. Typedef: AlgMatrixLLRE. More...
 
struct  _AlgMatrixLLR
 
struct  _AlgMatrixTriple
 
struct  _ComplexD
 Complex number data type. Typedef: ComplexD. More...
 

Macros

#define ALG_MAX(X, Y)   (((X)>(Y))?(X):(Y))
 
#define ALG_MIN(X, Y)   (((X)<(Y))?(X):(Y))
 
#define ALG_MAXIDX(X, Y)   (((X)>(Y))?(0):(1))
 
#define ALG_MINIDX(X, Y)   (((X)<(Y))?(0):(1))
 
#define ALG_ABS(X)   (((X)>0)?(X):(-(X)))
 
#define ALG_NINT(X)   ((int)(((X)<0)?((X)-(0.5)):((X)+(0.5))))
 
#define ALG_SQR(X)   ((X)*(X))
 
#define ALG_MAX3(X, Y, Z)   (((X)>(Y))?(((X)>(Z))?(X):(Z)):(((Y)>(Z))?(Y):(Z)))
 
#define ALG_MIN3(X, Y, Z)   (((X)<(Y))?(((X)<(Z))?(X):(Z)):(((Y)<(Z))?(Y):(Z)))
 
#define ALG_MAXIDX3(X, Y, Z)   (((X)>(Y))?(((X)>(Z))?(0):(3)):(((Y)>(Z))?(1):(3)))
 
#define ALG_MININD3(X, Y, Z)   (((X)<(Y))?(((X)<(Z))?(0):(3)):(((Y)<(Z))?(1):(3)))
 
#define ALG_DETERMINANT_4(M)   ((((M)[0])*((M)[3]))-(((M)[1])*((M)[2])))
 
#define ALG_DETERMINANT_9(M)
 
#define ALG_M_E   (2.7182818284590452354)
 
#define ALG_M_LOG2E   (1.4426950408889634074)
 
#define ALG_M_LOG10E   (0.43429448190325182765)
 
#define ALG_M_LN2   (0.69314718055994530942)
 
#define ALG_M_LN10   (2.30258509299404568402)
 
#define ALG_M_PI   (3.14159265358979323846)
 
#define ALG_M_PI_2   (1.57079632679489661923)
 
#define ALG_M_PI_4   (0.78539816339744830961)
 
#define ALG_M_1_PI   (0.31830988618379067154)
 
#define ALG_M_2_PI   (0.63661977236758134308)
 
#define ALG_M_2_SQRTPI   (1.12837916709551257390)
 
#define ALG_M_SQRT2   (1.41421356237309504880)
 
#define ALG_M_SQRT3   (1.73205080756887729353)
 
#define ALG_M_SQRT1_2   (0.70710678118654752440)
 
#define ALG_DBL_TOLLERANCE   (1.0E-9)
 
#define ALG_DBG_FN   (*algDbgOutFn)
 
#define ALG_DBG(F, M)    ((((F)&(algDbgMask))==(F))?ALG_DBG_FN M:ALG_ERR_NONE)
 

Typedefs

typedef enum _AlgDistribution AlgDistribution
 
typedef enum _AlgMatrixType AlgMatrixType
 
typedef union _AlgMatrix AlgMatrix
 
typedef struct _AlgMatrixCore AlgMatrixCore
 
typedef struct _AlgMatrixRect AlgMatrixRect
 
typedef struct _AlgMatrixSym AlgMatrixSym
 
typedef struct _AlgMatrixLLRE AlgMatrixLLRE
 
typedef struct _AlgMatrixLLR AlgMatrixLLR
 
typedef struct _AlgMatrixTriple AlgMatrixTriple
 
typedef enum _AlgPadType AlgPadType
 
typedef struct _ComplexD ComplexD
 
typedef enum _AlgError AlgError
 
typedef enum _AlgDbgMask AlgDbgMask
 
typedef AlgError(* AlgDbgFn) (char *,...)
 

Enumerations

enum  _AlgDistribution {
  ALG_DISTRIBUTION_NORMAL,
  ALG_DISTRIBUTION_EXP,
  ALG_DISTRIBUTION_POISSON,
  ALG_DISTRIBUTION_BINOMIAL
}
 Statistical distributions. Typedef: AlgDistribution. More...
 
enum  _AlgMatrixType {
  ALG_MATRIX_NULL = 0,
  ALG_MATRIX_RECT,
  ALG_MATRIX_SYM,
  ALG_MATRIX_LLR
}
 Matrix representations. Typedef: AlgMatrixType. More...
 
enum  _AlgPadType {
  ALG_PAD_NONE,
  ALG_PAD_ZERO,
  ALG_PAD_END,
  ALG_PAD_VALUE
}
 Types of daat padding. Typedef: AlgPadType. More...
 
enum  _AlgError {
  ALG_ERR_NONE = (0),
  ALG_ERR_CONVERGENCE,
  ALG_ERR_DIVZERO,
  ALG_ERR_FUNC,
  ALG_ERR_MALLOC,
  ALG_ERR_MATRIX_CONDITION,
  ALG_ERR_MATRIX_HOMOGENEOUS,
  ALG_ERR_MATRIX_SINGULAR,
  ALG_ERR_MATRIX_TYPE,
  ALG_ERR_NONGLOBAL,
  ALG_ERR_READ,
  ALG_ERR_WRITE,
  ALG_ERR_MAX
}
 
enum  _AlgDbgMask {
  ALG_DBG_NONE = (0),
  ALG_DBG_LVL_1 = (1),
  ALG_DBG_LVL_2 = (1<<1),
  ALG_DBG_LVL_3 = (1<<2),
  ALG_DBG_LVL_FN = (1<<3)
}
 

Variables

AlgDbgFn algDbgOutFn
 

Detailed Description

Type definitions for the Woolz numerical algorithm library.

Author
Bill Hill
Date
March 1999
Version
Id
a08b6cb07478909eef9d9f1671c6211bb8270c18
Address: MRC Human Genetics Unit, MRC Institute of Genetics and Molecular Medicine, University of Edinburgh, Western General Hospital, Edinburgh, EH4 2XU, UK.
Copyright (C), [2012], The University Court of the University of Edinburgh, Old College, Edinburgh, UK.

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.

Macro Definition Documentation

#define ALG_MAXIDX (   X,
 
)    (((X)>(Y))?(0):(1))
#define ALG_MINIDX (   X,
 
)    (((X)<(Y))?(0):(1))
#define ALG_ABS (   X)    (((X)>0)?(X):(-(X)))
#define ALG_NINT (   X)    ((int)(((X)<0)?((X)-(0.5)):((X)+(0.5))))
#define ALG_SQR (   X)    ((X)*(X))
#define ALG_MAX3 (   X,
  Y,
 
)    (((X)>(Y))?(((X)>(Z))?(X):(Z)):(((Y)>(Z))?(Y):(Z)))
#define ALG_MIN3 (   X,
  Y,
 
)    (((X)<(Y))?(((X)<(Z))?(X):(Z)):(((Y)<(Z))?(Y):(Z)))
#define ALG_MAXIDX3 (   X,
  Y,
 
)    (((X)>(Y))?(((X)>(Z))?(0):(3)):(((Y)>(Z))?(1):(3)))
#define ALG_MININD3 (   X,
  Y,
 
)    (((X)<(Y))?(((X)<(Z))?(0):(3)):(((Y)<(Z))?(1):(3)))
#define ALG_DETERMINANT_4 (   M)    ((((M)[0])*((M)[3]))-(((M)[1])*((M)[2])))
#define ALG_DETERMINANT_9 (   M)
Value:
((((M)[0])*((M)[4])*((M)[8]))-(((M)[0])*((M)[5])*((M)[7]))+ \
(((M)[1])*((M)[5])*((M)[6]))-(((M)[1])*((M)[3])*((M)[8]))+ \
(((M)[2])*((M)[3])*((M)[7]))-(((M)[2])*((M)[4])*((M)[6])))
#define ALG_M_E   (2.7182818284590452354)
#define ALG_M_LOG2E   (1.4426950408889634074)
#define ALG_M_LOG10E   (0.43429448190325182765)
#define ALG_M_LN2   (0.69314718055994530942)
#define ALG_M_LN10   (2.30258509299404568402)
#define ALG_M_PI_2   (1.57079632679489661923)
#define ALG_M_PI_4   (0.78539816339744830961)
#define ALG_M_1_PI   (0.31830988618379067154)
#define ALG_M_2_PI   (0.63661977236758134308)
#define ALG_M_2_SQRTPI   (1.12837916709551257390)
#define ALG_M_SQRT2   (1.41421356237309504880)
#define ALG_M_SQRT3   (1.73205080756887729353)
#define ALG_M_SQRT1_2   (0.70710678118654752440)
#define ALG_DBG_FN   (*algDbgOutFn)

Typedef Documentation

typedef union _AlgMatrix AlgMatrix
typedef struct _AlgMatrixCore AlgMatrixCore
typedef struct _AlgMatrixRect AlgMatrixRect
typedef struct _AlgMatrixSym AlgMatrixSym
typedef struct _AlgMatrixLLRE AlgMatrixLLRE
typedef struct _AlgMatrixLLR AlgMatrixLLR
typedef enum _AlgPadType AlgPadType
typedef struct _ComplexD ComplexD
typedef enum _AlgError AlgError
typedef enum _AlgDbgMask AlgDbgMask
typedef AlgError(* AlgDbgFn) (char *,...)

Enumeration Type Documentation

Statistical distributions. Typedef: AlgDistribution.

Enumerator
ALG_DISTRIBUTION_NORMAL 
ALG_DISTRIBUTION_EXP 
ALG_DISTRIBUTION_POISSON 
ALG_DISTRIBUTION_BINOMIAL 

Matrix representations. Typedef: AlgMatrixType.

Enumerator
ALG_MATRIX_NULL 

A NULL matric with no elements.

ALG_MATRIX_RECT 

Rectangular matrix, with storage for each element. These matrices should be allocated using the libAlc array allocation functions.

ALG_MATRIX_SYM 

Symmetric matrix, with storage for the upper triangle only. These matrices should be allocated using the libAlc symmetric array allocation functions.

ALG_MATRIX_LLR 

Sparse matrix stored in linked list row format.

Types of daat padding. Typedef: AlgPadType.

Enumerator
ALG_PAD_NONE 

No padding, same as padding with zeros.

ALG_PAD_ZERO 

Pad data with zeros.

ALG_PAD_END 

Pad data with first/last data values.

ALG_PAD_VALUE 

Pad data with given value.

enum _AlgError
Enumerator
ALG_ERR_NONE 
ALG_ERR_CONVERGENCE 

Failure to converge.

ALG_ERR_DIVZERO 

Divide by zero.

ALG_ERR_FUNC 

Function parameters invalid.

ALG_ERR_MALLOC 

Memory allocation failure.

ALG_ERR_MATRIX_CONDITION 

Matrix condition number out of range.

ALG_ERR_MATRIX_HOMOGENEOUS 

Homogeneous matrix.

ALG_ERR_MATRIX_SINGULAR 

Singular matrix.

ALG_ERR_MATRIX_TYPE 

Invalid matrix type given.

ALG_ERR_NONGLOBAL 

Finds local solution, but fails to global solution.

ALG_ERR_READ 

Read failure.

ALG_ERR_WRITE 

Write failure.

ALG_ERR_MAX 
Enumerator
ALG_DBG_NONE 
ALG_DBG_LVL_1 
ALG_DBG_LVL_2 
ALG_DBG_LVL_3 
ALG_DBG_LVL_FN 

Variable Documentation

AlgDbgFn algDbgOutFn