#include <stdio.h>
#include <stdlib.h>
#include <math.h>

#include "bnc.h"

#define DIM 5 

int main()
{
	long int i, j;
	DMatrix x;
	DVector vc, vb;

	x = init_dmatrix(DIM, DIM);

	vb = init_dvector(DIM);
	vc = init_dvector(DIM);

	for(i = 0; i < DIM; i++)
	{
		set_dvector_i(vb, i, (double)(DIM - i));
		for(j = 0; j < DIM; j++)
		{
			set_dmatrix_ij(x, i, j, (double)(i * DIM + j + 1));
		}
	}

	mul_dmatrix_dvec(vc, x, vb);

	print_dvector(vc);

	free_dmatrix(x);

	free_dvector(vb);
	free_dvector(vc);

	return EXIT_SUCCESS;
}

