| 1 |
/* |
| 2 |
* Copyright (C) 1996-2011 Daniel Waggoner |
| 3 |
* |
| 4 |
* This free software: you can redistribute it and/or modify |
| 5 |
* it under the terms of the GNU General Public License as published by |
| 6 |
* the Free Software Foundation, either version 3 of the License, or |
| 7 |
* (at your option) any later version. |
| 8 |
* |
| 9 |
* It is distributed in the hope that it will be useful, |
| 10 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 11 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 12 |
* GNU General Public License for more details. |
| 13 |
* |
| 14 |
* If you did not received a copy of the GNU General Public License |
| 15 |
* with this software, see <http://www.gnu.org/licenses/>. |
| 16 |
*/ |
| 17 |
|
| 18 |
#ifndef __RANDOM_MATRIX__ |
| 19 |
#define __RANDOM_MATRIX__ |
| 20 |
|
| 21 |
#include "dw_matrix.h" |
| 22 |
|
| 23 |
#ifdef __cplusplus |
| 24 |
extern "C" |
| 25 |
{ |
| 26 |
#endif |
| 27 |
|
| 28 |
/* Random Matrices and Vectors */ |
| 29 |
TVector dw_UniformVector(TVector x); |
| 30 |
TMatrix dw_UniformMatrix(TMatrix X); |
| 31 |
TVector dw_NormalVector(TVector x); |
| 32 |
TMatrix dw_NormalMatrix(TMatrix X); |
| 33 |
TVector dw_TruncatedNormalVector(TVector x, TMatrix R, TVector al, TVector au); |
| 34 |
TVector dw_LogNormalVector(TVector x, PRECISION mean, PRECISION standard_deviation); |
| 35 |
TMatrix dw_GammaMatrix(TMatrix X, TMatrix A, TMatrix B); |
| 36 |
TMatrix dw_Wishart(TMatrix X, TMatrix S, int nu); |
| 37 |
TVector dw_StudentT(TVector x, TMatrix T, int nu); |
| 38 |
TMatrix dw_UniformOrthogonal(TMatrix Q); |
| 39 |
TVector dw_UniformUnitSphere(TVector x); |
| 40 |
TVector dw_UniformUnitBall(TVector x); |
| 41 |
|
| 42 |
#ifdef __cplusplus |
| 43 |
} |
| 44 |
#endif |
| 45 |
|
| 46 |
#endif |