#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/binom.h"
#include "derivative/europeanCall.h"
#include "pricing.h"

int main(void);

int main(void)
{
	IP_Binom param;

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

	param.S0 = 100;
	param.N = 1000;
	param.dt[0] = 0.001;
	param.U = 1.1;
	param.D = 0.95;
	param.r = 0.06;

	Pricing<UNDERLYING(Binom), Matrix<MemorySaving, Multiplicative>, EuropeanCall > *derivative = new Pricing<UNDERLYING(Binom), Matrix<MemorySaving, Multiplicative>, EuropeanCall >(param, 100);

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

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