Vector.cpp

Demonstration of the Vector class, as it allows to perform vector space operations.

#include <iostream>
#include <eagle/Vector.hpp>

#include <eagle/PhysicalSpace.hpp>

using namespace Eagle;
using namespace std;

int VectorExample()
{
Vector<double,4> a,b,c, d; 

        a.set( 0.0 ); 
        a[2] = 13.0; 

        b = 12.0, 34.0, 27.1, 5.0; 

        c = a + b; 

        d = 5*c; 

        d /= 10.0;

double  AD = InnerProduct(a,d); 

        cout << b << d << AD << endl;


PhysicalSpace::tvector V;
        V = 5,4,3;

        cout << "Tangential Vector " << V << " with normalization is "<< V.unit() << endl;

        return 1;
}