summaryrefslogtreecommitdiffstats
path: root/src/boost/libs/yap/example/autodiff_library/ActNode.cpp
blob: c21594f86dac196525715d9f24b425b807afdb2e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
/*
 * ActNode.cpp
 *
 *  Created on: 13 Apr 2013
 *      Author: s0965328
 */

#include "ActNode.h"

namespace AutoDiff {

ActNode::ActNode() : AutoDiff::Node(),adj(NaN_Double){

}

ActNode::~ActNode() {
}


void ActNode::update_adj(double& v)
{
	assert(!isnan(adj));
	assert(!isnan(v));
	adj+=v;
}

void ActNode::grad_reverse_1_init_adj()
{
	adj = 1;
}

}