From c22801f32c3c459997041fb9ad27bd0ab5de372c Mon Sep 17 00:00:00 2001
From: Peter Carbonetto
Date: Thu, 1 Jun 2017 17:27:50 -0500
Subject: Removed FORCE_FLOAT from additional C++ source files.
---
src/bslmm.cpp | 2 +-
src/bslmm.h | 5 +-
src/bslmmdap.cpp | 4 +-
src/bslmmdap.h | 4 +-
src/eigenlib.h | 2 +-
src/gzstream.h | 3 +-
src/lapack.h | 2 +-
src/ldr.cpp | 207 +++++--------------------------------------------------
src/ldr.h | 50 ++++++--------
src/main.cpp | 24 ++-----
src/varcov.cpp | 6 +-
src/varcov.h | 6 +-
12 files changed, 59 insertions(+), 256 deletions(-)
(limited to 'src')
diff --git a/src/bslmm.cpp b/src/bslmm.cpp
index 0bd4234..d295fd8 100644
--- a/src/bslmm.cpp
+++ b/src/bslmm.cpp
@@ -1,6 +1,6 @@
/*
Genome-wide Efficient Mixed Model Association (GEMMA)
- Copyright (C) 2011-2017 Xiang Zhou
+ Copyright (C) 2011-2017, Xiang Zhou
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
diff --git a/src/bslmm.h b/src/bslmm.h
index 863a22d..07aac67 100644
--- a/src/bslmm.h
+++ b/src/bslmm.h
@@ -1,6 +1,6 @@
/*
Genome-wide Efficient Mixed Model Association (GEMMA)
- Copyright (C) 2011-2017 Xiang Zhou
+ Copyright (C) 2011-2017, Xiang Zhou
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
@@ -14,8 +14,7 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see .
- */
-
+*/
#ifndef __BSLMM_H__
#define __BSLMM_H__
diff --git a/src/bslmmdap.cpp b/src/bslmmdap.cpp
index c66189b..e1b20d8 100644
--- a/src/bslmmdap.cpp
+++ b/src/bslmmdap.cpp
@@ -1,6 +1,6 @@
/*
Genome-wide Efficient Mixed Model Association (GEMMA)
- Copyright (C) 2011-2017 Xiang Zhou
+ Copyright (C) 2011-2017, Xiang Zhou
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
@@ -14,7 +14,7 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see .
- */
+*/
#include
#include
diff --git a/src/bslmmdap.h b/src/bslmmdap.h
index a9e2d51..7d95db7 100644
--- a/src/bslmmdap.h
+++ b/src/bslmmdap.h
@@ -1,6 +1,6 @@
/*
Genome-wide Efficient Mixed Model Association (GEMMA)
- Copyright (C) 2011-2017 Xiang Zhou
+ Copyright (C) 2011-2017, Xiang Zhou
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
@@ -14,7 +14,7 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see .
- */
+*/
#ifndef __BSLMMDAP_H__
#define __BSLMMDAP_H__
diff --git a/src/eigenlib.h b/src/eigenlib.h
index 493907c..f869786 100644
--- a/src/eigenlib.h
+++ b/src/eigenlib.h
@@ -1,6 +1,6 @@
/*
Genome-wide Efficient Mixed Model Association (GEMMA)
- Copyright (C) 2011-2017 Xiang Zhou
+ Copyright (C) 2011-2017, Xiang Zhou
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
diff --git a/src/gzstream.h b/src/gzstream.h
index 861653f..4e86ad9 100644
--- a/src/gzstream.h
+++ b/src/gzstream.h
@@ -29,7 +29,7 @@
#ifndef GZSTREAM_H
#define GZSTREAM_H 1
-// standard C++ with new header file names and std:: namespace
+// Standard C++ with new header file names and std::namespace.
#include
#include
#include
@@ -118,4 +118,3 @@ public:
#endif // GZSTREAM_H
// ============================================================================
// EOF //
-
diff --git a/src/lapack.h b/src/lapack.h
index 5277b2f..88fc509 100644
--- a/src/lapack.h
+++ b/src/lapack.h
@@ -1,6 +1,6 @@
/*
Genome-wide Efficient Mixed Model Association (GEMMA)
- Copyright (C) 2011-2017 Xiang Zhou
+ Copyright (C) 2011-2017, Xiang Zhou
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
diff --git a/src/ldr.cpp b/src/ldr.cpp
index e28490a..a1e5791 100644
--- a/src/ldr.cpp
+++ b/src/ldr.cpp
@@ -1,6 +1,6 @@
/*
Genome-wide Efficient Mixed Model Association (GEMMA)
- Copyright (C) 2011 Xiang Zhou
+ Copyright (C) 2011-2017, Xiang Zhou
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
@@ -13,8 +13,8 @@
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, see .
- */
+ along with this program. If not, see .
+*/
#include
#include
@@ -39,29 +39,16 @@
#include "gsl/gsl_roots.h"
#include "Eigen/Dense"
-
-
#include "lapack.h"
-
-#ifdef FORCE_FLOAT
-#include "param_float.h"
-#include "ldr_float.h"
-#include "lm_float.h"
-#include "mathfunc_float.h" //for function CenterVector
-#else
#include "param.h"
#include "ldr.h"
#include "lm.h"
#include "mathfunc.h"
-#endif
using namespace std;
using namespace Eigen;
-
-
-void LDR::CopyFromParam (PARAM &cPar)
-{
+void LDR::CopyFromParam (PARAM &cPar) {
a_mode=cPar.a_mode;
d_pace=cPar.d_pace;
@@ -83,176 +70,15 @@ void LDR::CopyFromParam (PARAM &cPar)
return;
}
-
-void LDR::CopyToParam (PARAM &cPar)
-{
- //cPar.pheno_mean=pheno_mean;
- //cPar.randseed=randseed;
-
- return;
-}
-
-
-/*
-void BSLMM::WriteBV (const gsl_vector *bv)
-{
- string file_str;
- file_str=path_out+"/"+file_out;
- file_str+=".bv.txt";
-
- ofstream outfile (file_str.c_str(), ofstream::out);
- if (!outfile) {cout<<"error writing file: "< > &beta_g, const gsl_vector *alpha, const size_t w)
-{
- string file_str;
- file_str=path_out+"/"+file_out;
- file_str+=".param.txt";
-
- ofstream outfile (file_str.c_str(), ofstream::out);
- if (!outfile) {cout<<"error writing file: "< > &Xt, const gsl_matrix *W_gsl, const gsl_vector *y_gsl)
-{
- //save gsl_vector and gsl_matrix into eigen library formats
+//X is a p by n matrix.
+void LDR::VB (const vector > &Xt,
+ const gsl_matrix *W_gsl, const gsl_vector *y_gsl) {
+
+ // Save gsl_vector and gsl_matrix into Eigen library formats.
MatrixXd W(W_gsl->size1, W_gsl->size2);
VectorXd y(y_gsl->size);
VectorXd x_col(y_gsl->size);
@@ -266,7 +92,7 @@ void LDR::VB (const vector > &Xt, const gsl_matrix *W_gsl,
}
}
- //initial VB values by lm
+ // Initial VB values by lm.
cout< > &Xt, const gsl_matrix *W_gsl,
cout<.
- */
-
+ along with this program. If not, see .
+*/
#ifndef __LDR_H__
#define __LDR_H__
@@ -24,25 +23,14 @@
#include