#include <stdio.h>
#include <vector.h>
#include <stack.h>
#include <math.h>

#include "treenode.h"
#include "visitor.h"
#include "iterators.h"
#include "dstruct.h"
#include "multiplicative.h"
#include "underlying/binom2.h"
#include "derivative/europeanPut.h"
#include "pricing.h"

int main(void);

int main(void)
{
	IP_Binom2 param;

	param.dt = vector<double>(1);

	param.S0 = 100;
	param.N = 10;
	param.dt[0] = 0.08;
	param.sigma = 0.2;
	param.r = 0.02;

	Pricing<UNDERLYING(Binom2), Matrix<MemorySaving, Multiplicative>, EuropeanPut > *derivative = new Pricing<UNDERLYING(Binom2), Matrix<MemorySaving, Multiplicative>, EuropeanPut >(param, 99);

	/* The following methods are available in derivative:
	 *
	 * double getDerivativeRootValue()
	 *
	 */

	 printf("root derivative value is %f\n", derivative->getDerivativeRootValue());
}