// file: $isip/doc/examples/class/math/vector/math_vector_example_00/example.cc
// version: $Id: example.cc 5954 2000-12-17 18:26:04Z hamaker $
//

// isip include files
//
#include <VectorFloat.h>
#include <Console.h>

// main program starts here:
//  this example demonstrates how the math vector objects can be used to
//  compute a Euclidean distance in a multi-dimensional vector space.
//
int main() {
  
  // declare two vectors and a scalar
  //
  VectorFloat u;
  VectorFloat v;
  Float distance;
  
  // define the elements of the two vectors
  //
  u.assign(L"3.5, 6.4, 5.9, 0.11, 0.76");
  v.assign(L"4.6, 8.9, 11.2, 22.2, 7.7");
  
  // calculate the euclidean distance between two vectors
  //
  distance = u.norm(v);
  
  // writing the result to the console
  //
  String output;
  String tmp;
  output.concat(L"the Euclidean distance between u and v is ");
  tmp.assign(distance);
  output.concat(tmp);
  Console::put(output);
  
  // exit gracefully
  //
  Integral::exit();
}
