Revision 692 branches/mergetrunkdavef/src/df1b2separable/df1b2fun.h
df1b2fun.h (revision 692)  

1137  1137 
df1b2matrix mfexp(const df1b2matrix& M); 
1138  1138 
df1b2matrix log(const df1b2matrix& M); 
1139  1139 
df1b2matrix trans(const df1b2matrix& M); 
1140 
df1b2matrix inv(const df1b2matrix& M); 

1140  1141 
df1b2matrix choleski_decomp(const df1b2matrix& M); 
1141  1142 
df1b2matrix choleski_decomp_extra(const df1b2matrix& M); 
1142  1143 
df1b2matrix exp(const df1b2matrix& M); 
...  ...  
1734  1735 
int allocated(const df1b2_init_matrix&); 
1735  1736 
#include <df3fun.h> 
1736  1737  
1737 
/* 

1738  1738 
df1b2variable betai(const df1b2variable & _a, const df1b2variable & _b, 
1739 
const df1b2variable & _x); 

1739 
const df1b2variable & _x,int MAXIT=100);


1740  1740 
df1b2variable betai(const df1b2variable & _a, const df1b2variable & _b, 
1741 
double _x); 

1742 
*/ 

1741 
double _x,int MAXIT=100); 

1743  1742  
1744 
df1b2variable betai(const df1b2variable& a, const df1b2variable& b, 

1745 
double x, int maxit=100); 

1746  
1747  1743 
double do_gauss_hermite_block_diagonal(const dvector& x, 
1748  1744 
const dvector& u0,const dmatrix& Hess,const dvector& _xadjoint, 
1749  1745 
const dvector& _uadjoint,const dmatrix& _Hessadjoint, 
...  ...  
1807  1803 
*/ 
1808  1804 
class quadratic_prior : public style_flag_class 
1809  1805 
{ 
1806 
public: 

1807 
dcompressed_triplet * SCM; 

1808 
double d; 

1809 
ivector * indx; 

1810 
double sgn; 

1811 
double lndet; 

1812 
dmatrix * CM; 

1813 
dmatrix * LU; 

1814 
dmatrix * pM; 

1810  1815 
dmatrix * pMinv; 
1816 
dcompressed_triplet * SCMinv; 

1811  1817 
dvar_matrix * dfpMinv; 
1818 
dvar_compressed_triplet * S_dfpMinv; 

1819 
dvar_compressed_triplet * DFSCM; 

1812  1820 
dvar_vector * pu; 
1813  1821 
int xmyindex; 
1814 
public: 

1815  1822 
static int qflag; 
1816  1823 
static quadratic_prior * ptr[]; // this should be a resizeable array 
1817  1824 
static void get_M_calculations(void); 
1818  1825 
static void cleanup_pMinv(); 
1819  1826 
static void cleanup_dfpMinv(); 
1820  1827 
static int num_quadratic_prior; 
1828 
static int calc_matrix_flag; 

1829 
static int matrix_mult_flag; 

1830 
static int sparse_flag; 

1821  1831 
static const int max_num_quadratic_prior; 
1822  1832 
void add_to_list(void); 
1823  1833 
public: 
1824  1834 
static int in_qp_calculations; 
1835 
static void cleanup(void); 

1825  1836 
int get_offset(int xs); 
1826  1837 
int get_myindex(void) { return xmyindex;} 
1827  1838 
static quadratic_prior * get_ptr(int i){ return ptr[i];} 
1828  1839 
void operator = (const dvar_matrix &); 
1840 
void operator = (const dcompressed_triplet &); 

1841 
void operator = (const dvar_compressed_triplet &); 

1829  1842 
void operator = (const dmatrix &); 
1830  1843 
static int get_in_qp_calculations() { return in_qp_calculations; } 
1831  1844 
static int get_num_quadratic_prior(void) { return num_quadratic_prior;} 
1832  1845 
static dvariable get_quadratic_priors(void); 
1833  1846 
dvariable get_function(void); 
1834  1847 
quadratic_prior(void); 
1835 
~quadratic_prior(void); 

1848 
void deallocate(void); 

1849 
virtual ~quadratic_prior(void); 

1836  1850 
void allocate(const dvar_vector & _u,const char * s); 
1837  1851 
void allocate(const dvar_vector & _u); 
1838  1852 
void allocate(const dvar_matrix & _M, const dvar_vector & _u,const char * s); 
1839  1853 
void allocate(const dvar_matrix & _M, const dvar_vector & _u); 
1840  1854 
//dmatrix get_cHessian(void); 
1841  1855 
void get_cHessian(dmatrix,int); 
1856 
void get_cHessian(dcompressed_triplet *,int,ivector& sparse_iterator,int & sparse_count); 

1842  1857 
void get_cHessian(dvar_matrix,int); 
1843  1858 
void get_cHessian_from_vHessian(dmatrix ,int); 
1844  1859 
void get_vHessian(dvar_matrix ,int); 
1860 
//void get_vHessian(const dvar_compressed_triplet& ,int ); 

1861 
void get_vHessian(const dvar_compressed_triplet& _H, 

1862 
int xsize,ivector& sparse_iterator,int& sparse_count); 

1845  1863 
void get_cgradient(dvector,int); 
1846  1864 
dvar_matrix get_Hessian(void); 
1847  1865 
dvar_vector get_gradient(void); 
...  ...  
1849  1867 
static dvar_matrix get_Hessian_contribution(void); 
1850  1868 
static void get_cgradient_contribution(dvector,int); 
1851  1869 
static void get_cHessian_contribution(dmatrix,int); 
Also available in: Unified diff