C:/programs/SCPPNT/src/include/vec.h File Reference

Definition of simple concrete vector class. More...

#include <iterator>
#include "scppnt/scppnt.h"
#include "scppnt/scppnt_error.h"
#include <string>
#include <iostream>
#include <strstream>
#include <cstdlib>
#include <algorithm>

Include dependency graph for vec.h:

Go to the source code of this file.

Namespaces

namespace  SCPPNT

Classes

class  SCPPNT::Vector< T >
 Simple concrete vector class for numerical computation. More...

Functions

template<class T>
std::ostream & SCPPNT::operator<< (std::ostream &s, const Vector< T > &A)
 Write a vector to an output stream.
template<class T>
std::istream & SCPPNT::operator>> (std::istream &s, Vector< T > &A)
 Read elements of a vector from an input stream.
template<class T>
Vector< T > SCPPNT::operator+ (const Vector< T > &lhs, const Vector< T > &rhs)
 Add a vector to a vector and return a new vector containing the sum.
template<class T>
Vector< T > SCPPNT::operator+ (const Vector< T > &lhs, const T value)
 Add add a scalar to each element of a vector and return a new vector containing the sum.
template<class T>
Vector< T > SCPPNT::operator- (const Vector< T > &lhs, const Vector< T > &rhs)
 Subtract the vector rhs from the vector lhs and return a new vector containing the difference.
template<class T>
Vector< T > SCPPNT::operator- (const Vector< T > &lhs, const T value)
 Subtract scalar from each element of a vector a return a new vector containing the difference.
template<class T>
Vector< T > SCPPNT::operator * (const Vector< T > &lhs, const Vector< T > &rhs)
 Multiply corresponding elements of two vectors and return a new vector containing the product.
template<class T>
Vector< T > SCPPNT::operator * (const Vector< T > &lhs, const T value)
 Multiply each element of a vector by a scalar and return a new vector containing the product.
template<class IT1, class IT2>
std::iterator_traits< IT1 >
::value_type 
SCPPNT::dot_prod (Subscript N, IT1 i1, IT2 i2)
 Dot product of values pointed to by two iterators.
template<class T>
SCPPNT::dot_prod (const Vector< T > &A, const Vector< T > &B)
 Dot product of two vectors.


Detailed Description

Definition of simple concrete vector class.

Templated numerical vector class based on Template Numerical Toolkit (http://math.nist.gov/tnt) Vector class.

This class adds the following to the TNT Vector class:

  1. Assignment operators (+=, -=, *=, /=)
  2. Errors result in an exception being thrown rather than the program being aborted.

Definition in file vec.h.


Generated on Tue Dec 18 23:34:19 2007 for SCPPNT by  doxygen 1.5.4