GCS::DeriVector2 Class Reference

Class DeriVector2 holds a vector value and its derivative on the parameter that the derivatives are being calculated for now. More...

#include <Geo.h>

Public Member Functions

 DeriVector2 ()
 
 DeriVector2 (const Point &p, const double *derivparam)
 
 DeriVector2 (double x, double y)
 
 DeriVector2 (double x, double y, double dx, double dy)
 
DeriVector2 divD (double val, double dval) const
 
DeriVector2 getNormalized () const
 
double length () const
 
double length (double &dlength) const
 
DeriVector2 linCombi (double m1, const DeriVector2 &v2, double m2) const
 
DeriVector2 mult (double val) const
 
DeriVector2 multD (double val, double dval) const
 
DeriVector2 rotate90ccw () const
 
DeriVector2 rotate90cw () const
 
double scalarProd (const DeriVector2 &v2, double *dprd=nullptr) const
 
DeriVector2 subtr (const DeriVector2 &v2) const
 
DeriVector2 sum (const DeriVector2 &v2) const
 

Public Attributes

double dx
 
double dy
 
double x
 
double y
 

Detailed Description

Class DeriVector2 holds a vector value and its derivative on the parameter that the derivatives are being calculated for now.

x,y is the actual vector (v). dx,dy is a derivative of the vector by a parameter (dv/dp). The easiest way to fill the vector in is by passing a point and a derivative parameter pointer to its constructor. x,y are read from the pointers in Point, and dx,dy are set to either 0 or 1 depending on what pointers of Point match the supplied pointer. The derivatives can be set manually as well. The class also provides a bunch of methods to do math on it (and derivatives are calculated implicitly).

Constructor & Destructor Documentation

◆ DeriVector2() [1/4]

GCS::DeriVector2::DeriVector2 ( )

◆ DeriVector2() [2/4]

GCS::DeriVector2::DeriVector2 ( double  x,
double  y 
)

References dx, dy, x, and y.

◆ DeriVector2() [3/4]

GCS::DeriVector2::DeriVector2 ( double  x,
double  y,
double  dx,
double  dy 
)

References dx, dy, x, and y.

◆ DeriVector2() [4/4]

GCS::DeriVector2::DeriVector2 ( const Point p,
const double *  derivparam 
)

References dx, and dy.

Member Function Documentation

◆ divD()

DeriVector2 GCS::DeriVector2::divD ( double  val,
double  dval 
) const

References DeriVector2(), dx, and dy.

Referenced by GCS::Parabola::Value().

◆ getNormalized()

◆ length() [1/2]

◆ length() [2/2]

◆ linCombi()

DeriVector2 GCS::DeriVector2::linCombi ( double  m1,
const DeriVector2 v2,
double  m2 
) const

◆ mult()

DeriVector2 GCS::DeriVector2::mult ( double  val) const

References DeriVector2(), dx, and dy.

Referenced by GCS::Hyperbola::CalculateNormal().

◆ multD()

DeriVector2 GCS::DeriVector2::multD ( double  val,
double  dval 
) const

◆ rotate90ccw()

◆ rotate90cw()

DeriVector2 GCS::DeriVector2::rotate90cw ( ) const

References DeriVector2(), dx, and dy.

◆ scalarProd()

double GCS::DeriVector2::scalarProd ( const DeriVector2 v2,
double *  dprd = nullptr 
) const

References dx, and dy.

◆ subtr()

◆ sum()

Member Data Documentation

◆ dx

◆ dy

◆ x

◆ y


The documentation for this class was generated from the following files: