#include <dblock.h>
Definition at line 37 of file dblock.h.
Public Methods | |
| Dblock (void) | |
| Dblock (int nd, int nr, int nc) | |
| void | resize (int nd, int nr, int nc) |
| void | resize (int nd, int nr, int nc, double init) |
| doubleMatrix & | operator[] (int i) |
| double & | operator() (int i, int j, int k) |
| int | get_ndim (void) |
| int | get_nrow (void) |
| int | get_ncol (void) |
| void | init (double val) |
Public Attributes | |
| int | iw |
Protected Attributes | |
| int | ndim |
| int | nrow |
| int | ncol |
| Vector< doubleMatrix > | block |
Friends | |
| std::ostream & | operator<< (std::ostream &stream, Dblock &D) |
|
|
Definition at line 45 of file dblock.h. References ncol, ndim, and nrow.
|
|
||||||||||||||||
|
Definition at line 26 of file dblock.cpp. References block, ncol, ndim, nrow, and matvec::Vector< doubleMatrix >::resize().
00026 {
00027 if (nd<=0) {
00028 std::cerr <<"Depth of block is not positive \n" << std::flush;
00029 }
00030 else if (nr<=0) {
00031 std::cerr <<"Number of rows Block is not positive \n" << std::flush;
00032 }
00033 else if (nc<=0) {
00034 std::cerr <<"Number of columns Block is not positive \n" << std::flush;
00035 }
00036 else {
00037 ndim=nd;
00038 nrow=nr;
00039 ncol=nc;
00040 block.resize(nd);
00041 for (int i=1;i<=nd;i++){
00042 block(i).resize(nr,nc);
00043 }
00044 }
00045 }
|
|
|
Definition at line 54 of file dblock.h. References ncol.
00054 {return ncol;}
|
|
|
Definition at line 52 of file dblock.h. References ndim. Referenced by matvec::Individual::cal_gprobs(), matvec::Individual::collapse_antpost(), and matvec::Individual::get_m_posterior().
00052 {return ndim;}
|
|
|
Definition at line 53 of file dblock.h. References nrow. Referenced by matvec::Individual::initial_multi_anterior().
00053 {return nrow;}
|
|
|
Definition at line 89 of file dblock.cpp. References block, ncol, ndim, and nrow. Referenced by matvec::NuFamily::multi_fullsibs_prob(), matvec::Population::multi_geno_dist_peeling(), matvec::NuFamily::multi_llh(), and resize().
|
|
||||||||||||||||
|
Definition at line 51 of file dblock.h. References block.
00051 {return block(i)(j,k);};
|
|
|
Definition at line 50 of file dblock.h.
00050 {return block[i];};
|
|
||||||||||||||||||||
|
Definition at line 68 of file dblock.cpp. References block, init(), ncol, ndim, nrow, and matvec::Vector< doubleMatrix >::resize().
00068 {
00069 if (nd<=0) {
00070 std::cerr <<"Depth of block is not positive \n" << std::flush;
00071 }
00072 else if (nr<=0) {
00073 std::cerr <<"Number of rows Block is not positive \n" << std::flush;
00074 }
00075 else if (nc<=0) {
00076 std::cerr <<"Number of columns Block is not positive \n" << std::flush;
00077 }
00078 else {
00079 ndim=nd;
00080 nrow=nr;
00081 ncol=nc;
00082 block.resize(nd);
00083 for (int i=1;i<=nd;i++){
00084 block(i).resize(nr,nc,init);
00085 }
00086 }
00087 }
|
|
||||||||||||||||
|
Definition at line 47 of file dblock.cpp. References block, ncol, ndim, nrow, and matvec::Vector< doubleMatrix >::resize(). Referenced by matvec::Individual::initial_multi_anterior(), matvec::Population::multipoint_likelihood(), and matvec::Fpmm::setup_trm().
00047 {
00048 if (nd<=0) {
00049 std::cerr <<"Depth of block is not positive \n" << std::flush;
00050 }
00051 else if (nr<=0) {
00052 std::cerr <<"Number of rows Block is not positive \n" << std::flush;
00053 }
00054 else if (nc<=0) {
00055 std::cerr <<"Number of columns Block is not positive \n" << std::flush;
00056 }
00057 else {
00058 ndim=nd;
00059 nrow=nr;
00060 ncol=nc;
00061 block.resize(nd);
00062 for (int i=1;i<=nd;i++){
00063 block(i).resize(nr,nc);
00064 }
00065 }
00066 }
|
|
||||||||||||
|
Definition at line 100 of file dblock.cpp.
00101 {
00102 stream << "\n";
00103 int k,i,j,jstart,jend,ncols_remaining;
00104
00105 for (k=1;k<=D.ndim; k++){
00106 ncols_remaining = D.ncol;
00107 jend = 0;
00108 while (ncols_remaining > 0) {
00109 jstart = jend + 1;
00110 jend = jstart + ncols_remaining - 1;
00111 ncols_remaining -= 10;
00112 if (ncols_remaining < 0) {
00113 ncols_remaining = 0;
00114 }
00115 else {
00116 jend = jstart + 9;
00117 }
00118 stream << "\n Block " << k <<"\n" << " ";
00119 stream.width(2);
00120 for (j=jstart;j<=jend;j++){
00121 stream << " column " << j;
00122 }
00123 stream << "\n";
00124 for (i=1;i<=D.nrow; i++) {
00125 stream << "\n" << "Row ";
00126 stream.width(4);
00127 stream << i << " ";
00128 for (j=jstart;j<=jend;j++){
00129 stream.width(9);
00130 stream << D(k,i,j);
00131 }
00132 }
00133 }
00134 stream << "\n" ;
00135 }
00136 stream << "\n" << "\n" ;
00137 return stream;
00138 }
|
|
|
Definition at line 41 of file dblock.h. Referenced by Dblock(), init(), operator()(), and resize(). |
|
|
|
|
|
Definition at line 40 of file dblock.h. Referenced by Dblock(), get_ncol(), init(), matvec::operator<<(), and resize(). |
|
|
Definition at line 40 of file dblock.h. Referenced by Dblock(), get_ndim(), init(), matvec::operator<<(), and resize(). |
|
|
Definition at line 40 of file dblock.h. Referenced by Dblock(), get_nrow(), init(), matvec::operator<<(), and resize(). |
1.2.16