Nemo  2.3.56
Simulate forward-in-time genetic evolution in a spatially explicit, individual-based stochastic simulator
utils.h
Go to the documentation of this file.
1
30#ifndef UTILS_H
31#define UTILS_H
32
33#include "types.h"
34#include "tmatrix.h"
35#include <string>
36#include <vector>
37
38
39
40
41
42extern bool setSpatialMatrix (string param, string numColCondition, TMatrix *inMat,
43 TMatrix *outMat, unsigned int nVal, unsigned int patchNbr,
44 bool doRandomize = false);
45
46extern double my_mean (double *data, unsigned int size);
47
48extern double my_mean_no_nan (double *data, unsigned int size);
49
50extern double my_variance_with_fixed_mean (double *data, unsigned int size, double mean);
51
52extern double my_variance_with_fixed_mean_no_nan (double *data, unsigned int size, double mean);
53
54extern double my_covariance_no_nan (double *data1, double *data2,
55 unsigned int size1, unsigned int size2);
56
57extern unsigned long nChooseK(int n, int k);
58
59extern vector< vector<int> > nChooseKVec(int n, int k);
60
61#endif
A class to handle matrix in params, coerces matrix into a vector of same total size.
Definition: tmatrix.h:49
vector< vector< int > > nChooseKVec(int n, int k)
Definition: utils.cc:197
double my_variance_with_fixed_mean_no_nan(double *data, unsigned int size, double mean)
Definition: utils.cc:73
double my_mean(double *data, unsigned int size)
Definition: utils.cc:37
unsigned long nChooseK(int n, int k)
Definition: utils.cc:173
bool setSpatialMatrix(string param, string numColCondition, TMatrix *inMat, TMatrix *outMat, unsigned int nVal, unsigned int patchNbr, bool doRandomize=false)
Definition: utils.cc:114
double my_variance_with_fixed_mean(double *data, unsigned int size, double mean)
Definition: utils.cc:62
double my_mean_no_nan(double *data, unsigned int size)
Definition: utils.cc:48
double my_covariance_no_nan(double *data1, double *data2, unsigned int size1, unsigned int size2)
Definition: utils.cc:87

Generated for Nemo v2.3.56 by  doxygen 1.9.0 -- Nemo is hosted on  Download Nemo

Locations of visitors to this page
Catalogued on GSR