Fish - FiberLib for VISH 0.3
Fish - The Fiber Bundle API for the Vish Visualization Shell
Vector.cpp

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

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;
/**@example Vector.cpp
Demonstration of the Vector class, as it allows
to perform vector space operations.
*/
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;
}
basic_ostream< _CharT, _Traits > & endl(basic_ostream< _CharT, _Traits > &__os)
ostream cout
void set(const V &value)
STL namespace.