Ignore:
Timestamp:
May 8, 2010, 10:05:35 AM (16 years ago)
Author:
Frederik Heber <heber@…>
Children:
abde75
Parents:
1775d3 (diff), 25e17e9 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge commit 'jupiter/StructureRefactoring' into StructureRefactoring

File:
1 edited

Legend:

Unmodified
Added
Removed
  • molecuilder/src/vector.hpp

    r1775d3 r8c01ce  
    1818
    1919#include "defs.hpp"
     20#include "Space.hpp"
    2021
    2122/********************************************** declarations *******************************/
     
    2425 * basically, just a x[3] but with helpful functions
    2526 */
    26 class Vector {
     27class Vector : public Space{
    2728protected:
    2829  // this struct is used to indicate calls to the Baseconstructor from inside vectors.
     
    7980
    8081  // Methods that are derived directly from other methods
    81   double Distance(const Vector &y) const;
    8282  double Norm() const;
    8383  double NormSquared() const;
     
    8989  // operators for mathematical operations
    9090  bool operator==(const Vector& b) const;
     91  bool operator!=(const Vector& b) const;
    9192  const Vector& operator+=(const Vector& b);
    9293  const Vector& operator-=(const Vector& b);
    9394  Vector const operator+(const Vector& b) const;
    9495  Vector const operator-(const Vector& b) const;
     96
     97  // Methods inherited from Space
     98  virtual double distance(const Vector &point) const;
     99  virtual Vector getClosestPoint(const Vector &point) const;
    95100
    96101protected:
     
    101106};
    102107
     108// some commonly used and fixed vectors
     109const extern Vector zeroVec;
     110const extern Vector e1;
     111const extern Vector e2;
     112const extern Vector e3;
     113
    103114ostream & operator << (ostream& ost, const Vector &m);
    104115const Vector& operator*=(Vector& a, const double m);
Note: See TracChangeset for help on using the changeset viewer.