AMROC Main     Blockstructured Adaptive Mesh Refinement in object-oriented C++


Main Page   Class Hierarchy   Compound List   File List  

Vector3.h File Reference

Vector implementation. More...

#include "CompConf.h"
#include "generic.h"
#include <iostream.h>
#include <assert.h>

Include dependency graph for Vector3.h:

Include dependency graph

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Compounds

class  Vector
 Vector implementation. More...


Defines

#define Vector(dim)   name2(Vector,dim)
#define VectorName
#define Vector_Vector_Operator(ope, op)
#define Vector_Scalar_Operator(ope, op)
#define Vector_Vector_RelOperator(op)
#define Vector_Vector_RelOperator(op)
#define Vector_Scalar_RelOperator(op)
#define Vector_Scalar_RelOperator(op)
#define Global_Vector_Scalar_Operator(op)
#define Global_Vector_Function(fct)
#define Vector_Vector_Functions(NameTo, NameFrom, ope)

Functions

template<class DataType> ostream & operator<< (ostream &os, const Vector< DataType > &v)
template<class DataType> Vector< DataType > Min (const Vector< DataType > &x, const Vector< DataType > &y)
template<class DataType> Vector< DataType > Max (const Vector< DataType > &x, const Vector< DataType > &y)
template<class DataType> double abs (const Vector< DataType > &x)
template<class DataType> DataType mincomp (const Vector< DataType > &x)
template<class DataType> DataType maxcomp (const Vector< DataType > &x)
template<class DataType> Vector< DataType > operator+ (const DataType &v, const Vector< DataType > &x)
template<class DataType> Vector< DataType > operator- (const DataType &v, const Vector< DataType > &x)
template<class DataType> Vector< DataType > operator * (const DataType &v, const Vector< DataType > &x)
template<class DataType> Vector< DataType > operator/ (const DataType &v, const Vector< DataType > &x)
template<class DataType> Vector< DataType > fabs (const Vector< DataType > &x)
template<class DataType> Vector< DataType > sqrt (const Vector< DataType > &x)
template<class DataType, class VectorType> void equals_to (Vector< DataType > &x, const VectorType &y)
template<class DataType, class VectorType> void equals_from (VectorType &x, const Vector< DataType > &y)
template<class DataType, class VectorType> void plus_to (Vector< DataType > &x, const VectorType &y)
template<class DataType, class VectorType> void plus_from (VectorType &x, const Vector< DataType > &y)
template<class DataType, class VectorType> void minus_to (Vector< DataType > &x, const VectorType &y)
template<class DataType, class VectorType> void minus_from (VectorType &x, const Vector< DataType > &y)
template<class DataType, class VectorType> void multiply_to (Vector< DataType > &x, const VectorType &y)
template<class DataType, class VectorType> void multiply_from (VectorType &x, const Vector< DataType > &y)
template<class DataType, class VectorType> void divide_to (Vector< DataType > &x, const VectorType &y)
template<class DataType, class VectorType> void divide_from (VectorType &x, const Vector< DataType > &y)


Detailed Description

Vector implementation.

Author:
Ralf Deiterding
Version:
1.0
Date:
Jan-2002

Definition in file Vector3.h.


Define Documentation

#define Global_Vector_Function fct   
 

Value:

template <class DataType>                                                 \
inline Vector(3)<DataType> fct(const Vector(3)<DataType> &x)              \
   {                                                                      \
      Vector(3)<DataType> ret;                                            \
      ret[0] = fct(x[0]);                                                 \
      ret[1] = fct(x[1]);                                                 \
      ret[2] = fct(x[2]);                                                 \
      return(ret);                                                        \
     }

Definition at line 286 of file Vector3.h.

#define Global_Vector_Scalar_Operator op   
 

Value:

template <class DataType>                                                  \
inline Vector(3)<DataType> operator op (const DataType &v,                 \
   const Vector(3)<DataType> &x)                                           \
   { return(x op v); }

Definition at line 273 of file Vector3.h.

#define Vector_Scalar_Operator ope,
op   
 

Value:

inline TVector& operator ope (const DataType &v)             \
     {                                                          \
      data_[0] ope v;                                           \
      data_[1] ope v;                                           \
      data_[2] ope v;                                           \
      return(*this);                                            \
     }                                                          \
   inline TVector operator op (const DataType &v) const         \
     {                                                          \
      TVector ret(*this);                                       \
      ret.data_[0] ope v;                                       \
      ret.data_[1] ope v;                                       \
      ret.data_[2] ope v;                                       \
     return(ret);                                               \
     }

Definition at line 111 of file Vector3.h.

#define Vector_Scalar_RelOperator op   
 

Value:

inline int operator op (const DataType &v) const             \
     { return(                                                  \
               (data_[0] op v)                                  \
            || (data_[1] op v)                                  \
            || (data_[2] op v)                                  \
              ); }

Definition at line 181 of file Vector3.h.

#define Vector_Scalar_RelOperator op   
 

Value:

inline int operator op (const DataType &v) const             \
     { return(                                                  \
               (data_[0] op v)                                  \
            && (data_[1] op v)                                  \
            && (data_[2] op v)                                  \
             ); }

Definition at line 181 of file Vector3.h.

#define Vector_Vector_Functions NameTo,
NameFrom,
ope   
 

Value:

template <class DataType, class VectorType>                             \
  inline void NameTo (Vector(3)<DataType> &x, const VectorType &y)        \
    {                                                                     \
      x(0) ope y(0);                                                      \
      x(1) ope y(1);                                                      \
      x(2) ope y(2);                                                      \
    }                                                                     \
  template <class DataType, class VectorType>                             \
  inline void NameFrom (VectorType &x, const Vector(3)<DataType> &y)      \
    {                                                                     \
      x(0) ope y(0);                                                      \
      x(1) ope y(1);                                                      \
      x(2) ope y(2);                                                      \
    }

Definition at line 302 of file Vector3.h.

#define Vector_Vector_Operator ope,
op   
 

Value:

inline TVector& operator ope (const TVector &x)              \
     {                                                          \
      data_[0] ope x.data_[0];                                  \
      data_[1] ope x.data_[1];                                  \
      data_[2] ope x.data_[2];                                  \
      return(*this);                                            \
     }                                                          \
   inline TVector operator op (const TVector &x) const          \
     {                                                          \
      TVector ret(*this);                                       \
      ret.data_[0] ope x.data_[0];                              \
      ret.data_[1] ope x.data_[1];                              \
      ret.data_[2] ope x.data_[2];                              \
      return(ret);                                              \
     }

Definition at line 89 of file Vector3.h.

#define Vector_Vector_RelOperator op   
 

Value:

inline int operator op (const TVector &x) const              \
     { return(                                                  \
               (data_[0] op x.data_[0])                         \
            || (data_[1] op x.data_[1])                         \
            || (data_[2] op x.data_[2])                         \
             ) ; }

Definition at line 155 of file Vector3.h.

#define Vector_Vector_RelOperator op   
 

Value:

inline int operator op (const TVector &x) const              \
     { return(                                                  \
               (data_[0] op x.data_[0])                         \
            && (data_[1] op x.data_[1])                         \
            && (data_[2] op x.data_[2])                         \
             ) ; }

Definition at line 155 of file Vector3.h.


Quickstart     Users Guide     Programmers Reference     Installation      Examples     Download



AMROC Main      Home      Contact
last update: 06/01/04