General Purpose Geodetic Library
SgVector.h File Reference
#include <stdlib.h>
#include <iostream>
#include <string.h>
#include <SgMathSupport.h>

Go to the source code of this file.

Classes

class  SgVector
 

Functions

SgVector operator- (const SgVector &V)
 
SgVector operator* (const SgVector &V, double d)
 
SgVector operator* (double d, const SgVector &V)
 
SgVector operator/ (const SgVector &V, double d)
 
SgVector operator+ (const SgVector &V1, const SgVector &V2)
 
SgVector operator- (const SgVector &V1, const SgVector &V2)
 
double operator* (const SgVector &V1, const SgVector &V2)
 
std::ostream & operator<< (std::ostream &s, const SgVector &V)
 

Variables

const SgVector vZero
 

Function Documentation

◆ operator*() [1/3]

SgVector operator* ( const SgVector V,
double  d 
)
inline

Returns a vector multiplied by scalar.

Parameters
V– a vector;
d– a scale.

Definition at line 514 of file SgVector.h.

◆ operator*() [2/3]

double operator* ( const SgVector V1,
const SgVector V2 
)
inline

Makes a scalar product of two vectors.

Parameters
V1– a first term in the product;
V2– a second term in the product.

Definition at line 554 of file SgVector.h.

◆ operator*() [3/3]

SgVector operator* ( double  d,
const SgVector V 
)
inline

Returns a vector multiplied by scalar.

Parameters
d– a scale.
V– a vector;

Definition at line 522 of file SgVector.h.

◆ operator+()

SgVector operator+ ( const SgVector V1,
const SgVector V2 
)
inline

Returns a sum of two vectors.

Parameters
V1is a first term,
V2is a second term in the sum.

Definition at line 538 of file SgVector.h.

◆ operator-() [1/2]

SgVector operator- ( const SgVector V)
inline

Returns a vector with an inverted sign (unary operator).

Parameters
V– an original vector.

Definition at line 506 of file SgVector.h.

◆ operator-() [2/2]

SgVector operator- ( const SgVector V1,
const SgVector V2 
)
inline

Returns a difference of two vectors.

Parameters
V1is a first term,
V2is a second term in the sum.

Definition at line 546 of file SgVector.h.

◆ operator/()

SgVector operator/ ( const SgVector V,
double  d 
)
inline

Returns a vector divided by scalar.

Parameters
V– a vector;
d– a divider;

Definition at line 530 of file SgVector.h.

◆ operator<<()

std::ostream& operator<< ( std::ostream &  s,
const SgVector V 
)

Makes output to std::ostream, a standard text formatted output.

Parameters
s– a stream;
V– a vector.

Definition at line 35 of file SgVector.cpp.

References SgVector::getElement(), and SgVector::n().

Variable Documentation

◆ vZero

const SgVector vZero
extern