MADNESS  version 0.9
Functions
y1.cc File Reference
#include <iostream>
#include <cmath>
#include <algorithm>
#include <vector>
#include <cassert>
#include <cstdio>
#include <qd/qd_real.h>
#include <ls.h>
Include dependency graph for y1.cc:

Functions

template<typename t >
std::ostream & operator<< (std::ostream &s, const matrix< t > &c)
 
template<typename t >
std::ostream & operator<< (std::ostream &s, const std::vector< t > &c)
 easy printing of vectors More...
 
template<typename FLOAT >
FLOAT b (int j, FLOAT z)
 
template<typename FLOAT >
FLOAT a (int j, FLOAT z)
 
template<typename FLOAT >
FLOAT cfrac (FLOAT z)
 
template<typename FLOAT >
FLOAT series (FLOAT z)
 
template<typename FLOAT >
FLOAT e1 (FLOAT z)
 
template<typename t >
convert (const char *c)
 
template<>
double convert< double > (const char *c)
 
template<>
float convert< float > (const char *c)
 
template<typename FLOAT >
void jacobi (int n, matrix< FLOAT > &a, vector< FLOAT > &e, matrix< FLOAT > &v)
 
template<typename FLOAT >
void LSQ (int n, const matrix< FLOAT > &a, const vector< FLOAT > &b, vector< FLOAT > &x, const FLOAT &tol)
 
template<typename FLOAT >
FLOAT target (const FLOAT &x)
 
template<typename FLOAT >
void target (const FLOAT &x, FLOAT &f, FLOAT &d1f, FLOAT &d2f)
 
template<typename FLOAT >
FLOAT weight (const FLOAT &x)
 
template<typename FLOAT >
void weight (const FLOAT &x, FLOAT &f, FLOAT &d1f, FLOAT &d2f)
 
template<typename FLOAT >
FLOAT fit (const FLOAT &x, const vector< FLOAT > &p)
 
template<typename FLOAT >
void fit (const FLOAT &x, const vector< FLOAT > &p, FLOAT &f, FLOAT &g, FLOAT &h)
 
template<typename FLOAT >
void plot (int npt, const FLOAT &a, const FLOAT &b, const vector< FLOAT > &p)
 
template<typename FLOAT >
void makedata (const vector< FLOAT > &x, const vector< FLOAT > &f, const vector< FLOAT > &p, FLOAT &d0, vector< FLOAT > &d1, matrix< FLOAT > &d2, bool d0only=false)
 
template<typename FLOAT >
vector< FLOAT > opt (const vector< FLOAT > &x, const vector< FLOAT > &f, const vector< FLOAT > &w, const vector< FLOAT > &guess, int maxiter)
 
template<typename FLOAT >
vector< FLOAT > updatex (const vector< FLOAT > &x, const vector< FLOAT > &p)
 
template<typename FLOAT >
void test ()
 
int main ()
 

Function Documentation

template<typename FLOAT >
FLOAT a ( int  j,
FLOAT  z 
)
template<typename FLOAT >
FLOAT b ( int  j,
FLOAT  z 
)

Referenced by madness::add(), madness::bgq_mtxmq_padded(), madness::archive::bufar_size(), cfrac(), conhyp(), debugSlice(), madness::TensorTrain< T >::decompose(), madness::gaxpy(), madness::gelss(), madness::gesv(), hashbig(), hashlittle(), hashlittle2(), hashword(), KAIN(), madness::KAIN(), madness::archive::ArchiveLoadImpl< Archive, std::vector< bool > >::load(), madness::MutexFair::lock(), main(), mTxm(), mtxmq(), mTxmT(), madness::mul(), mxm(), madness::new_am_arg(), operator!=(), mpfr::operator!=(), madness::WorldSumOp< T >::operator()(), madness::WorldMultOp< T >::operator()(), madness::WorldMaxOp< T >::operator()(), madness::WorldMinOp< T >::operator()(), madness::WorldBitAndOp< T >::operator()(), madness::WorldBitOrOp< T >::operator()(), madness::WorldBitXorOp< T >::operator()(), madness::WorldLogicAndOp< T >::operator()(), madness::WorldLogicOrOp< T >::operator()(), madness::FunctionImpl< T, NDIM >::do_err_box< opT >::operator()(), mpfr::operator*(), operator+(), mpfr::operator+(), mpfr::operator-(), mpfr::operator/(), mpfr::operator<(), madness::tr1::shptr::operator<(), mpfr::operator<=(), operator==(), mpfr::operator==(), mpfr::operator>(), operator>=(), mpfr::operator>=(), optimize_coeffs(), madness::XCfunctional::polyn(), XCfunctional::polyn(), madness::print_seq(), madness::shrink(), madness::archive::ArchiveStoreImpl< Archive, std::vector< bool > >::store(), madness::sub(), madness::sygv(), madness::Random::test(), test(), Test5(), madness::test_gelss(), madness::test_gesv(), madness::test_svd(), madness::test_sygv(), testNavierStokes(), updatex(), madness::ConditionVariable::wait(), and zSlice().

template<typename FLOAT >
FLOAT cfrac ( FLOAT  z)

References a(), b(), delta, epsilon, madness::f, mpfr::fabs(), and one().

Referenced by e1().

template<typename t >
t convert ( const char *  c)

References c.

template<>
double convert< double > ( const char *  c)

References c.

template<>
float convert< float > ( const char *  c)

References c.

template<typename FLOAT >
FLOAT e1 ( FLOAT  z)
template<typename FLOAT >
FLOAT fit ( const FLOAT &  x,
const vector< FLOAT > &  p 
)

References mpfr::exp(), and mpfr::sum().

Referenced by opt(), plot(), and updatex().

template<typename FLOAT >
void fit ( const FLOAT &  x,
const vector< FLOAT > &  p,
FLOAT &  f,
FLOAT &  g,
FLOAT &  h 
)

References mpfr::exp().

template<typename FLOAT >
void jacobi ( int  n,
matrix< FLOAT > &  a,
vector< FLOAT > &  e,
matrix< FLOAT > &  v 
)

References a(), c, epsilon, mpfr::fabs(), k, max, mpfr::min(), one(), sqrt(), and std::swap().

Referenced by LSQ(), opt(), and test().

template<typename FLOAT >
void LSQ ( int  n,
const matrix< FLOAT > &  a,
const vector< FLOAT > &  b,
vector< FLOAT > &  x,
const FLOAT &  tol 
)

References mpfr::fabs(), jacobi(), k, and mpfr::sum().

Referenced by test().

int main ( )
template<typename FLOAT >
void makedata ( const vector< FLOAT > &  x,
const vector< FLOAT > &  f,
const vector< FLOAT > &  p,
FLOAT &  d0,
vector< FLOAT > &  d1,
matrix< FLOAT > &  d2,
bool  d0only = false 
)

References mpfr::exp(), madness::g, mu, mpfr::sum(), and weight().

Referenced by opt(), and test().

template<typename t >
std::ostream& operator<< ( std::ostream &  s,
const matrix< t > &  c 
)

References c, and m.

template<typename t >
std::ostream& operator<< ( std::ostream &  s,
const std::vector< t > &  c 
)

easy printing of vectors

References c.

template<typename FLOAT >
vector<FLOAT> opt ( const vector< FLOAT > &  x,
const vector< FLOAT > &  f,
const vector< FLOAT > &  w,
const vector< FLOAT > &  guess,
int  maxiter 
)
template<typename FLOAT >
void plot ( int  npt,
const FLOAT &  a,
const FLOAT &  b,
const vector< FLOAT > &  p 
)

References a(), fit(), target(), and weight().

Referenced by test().

template<typename FLOAT >
FLOAT series ( FLOAT  z)

References epsilon, mpfr::fabs(), mpfr::log(), and mpfr::sum().

Referenced by e1().

template<typename FLOAT >
FLOAT target ( const FLOAT &  x)

References sqrt().

Referenced by plot(), test(), and updatex().

template<typename FLOAT >
void target ( const FLOAT &  x,
FLOAT &  f,
FLOAT &  d1f,
FLOAT &  d2f 
)

References sqrt().

template<typename FLOAT >
void test ( )
template<typename FLOAT >
vector<FLOAT> updatex ( const vector< FLOAT > &  x,
const vector< FLOAT > &  p 
)

References a(), b(), madness::f, fit(), madness::g, one(), target(), and weight().

Referenced by test().

template<typename FLOAT >
FLOAT weight ( const FLOAT &  x)

References sqrt().

Referenced by makedata(), plot(), test(), and updatex().

template<typename FLOAT >
void weight ( const FLOAT &  x,
FLOAT &  f,
FLOAT &  d1f,
FLOAT &  d2f 
)

References sqrt().