5 #ifndef USML_TYPES_WVECTOR_H
6 #define USML_TYPES_WVECTOR_H
8 #include <usml/ublas/ublas.h>
13 using namespace usml::ublas;
56 wvector(
unsigned rows = 1,
unsigned cols = 1);
76 inline const matrix<double>&
rho()
const
87 template<
class E>
inline
88 void rho(
const matrix_expression<E>& r,
bool no_alias =
true)
104 inline double rho(
unsigned row,
unsigned col)
const
106 return _rho(row, col);
117 inline void rho(
unsigned row,
unsigned col,
double r)
140 inline const matrix<double>&
theta()
const
151 template<
class E>
inline
152 void theta(
const matrix_expression<E>& t,
bool no_alias =
true)
168 inline double theta(
unsigned row,
unsigned col)
const
170 return _theta(row, col);
182 inline void theta(
unsigned row,
unsigned col,
double t)
184 _theta(row, col) = t;
204 inline const matrix<double>&
phi()
const
215 template<
class E>
inline
216 void phi(
const matrix_expression<E>& p,
bool no_alias =
true)
232 inline double phi(
unsigned row,
unsigned col)
const
234 return _phi(row, col);
245 inline void phi(
unsigned row,
unsigned col,
double p)
303 void dot(
const wvector1& other, matrix<double>& result)
const;
317 void dotnorm(
const wvector1& other, matrix<double>& result)
const;
331 void distance(
const wvector1& origin, matrix<double>& result)
const;
345 void distance2(
const wvector1& origin, matrix<double>& result)
const;
unsigned size2() const
Number of columns in each coordinate.
Definition: wvector.h:264
const matrix< double > & rho() const
Retrieves the radial component of the spherical earth coordinate system.
Definition: wvector.h:76
void rho(const matrix_expression< E > &r, bool no_alias=true)
Defines the radial component of the spherical earth coordinate.
Definition: wvector.h:88
void theta(unsigned row, unsigned col, double t)
Indexed version for single colatitude component definition.
Definition: wvector.h:182
void phi(const matrix_expression< E > &p, bool no_alias=true)
Defines the longitude component of the spherical earth coordinate.
Definition: wvector.h:216
void theta(const matrix_expression< E > &t, bool no_alias=true)
Defines the colatitude component of the spherical earth coordinate.
Definition: wvector.h:152
unsigned size1() const
Number of rows in each coordinate.
Definition: wvector.h:256
matrix< double > _theta
Storage for the colatitude component of the coordinate system.
Definition: wvector.h:128
void clear()
Reset all data elements back to zero.
Definition: wvector.h:272
matrix< double > _rho
Storage for the radial component of the coordinate system.
Definition: wvector.h:64
Individual world vector in spherical earth coordinates.
Definition: wvector1.h:27
matrix< double > _phi
Storage for the longitude component of the coordinate system.
Definition: wvector.h:193
void phi(unsigned row, unsigned col, double p)
Indexed version for single longitude component definition.
Definition: wvector.h:245
const matrix< double > & phi() const
Retrieves the longitude component of the spherical earth coordinate system.
Definition: wvector.h:204
const matrix< double > & theta() const
Retrieves the colatitude component of the spherical earth coordinate system.
Definition: wvector.h:140
double theta(unsigned row, unsigned col) const
Indexed version for single colatitude component retrieval.
Definition: wvector.h:168
double phi(unsigned row, unsigned col) const
Indexed version for single longitude component retrieval.
Definition: wvector.h:232
double rho(unsigned row, unsigned col) const
Indexed version for single radial component retrieval.
Definition: wvector.h:104
World vector in spherical earth coordinates.
Definition: wvector.h:42
void rho(unsigned row, unsigned col, double r)
Indexed version for single radial component definition.
Definition: wvector.h:117