The outage for Sunday 24th November has been cancelled.
Bioplib
Protein Structure C Library
 All Data Structures Files Functions Variables Typedefs Macros Pages
MathUtil.h
Go to the documentation of this file.
1 /************************************************************************/
2 /**
3 
4  \file MathUtil.h
5 
6  \version V1.8
7  \date 20.07.15
8  \brief Prototypes, etc. for maths utility routines
9 
10  \copyright (c) UCL / Dr. Andrew C. R. Martin 1994-2015
11  \author Dr. Andrew C. R. Martin
12  \par
13  Institute of Structural & Molecular Biology,
14  University College London,
15  Gower Street,
16  London.
17  WC1E 6BT.
18  \par
19  andrew@bioinf.org.uk
20  andrew.martin@ucl.ac.uk
21 
22 **************************************************************************
23 
24  This code is NOT IN THE PUBLIC DOMAIN, but it may be copied
25  according to the conditions laid out in the accompanying file
26  COPYING.DOC.
27 
28  The code may be modified as required, but any modifications must be
29  documented so that the person responsible can be identified.
30 
31  The code may not be sold commercially or included as part of a
32  commercial product except as described in the file COPYING.DOC.
33 
34 **************************************************************************
35 
36  Description:
37  ============
38 
39 
40 **************************************************************************
41 
42  Usage:
43  ======
44 
45 **************************************************************************
46 
47  Revision History:
48  =================
49 - V1.0 01.03.94 Original
50 - V1.1 18.06.96 Added vector routines
51 - V1.2 10.09.96 Added combperm.c routines
52 - V1.3 06.10.98 Added VecAdd3()
53 - V1.4 07.07.14 Use bl prefix for functions By: CTP
54 - V1.5 31.07.14 Updated deprecation: Removed deprecated.h and added
55  prototypes for renamed functions. By: CTP
56 - V1.6 14.08.14 Moved deprecated function prototypes to deprecated.h
57  By: CTP
58 - V1.7 15.05.15 Added blIsPrime() and blFindNextPrime() By: ACRM
59 - V1.8 20.07.15 Renamed blDistPtVect() to blDistPtLine()
60 
61 *************************************************************************/
62 #ifndef _MATHUTIL_H
63 #define _MATHUTIL_H
64 
65 #include <math.h>
66 #include "MathType.h"
67 #include "SysDefs.h"
68 
69 /* Prototypes */
70 void blCalcSD(REAL val, int action, REAL *mean, REAL *SD);
71 void blCalcExtSD(REAL val, int action, REAL *Sx, REAL *SxSq,
72  int *NValues, REAL *mean, REAL *SD);
73 REAL blPearson(REAL *x, REAL *y, int NItem);
74 REAL blPearson1(REAL *x, REAL *y, int NItem);
75 
76 void blCrossProd3(VEC3F *Out, VEC3F In1, VEC3F In2);
77 void blVecSub3(VEC3F *Out, VEC3F In1, VEC3F In2);
78 void blVecAdd3(VEC3F *Out, VEC3F In1, VEC3F In2);
79 REAL blVecLen3(VEC3F Vec);
80 REAL blDistPtLine(VEC3F Point, VEC3F End1, VEC3F End2);
82  REAL P1x, REAL P1y, REAL P1z,
83  REAL P2x, REAL P2y, REAL P2z,
84  REAL *Rx, REAL *Ry, REAL *Rz,
85  REAL *frac);
86 ULONG blFactorial(int n);
87 ULONG blFactdiv(int n1, int n2);
88 ULONG blNPerm(int n, int r);
89 ULONG blNComb(int n, int r);
90 BOOL blIsPrime(ULONG input);
91 ULONG blFindNextPrime(ULONG input, BOOL above);
92 
93 
94 /************************************************************************/
95 /* Include deprecated functions */
96 #define _MATHUTIL_H_DEPRECATED
97 # include "deprecated.h"
98 /************************************************************************/
99 
100 #endif
short BOOL
Definition: SysDefs.h:64
void blVecAdd3(VEC3F *Out, VEC3F In1, VEC3F In2)
Definition: VecAdd3.c:95
ULONG blFactdiv(int n1, int n2)
Definition: factdiv.c:91
Redirect calls to deprecated functions.
REAL blPointLineDistance(REAL Px, REAL Py, REAL Pz, REAL P1x, REAL P1y, REAL P1z, REAL P2x, REAL P2y, REAL P2z, REAL *Rx, REAL *Ry, REAL *Rz, REAL *frac)
Definition: pldist.c:126
void blCrossProd3(VEC3F *Out, VEC3F In1, VEC3F In2)
Definition: CrossProd3.c:94
REAL blPearson(REAL *x, REAL *y, int NItem)
Definition: pearson.c:99
Definition: MathType.h:69
unsigned long ULONG
Definition: SysDefs.h:66
REAL blDistPtLine(VEC3F Point, VEC3F End1, VEC3F End2)
Definition: DistPtLine.c:100
double REAL
Definition: MathType.h:67
BOOL blIsPrime(ULONG input)
Definition: prime.c:142
ULONG blFactorial(int n)
Definition: factorial.c:89
void blVecSub3(VEC3F *Out, VEC3F In1, VEC3F In2)
Definition: VecSub3.c:94
REAL blPearson1(REAL *x, REAL *y, int NItem)
Definition: pearson1.c:98
void blCalcSD(REAL val, int action, REAL *mean, REAL *SD)
Definition: CalcSD.c:124
System-type variable type definitions.
Type definitions for maths.
ULONG blNComb(int n, int r)
Definition: NComb.c:91
ULONG blFindNextPrime(ULONG input, BOOL above)
Definition: prime.c:97
ULONG blNPerm(int n, int r)
Definition: NPerm.c:90
void blCalcExtSD(REAL val, int action, REAL *Sx, REAL *SxSq, int *NValues, REAL *mean, REAL *SD)
Definition: CalcExtSD.c:137
REAL blVecLen3(VEC3F Vec)
Definition: VecLen3.c:94