Statistics
| Revision:

root / trunk / src / linad99 / fvar_a51.cpp @ 1942

History | View | Annotate | Download (929 Bytes)

1
/*
2
 * $Id: fvar_a51.cpp 1942 2014-04-28 22:22:45Z johnoel $
3
 *
4
 * Author: David Fournier
5
 * Copyright (c) 2008-2012 Regents of the University of California
6
 */
7
/**
8
 * \file
9
 * Description not yet available.
10
 */
11
#include "fvar.hpp"
12

    
13
void DF_dvexp(void);
14

    
15
/**
16
 * Description not yet available.
17
 * \param
18
 */
19
dvar_vector mfexp(const dvar_vector& v1, const double d)
20
{
21
  //dvector cv1=value(v1);
22
  dvar_vector vtmp(v1.indexmin(),v1.indexmax());
23
  for (int i=v1.indexmin();i<=v1.indexmax();i++)
24
  {
25
    if (v1.elem_value(i)<d)
26
    {
27
      vtmp.elem_value(i)=exp(v1.elem_value(i));
28
    }
29
    else
30
    {
31
      vtmp.elem_value(i)=exp(d);
32
      cout << "In mfexp d =" << d << " mfexp(x) = " << vtmp(i)  << endl;
33
    }
34
  }
35

    
36
  save_identifier_string("ddd");
37
  v1.save_dvar_vector_position();
38
  vtmp.save_dvar_vector_value();
39
  vtmp.save_dvar_vector_position();
40
  save_identifier_string("hee");
41
  gradient_structure::GRAD_STACK1->
42
            set_gradient_stack(DF_dvexp);
43
  return vtmp;
44
}