GLAMERDOC++
Gravitational Lensing Code Library
Public Member Functions | Public Attributes | List of all members
Point_2d Struct Reference

Class for representing points or vectors in 2 dimensions. Not that the dereferencing operator is overridden. More...

#include <point.h>

Inheritance diagram for Point_2d:
Inheritance graph
[legend]

Public Member Functions

 Point_2d (double x1, double x2)
 
 Point_2d (const Point_2d &p)
 
Point_2doperator= (const Point_2d &p)
 
 Point_2d (const PosType *p)
 
bool operator== (const Point_2d &p) const
 
bool operator!= (const Point_2d &p) const
 
Point_2d operator+ (const Point_2d &p) const
 
Point_2d operator- (const Point_2d &p) const
 
Point_2doperator+= (const Point_2d &p)
 
Point_2doperator-= (const Point_2d &p)
 
Point_2doperator/= (PosType value)
 
Point_2d operator/ (PosType value) const
 
Point_2doperator*= (PosType value)
 
Point_2d operator* (PosType value) const
 
PosType operator* (const Point_2d &p) const
 scalar product
 
PosType operator^ (const Point_2d &p) const
 outer product
 
PosType length () const
 length
 
PosType length_sqr () const
 length^2
 
void rotate (PosType theta)
 
Point_2d rotated (PosType theta) const
 returns a copy of the point that it rotated
 
void unitize ()
 rescale to make a unit length vector
 
PosType * data ()
 
PosType & operator[] (size_t i)
 
const PosType & operator[] (size_t i) const
 

Public Attributes

PosType x [2]
 

Detailed Description

Class for representing points or vectors in 2 dimensions. Not that the dereferencing operator is overridden.


The documentation for this struct was generated from the following file: