]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/yap/example/autodiff_library/OPNode.cpp
import new upstream nautilus stable release 14.2.8
[ceph.git] / ceph / src / boost / libs / yap / example / autodiff_library / OPNode.cpp
1 /*
2 * OpNode.cpp
3 *
4 * Created on: 8 Apr 2013
5 * Author: s0965328
6 */
7
8 #include "OPNode.h"
9 #include "Stack.h"
10 #include "Tape.h"
11 #include "PNode.h"
12 /***********************************************************
13 h
14 / \
15 u v ----- hu hv represent dh/du dh/dv resepectively.
16 - - -
17 x1....xn
18 ***********************************************************/
19
20 namespace AutoDiff{
21
22 OPNode::OPNode(OPCODE op, Node* left) : ActNode(), op(op), left(left),val(NaN_Double) {
23 }
24
25 TYPE OPNode::getType()
26 {
27 return OPNode_Type;
28 }
29
30 OPNode::~OPNode() {
31 if(left->getType()!=VNode_Type)
32 {
33 delete left;
34 this->left = NULL;
35 }
36 }
37 }